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
This commit is contained in:
Evan Debenham 2019-11-11 20:25:22 -05:00
parent 39525ec0f1
commit ad0abbd358
3 changed files with 13 additions and 5 deletions

View File

@ -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) {

View File

@ -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;

View File

@ -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));
}
}