v1.2.0: fixed various errors with the Timekeeper's Hourglass
This commit is contained in:
parent
3a4a9b9ed0
commit
54ea689dee
|
@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Thief;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.ChargrilledMeat;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.FrozenCarpaccio;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
|
||||
|
@ -91,7 +92,7 @@ public class Burning extends Buff implements Hero.Doom {
|
|||
int damage = Random.NormalIntRange( 1, 3 + Dungeon.depth/4 );
|
||||
Buff.detach( target, Chill.class);
|
||||
|
||||
if (target instanceof Hero) {
|
||||
if (target instanceof Hero && target.buff(TimekeepersHourglass.timeStasis.class) == null) {
|
||||
|
||||
Hero hero = (Hero)target;
|
||||
|
||||
|
|
|
@ -262,17 +262,19 @@ public class TimekeepersHourglass extends Artifact {
|
|||
|
||||
int usedCharge = Math.min(charge, 2);
|
||||
//buffs always act last, so the stasis buff should end a turn early.
|
||||
spend((5*usedCharge) - 1);
|
||||
((Hero) target).spendAndNext(5*usedCharge);
|
||||
spend(5*usedCharge);
|
||||
|
||||
//shouldn't punish the player for going into stasis frequently
|
||||
Hunger hunger = Buff.affect(target, Hunger.class);
|
||||
if (hunger != null && !hunger.isStarving())
|
||||
hunger.satisfy(5*usedCharge);
|
||||
if (hunger != null && !hunger.isStarving()) {
|
||||
hunger.satisfy(5 * usedCharge);
|
||||
}
|
||||
|
||||
charge -= usedCharge;
|
||||
|
||||
target.invisible++;
|
||||
target.paralysed++;
|
||||
target.next();
|
||||
|
||||
updateQuickslot();
|
||||
|
||||
|
@ -294,8 +296,8 @@ public class TimekeepersHourglass extends Artifact {
|
|||
|
||||
@Override
|
||||
public void detach() {
|
||||
if (target.invisible > 0)
|
||||
target.invisible --;
|
||||
if (target.invisible > 0) target.invisible--;
|
||||
if (target.paralysed > 0) target.paralysed--;
|
||||
super.detach();
|
||||
activeBuff = null;
|
||||
Dungeon.observe();
|
||||
|
|
Loading…
Reference in New Issue
Block a user