v0.3.2b: locked floor count now persists over save/load, also increased base amount to 50
This commit is contained in:
parent
d2dc3aa712
commit
7999de94ac
|
@ -22,11 +22,12 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
|||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.watabou.utils.Bundle;
|
||||
|
||||
public class LockedFloor extends Buff {
|
||||
|
||||
//the amount of turns remaining before beneficial passive effects turn off
|
||||
private float left = 20; //starts at 20 turns
|
||||
private float left = 50; //starts at 50 turns
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
|
@ -49,6 +50,20 @@ public class LockedFloor extends Buff {
|
|||
return left >= 1;
|
||||
}
|
||||
|
||||
private 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 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int icon() {
|
||||
return BuffIndicator.LOCKED_FLOOR;
|
||||
|
|
Loading…
Reference in New Issue
Block a user