From ad0abbd358e4b6436ab229721e60a7125dd39d19 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 11 Nov 2019 20:25:22 -0500 Subject: [PATCH] v0.8.0: bugfixes: - fixed class array bundling errors (JSON was loading full class references if it wasn't loading from file) - various minor vfx bugs with goo when pump-up attack is interrupted --- .../src/main/java/com/watabou/utils/Bundle.java | 2 +- .../shatteredpixeldungeon/actors/blobs/GooWarn.java | 4 ++-- .../shatteredpixeldungeon/actors/mobs/Goo.java | 12 ++++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/SPD-classes/src/main/java/com/watabou/utils/Bundle.java b/SPD-classes/src/main/java/com/watabou/utils/Bundle.java index 768f077b9..4361e6c43 100644 --- a/SPD-classes/src/main/java/com/watabou/utils/Bundle.java +++ b/SPD-classes/src/main/java/com/watabou/utils/Bundle.java @@ -372,7 +372,7 @@ public class Bundle { try { JSONArray jsonArray = new JSONArray(); for (int i=0; i < array.length; i++) { - jsonArray.put( i, array[i] ); + jsonArray.put( i, array[i].getCanonicalName() ); } data.put( key, jsonArray ); } catch (JSONException e) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/GooWarn.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/GooWarn.java index 5544f70f0..89f7f003b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/GooWarn.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/GooWarn.java @@ -33,8 +33,8 @@ public class GooWarn extends Blob { //cosmetic blob, used to warn noobs that goo's pump up should, infact, be avoided. { - //this one needs to act after the Goo - actPriority = MOB_PRIO - 1; + //this one needs to act just before the Goo + actPriority = MOB_PRIO + 1; } protected int pos; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Goo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Goo.java index 18446245b..fc3430835 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Goo.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Goo.java @@ -103,6 +103,11 @@ public class Goo extends Mob { @Override public boolean act() { + + //ensures goo warning blob acts at the correct times + //as normally blobs act one extra time when initialized if they normally act before + //whatever spawned them + GameScene.add(Blob.seed(pos, 0, GooWarn.class)); if (Dungeon.level.water[pos] && HP < HT) { sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 ); @@ -116,6 +121,9 @@ public class Goo extends Mob { if (state != SLEEPING){ Dungeon.level.seal(); } + + //prevents goo pump animation from persisting when it shouldn't + sprite.idle(); return super.act(); } @@ -147,7 +155,7 @@ public class Goo extends Mob { PathFinder.buildDistanceMap( pos, BArray.not( Dungeon.level.solid, null ), 2 ); for (int i = 0; i < PathFinder.distance.length; i++) { if (PathFinder.distance[i] < Integer.MAX_VALUE) - GameScene.add(Blob.seed(i, 2, GooWarn.class)); + GameScene.add(Blob.seed(i, 1, GooWarn.class)); } pumpedUp++; @@ -181,7 +189,7 @@ public class Goo extends Mob { for (int i=0; i < PathFinder.NEIGHBOURS9.length; i++) { int j = pos + PathFinder.NEIGHBOURS9[i]; if (!Dungeon.level.solid[j]) { - GameScene.add(Blob.seed(j, 2, GooWarn.class)); + GameScene.add(Blob.seed(j, 1, GooWarn.class)); } }