v2.1.0: fixed magical misses not interrupting the hero

This commit is contained in:
Evan Debenham
2023-05-23 12:37:05 -04:00
parent 4c29e96135
commit 91cd916bb4

View File

@@ -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;