@Override public boolean attack(Char enemy) { for (int i = 1; i < Ballistica.distance; i++) { int pos = Ballistica.trace[i]; Char ch = Actor.findChar(pos); if (ch == null) { continue; } if (hit(this, ch, true)) { ch.damage(Random.NormalIntRange(14, 20), this); if (Dungeon.visible[pos]) { ch.getSprite().flash(); CellEmitter.center(pos).burst(PurpleParticle.BURST, Random.IntRange(1, 2)); } if (!ch.isAlive() && ch == Dungeon.hero) { Dungeon.fail( Utils.format(ResultDescriptions.MOB, Utils.indefinite(getName()), Dungeon.depth)); GLog.n(TXT_DEATHGAZE_KILLED, getName()); } } else { ch.getSprite().showStatus(CharSprite.NEUTRAL, ch.defenseVerb()); } } return true; }
public void showMindControl() { if (emo instanceof EmoIcon.Controlled) { } else { removeEmo(); if (ch != null && ch.isAlive()) { emo = new EmoIcon.Controlled(this); } } }
private boolean actAttack(HeroAction.Attack action) { enemy = action.target; if (Level.adjacent(pos, enemy.pos) && enemy.isAlive() && !pacified) { spend(attackDelay()); sprite.attack(enemy.pos); return false; } else { if (Level.fieldOfView[enemy.pos] && getCloser(enemy.pos)) { return true; } else { ready(); return false; } } }