v2.1.0: adjusted Goo pump up attack to prevent rat king from blocking it

This commit is contained in:
Evan Debenham
2023-05-09 11:48:47 -04:00
parent 5fb0f5abab
commit 300e827007

View File

@@ -144,8 +144,8 @@ public class Goo extends Mob {
//we check both from and to in this case as projectile logic isn't always symmetrical.
//this helps trim out BS edge-cases
return Dungeon.level.distance(enemy.pos, pos) <= 2
&& new Ballistica( pos, enemy.pos, Ballistica.PROJECTILE).collisionPos == enemy.pos
&& new Ballistica( enemy.pos, pos, Ballistica.PROJECTILE).collisionPos == pos;
&& new Ballistica( pos, enemy.pos, Ballistica.STOP_TARGET | Ballistica.STOP_SOLID | Ballistica.IGNORE_SOFT_SOLID).collisionPos == enemy.pos
&& new Ballistica( enemy.pos, pos, Ballistica.STOP_TARGET | Ballistica.STOP_SOLID | Ballistica.IGNORE_SOFT_SOLID).collisionPos == pos;
} else {
return super.canAttack(enemy);
}