From 91cd916bb4464fcf4b60d5d306259cdcf4839076 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 23 May 2023 12:37:05 -0400 Subject: [PATCH] v2.1.0: fixed magical misses not interrupting the hero --- .../shatteredpixel/shatteredpixeldungeon/actors/Char.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index 5c878ae98..1e224b644 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -324,10 +324,6 @@ public abstract class Char extends Actor { boolean visibleFight = Dungeon.level.heroFOV[pos] || Dungeon.level.heroFOV[enemy.pos]; - if (enemy == Dungeon.hero && Dungeon.hero.damageInterrupt){ - Dungeon.hero.interrupt(); - } - if (enemy.isInvulnerable(getClass())) { if (visibleFight) { @@ -521,6 +517,10 @@ public abstract class Char extends Actor { float acuStat = attacker.attackSkill( defender ); float defStat = defender.defenseSkill( attacker ); + if (defender instanceof Hero && ((Hero) defender).damageInterrupt){ + ((Hero) defender).interrupt(); + } + //invisible chars always hit (for the hero this is surprise attacking) if (attacker.invisible > 0 && attacker.canSurpriseAttack()){ acuStat = INFINITE_ACCURACY;