v2.0.0: fixed very specific cases of Goo particles behaving incorrectly

This commit is contained in:
Evan Debenham
2022-11-24 14:47:35 -05:00
parent c6d7a06eac
commit 406dce63ac
2 changed files with 8 additions and 3 deletions

View File

@@ -66,8 +66,8 @@ public class Goo extends Mob {
@Override
public int damageRoll() {
int min = 1;
int max = (HP*2 <= HT) ? 12 : 8;
int min = 0;
int max = 0;
if (pumpedUp > 0) {
pumpedUp = 0;
if (enemy == Dungeon.hero) {
@@ -101,8 +101,9 @@ public class Goo extends Mob {
@Override
public boolean act() {
if (state != HUNTING){
if (state != HUNTING && pumpedUp > 0){
pumpedUp = 0;
sprite.idle();
}
if (Dungeon.level.water[pos] && HP < HT) {

View File

@@ -91,6 +91,10 @@ public class GooSprite extends MobSprite {
} else {
play(pump);
Sample.INSTANCE.play( Assets.Sounds.CHARGEUP, 1f, warnDist == 1 ? 0.8f : 1f );
if (ch.fieldOfView == null || ch.fieldOfView.length != Dungeon.level.length()){
ch.fieldOfView = new boolean[Dungeon.level.length()];
Dungeon.level.updateFieldOfView( ch, ch.fieldOfView );
}
for (int i = 0; i < Dungeon.level.length(); i++){
if (ch.fieldOfView != null && ch.fieldOfView[i]
&& Dungeon.level.distance(i, ch.pos) <= warnDist