v2.1.1: fixed visual bugs with arcane bomb stacking
This commit is contained in:
+17
-3
@@ -21,16 +21,16 @@
|
||||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
|
||||
|
||||
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GooSprite;
|
||||
|
||||
public class GooWarn extends Blob {
|
||||
|
||||
//cosmetic blob, used to warn noobs that goo's pump up should, infact, be avoided.
|
||||
//cosmetic blob, previously used for Goo's pump up attack (that's now handled by Goo's sprite)
|
||||
// but is still used as a visual indicator for Arcane bombs
|
||||
|
||||
{
|
||||
//this one needs to act just before the Goo
|
||||
@@ -57,6 +57,20 @@ public class GooWarn extends Blob {
|
||||
|
||||
}
|
||||
|
||||
//to prevent multiple arcane bombs from visually stacking their effects
|
||||
public void seed(Level level, int cell, int amount ) {
|
||||
if (cur == null) cur = new int[level.length()];
|
||||
if (off == null) off = new int[cur.length];
|
||||
|
||||
int toAdd = amount - cur[cell];
|
||||
if (toAdd > 0){
|
||||
cur[cell] += toAdd;
|
||||
volume += toAdd;
|
||||
}
|
||||
|
||||
area.union(cell%level.width(), cell/level.width());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void use( BlobEmitter emitter ) {
|
||||
super.use( emitter );
|
||||
|
||||
Reference in New Issue
Block a user