public boolean apply(PathFinder.State state) {
Game game = gameState.game;
Board board = game.board;
Tile t = board.tileAt(state.hero.position);
if (t instanceof HeroTile) {
HeroTile heroTile = (HeroTile) t;
if (!heroTile.is(player)) {
Hero hero = game.findHero(heroTile.getHeroId());
if (hero.state.life < player.state.life - PathFinder.HP_LOSS_HERO_FIGHT && board.minesForHero(hero) > 0) {
return true;
}
}
}