v1.1.0: fixed chilled ghouls would get extra turns after reviving

This commit is contained in:
Evan Debenham 2021-10-20 15:43:45 -04:00
parent fbb2c75982
commit f8b11e814d
3 changed files with 7 additions and 3 deletions

View File

@ -87,6 +87,10 @@ public abstract class Actor implements Bundlable {
time = 0; time = 0;
} }
public void timeToNow() {
time = now;
}
protected void diactivate() { protected void diactivate() {
time = Float.MAX_VALUE; time = Float.MAX_VALUE;
} }

View File

@ -266,7 +266,7 @@ public class Ghoul extends Mob {
} }
ghoul.HP = Math.round(ghoul.HT/10f); ghoul.HP = Math.round(ghoul.HT/10f);
Actor.add(ghoul); Actor.add(ghoul);
ghoul.spend(-ghoul.cooldown()); ghoul.timeToNow();
Dungeon.level.mobs.add(ghoul); Dungeon.level.mobs.add(ghoul);
Dungeon.level.occupyCell( ghoul ); Dungeon.level.occupyCell( ghoul );
ghoul.sprite.idle(); ghoul.sprite.idle();
@ -297,7 +297,7 @@ public class Ghoul extends Mob {
Ghoul newHost = searchForHost(ghoul); Ghoul newHost = searchForHost(ghoul);
if (newHost != null){ if (newHost != null){
attachTo(newHost); attachTo(newHost);
spend(-cooldown()); timeToNow();
} else { } else {
ghoul.die(this); ghoul.die(this);
} }

View File

@ -101,7 +101,7 @@ public class Tengu extends Mob {
protected void onAdd() { protected void onAdd() {
//when he's removed and re-added to the fight, his time is always set to now. //when he's removed and re-added to the fight, his time is always set to now.
if (cooldown() > TICK) { if (cooldown() > TICK) {
spend(-cooldown()); timeToNow();
spendToWhole(); spendToWhole();
} }
super.onAdd(); super.onAdd();