v0.2.3: tweaks/corrections to blandfruit and associated buffs
This commit is contained in:
@@ -4,6 +4,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.watabou.utils.Bundle;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
@@ -12,13 +13,39 @@ import java.util.HashSet;
|
||||
*/
|
||||
public class ToxicImbue extends Buff {
|
||||
|
||||
public static final float DURATION = 20f;
|
||||
public static final float DURATION = 30f;
|
||||
|
||||
protected float left;
|
||||
|
||||
private static final String LEFT = "left";
|
||||
|
||||
@Override
|
||||
public void storeInBundle( Bundle bundle ) {
|
||||
super.storeInBundle( bundle );
|
||||
bundle.put( LEFT, left );
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreFromBundle( Bundle bundle ) {
|
||||
super.restoreFromBundle( bundle );
|
||||
left = bundle.getFloat( LEFT );
|
||||
}
|
||||
|
||||
public void set( float duration ) {
|
||||
this.left = duration;
|
||||
};
|
||||
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
GameScene.add(Blob.seed(target.pos, 50, ToxicGas.class));
|
||||
|
||||
spend(TICK);
|
||||
left -= TICK;
|
||||
if (left <= 0)
|
||||
detach();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user