v1.4.1: fixed magic resistance not working with cursed wand drain effect

This commit is contained in:
Evan Debenham
2022-10-05 15:47:57 -04:00
parent 907168237f
commit 760719790d
2 changed files with 4 additions and 6 deletions

View File

@@ -38,6 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfArcana;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.CursedWand;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfDisintegration;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFireblast;
@@ -75,6 +76,7 @@ public class AntiMagic extends Armor.Glyph {
RESISTS.add( Bomb.MagicalBomb.class );
RESISTS.add( ScrollOfPsionicBlast.class );
RESISTS.add( CursedWand.class );
RESISTS.add( WandOfBlastWave.class );
RESISTS.add( WandOfDisintegration.class );
RESISTS.add( WandOfFireblast.class );

View File

@@ -218,7 +218,7 @@ public class CursedWand {
}
toHeal.HP = Math.min(toHeal.HT, toHeal.HP + damage);
toHeal.sprite.emitter().burst(Speck.factory(Speck.HEALING), 3);
toDamage.damage(damage, origin == null ? toHeal : origin);
toDamage.damage(damage, new CursedWand());
toDamage.sprite.emitter().start(ShadowParticle.UP, 0.05f, 10);
if (toDamage == Dungeon.hero){
@@ -244,11 +244,7 @@ public class CursedWand {
//Bomb explosion
case 2:
if (user == Dungeon.hero) {
new Bomb.MagicalBomb().explode(targetPos);
} else {
new Bomb().explode(targetPos);
}
new Bomb.MagicalBomb().explode(targetPos);
tryForWandProc(Actor.findChar(targetPos), origin);
return true;