v2.0.0: fixed crashes with self-applied mageroyal dart and charged shot

This commit is contained in:
Evan Debenham
2023-01-30 11:56:48 -05:00
parent b6b2dadc0a
commit 0d61d7fa2e

View File

@@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionEnemy;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfCleansing;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Crossbow;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class CleansingDart extends TippedDart {
@@ -44,7 +45,9 @@ public class CleansingDart extends TippedDart {
return 0;
} else {
for (Buff b : defender.buffs()){
if (!(b instanceof ChampionEnemy) && b.type == Buff.buffType.POSITIVE){
if (!(b instanceof ChampionEnemy)
&& b.type == Buff.buffType.POSITIVE
&& !(b instanceof Crossbow.ChargedShot)){
b.detach();
}
}