From 13a2ada07631020feed6268d6af2e8ce57df2d52 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 5 Dec 2020 00:04:16 -0500 Subject: [PATCH] v0.9.1: fixed antimagic not applying to magical sleep or wards --- .../shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java | 4 +++- .../shatteredpixeldungeon/items/wands/WandOfWarding.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java index d84ccc888..547255f94 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java @@ -25,10 +25,11 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Charm; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hex; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicalSleep; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vulnerable; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Eye; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM100; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Eye; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Shaman; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Warlock; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Yog; @@ -57,6 +58,7 @@ public class AntiMagic extends Armor.Glyph { public static final HashSet RESISTS = new HashSet<>(); static { + RESISTS.add( MagicalSleep.class ); RESISTS.add( Charm.class ); RESISTS.add( Weakness.class ); RESISTS.add( Vulnerable.class ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfWarding.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfWarding.java index 3fe25076a..e2dba7ac3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfWarding.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfWarding.java @@ -305,7 +305,7 @@ public class WandOfWarding extends Wand { //always hits int dmg = Random.NormalIntRange( 2 + wandLevel, 8 + 4*wandLevel ); - enemy.damage( dmg, WandOfWarding.class ); + enemy.damage( dmg, this ); if (enemy.isAlive()){ Wand.processSoulMark(enemy, wandLevel, 1); }