v1.1.0: fixed chilled ghouls would get extra turns after reviving
This commit is contained in:
parent
fbb2c75982
commit
f8b11e814d
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user