v2.0.0: fixed errors with new projecting lunge logic

This commit is contained in:
Evan Debenham
2023-02-17 13:09:54 -05:00
parent 38b817d370
commit 85678a03c4

View File

@@ -88,7 +88,7 @@ public class Rapier extends MeleeWeapon {
int lungeCell = -1;
for (int i : PathFinder.NEIGHBOURS8){
if (Dungeon.level.distance(hero.pos, target)-1 <= reachFactor(hero)
if (Dungeon.level.distance(hero.pos+i, target) <= reachFactor(hero)
&& Actor.findChar(hero.pos+i) == null
&& Dungeon.level.passable[hero.pos+i]){
if (lungeCell == -1 || Dungeon.level.trueDistance(hero.pos + i, target) < Dungeon.level.trueDistance(lungeCell, target)){