v2.0.2: fixed cases of lunge still atking after moving onto a tele trap

This commit is contained in:
Evan Debenham
2023-04-10 17:27:47 -04:00
parent 4ce7bfc8cc
commit 7042919648

View File

@@ -114,7 +114,7 @@ public class Rapier extends MeleeWeapon {
hero.pos = dest;
Dungeon.level.occupyCell(hero);
if (enemy != null) {
if (enemy != null && hero.canAttack(enemy)) {
hero.sprite.attack(enemy.pos, new Callback() {
@Override
public void call() {