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 510a94bb9..54f0a144c 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 @@ -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 );