@Override public void onAttackComplete() { AttackIndicator.target(enemy); attack(enemy); curAction = null; Invisibility.dispel(); super.onAttackComplete(); }
@Override public boolean act() { super.act(); if (paralysed) { curAction = null; spendAndNext(TICK); return false; } checkVisibleMobs(); AttackIndicator.updateState(); if (curAction == null) { if (restoreHealth) { if (isStarving() || HP >= HT) { restoreHealth = false; } else { spend(TIME_TO_REST); next(); return false; } } ready(); } else { restoreHealth = false; ready = false; if (curAction instanceof HeroAction.Move) { actMove((HeroAction.Move) curAction); } else if (curAction instanceof HeroAction.Interact) { actInteract((HeroAction.Interact) curAction); } else if (curAction instanceof HeroAction.Buy) { actBuy((HeroAction.Buy) curAction); } else if (curAction instanceof HeroAction.PickUp) { actPickUp((HeroAction.PickUp) curAction); } else if (curAction instanceof HeroAction.OpenChest) { actOpenChest((HeroAction.OpenChest) curAction); } else if (curAction instanceof HeroAction.Unlock) { actUnlock((HeroAction.Unlock) curAction); } else if (curAction instanceof HeroAction.Descend) { actDescend((HeroAction.Descend) curAction); } else if (curAction instanceof HeroAction.Ascend) { actAscend((HeroAction.Ascend) curAction); } else if (curAction instanceof HeroAction.Attack) { actAttack((HeroAction.Attack) curAction); } else if (curAction instanceof HeroAction.Cook) { actCook((HeroAction.Cook) curAction); } } return false; }