v1.4.1: fixed magic resistance not working with cursed wand drain effect
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user