v0.9.2: healing buff now cancels resting when the hero reaches full HP
This commit is contained in:
parent
c4bf878276
commit
4eb658c012
|
@ -21,6 +21,7 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
|
@ -46,6 +47,10 @@ public class Healing extends Buff {
|
|||
public boolean act(){
|
||||
|
||||
target.HP = Math.min(target.HT, target.HP + healingThisTick());
|
||||
|
||||
if (target.HP == target.HT && target instanceof Hero){
|
||||
((Hero)target).resting = false;
|
||||
}
|
||||
|
||||
healingLeft -= healingThisTick();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user