v2.1.0: enemy misses now interrupt the hero just like hits

This commit is contained in:
Evan Debenham
2023-05-01 14:58:46 -04:00
parent b351ef3fdb
commit ed70f7617e
2 changed files with 5 additions and 1 deletions

View File

@@ -322,6 +322,10 @@ public abstract class Char extends Actor {
boolean visibleFight = Dungeon.level.heroFOV[pos] || Dungeon.level.heroFOV[enemy.pos]; 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 (enemy.isInvulnerable(getClass())) {
if (visibleFight) { if (visibleFight) {

View File

@@ -197,7 +197,7 @@ public class Hero extends Char {
private int defenseSkill = 5; private int defenseSkill = 5;
public boolean ready = false; public boolean ready = false;
private boolean damageInterrupt = true; public boolean damageInterrupt = true;
public HeroAction curAction = null; public HeroAction curAction = null;
public HeroAction lastAction = null; public HeroAction lastAction = null;