if (hero.isReady(‘bash’) && hero.isPathClear(hero.pos, enemy.pos))
Before hero.bash(enemy) it’s much safer to check if bash is ready and if path to the enemy is clear. After blowing all fire traps it’s easy to collect the gold.
if (hero.isReady(‘bash’) && hero.isPathClear(hero.pos, enemy.pos))
Before hero.bash(enemy) it’s much safer to check if bash is ready and if path to the enemy is clear. After blowing all fire traps it’s easy to collect the gold.