v0.3.2c: Fixed the timekeeper's hourglass stasis effect
This commit is contained in:
committed by
Evan Debenham
parent
83b60bf5a4
commit
6b7e28c88a
+17
-12
@@ -228,24 +228,29 @@ public class TimekeepersHourglass extends Artifact {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean attachTo(Char target) {
|
public boolean attachTo(Char target) {
|
||||||
//buffs always act last, so the stasis buff should end a turn early.
|
|
||||||
spend(charge-1);
|
|
||||||
((Hero)target).spendAndNext(charge);
|
|
||||||
|
|
||||||
//shouldn't punish the player for going into stasis frequently
|
if (super.attachTo(target)) {
|
||||||
Hunger hunger = target.buff(Hunger.class);
|
//buffs always act last, so the stasis buff should end a turn early.
|
||||||
if (hunger != null && !hunger.isStarving())
|
spend(charge - 1);
|
||||||
hunger.satisfy(charge);
|
((Hero) target).spendAndNext(charge);
|
||||||
|
|
||||||
charge = 0;
|
//shouldn't punish the player for going into stasis frequently
|
||||||
|
Hunger hunger = target.buff(Hunger.class);
|
||||||
|
if (hunger != null && !hunger.isStarving())
|
||||||
|
hunger.satisfy(charge);
|
||||||
|
|
||||||
target.invisible++;
|
charge = 0;
|
||||||
|
|
||||||
updateQuickslot();
|
target.invisible++;
|
||||||
|
|
||||||
Dungeon.observe();
|
updateQuickslot();
|
||||||
|
|
||||||
return super.attachTo(target);
|
Dungeon.observe();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user