v0.9.3: Goo's healing now reverts regen time gained by damaging it.

This commit is contained in:
Evan Debenham 2021-05-08 23:01:13 -04:00
parent c54eaf8b16
commit b20cc11dee
2 changed files with 8 additions and 0 deletions

View File

@ -48,6 +48,10 @@ public class LockedFloor extends Buff {
left += time;
}
public void removeTime(float time){
left -= time; //can go negative!
}
public boolean regenOn(){
return left >= 1;
}

View File

@ -96,6 +96,10 @@ public class Goo extends Mob {
if (Dungeon.level.water[pos] && HP < HT) {
HP += healInc;
LockedFloor lock = Dungeon.hero.buff(LockedFloor.class);
if (lock != null) lock.removeTime(healInc*2);
if (Dungeon.level.heroFOV[pos] ){
sprite.emitter().burst( Speck.factory( Speck.HEALING ), healInc );
}