v3.1.0: improved vfx for activating or deactivating brawler's stance
This commit is contained in:
@@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.AttackIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
@@ -210,12 +211,14 @@ public class RingOfForce extends Ring {
|
||||
}
|
||||
BuffIndicator.refreshHero();
|
||||
AttackIndicator.updateState();
|
||||
hero.sprite.operate(hero.pos);
|
||||
} else if (!isEquipped(hero)) {
|
||||
GLog.w(Messages.get(MeleeWeapon.class, "ability_need_equip"));
|
||||
|
||||
} else {
|
||||
Buff.affect(hero, BrawlersStance.class).reset();
|
||||
AttackIndicator.updateState();
|
||||
hero.sprite.operate(hero.pos);
|
||||
}
|
||||
} else {
|
||||
super.execute(hero, action);
|
||||
@@ -298,10 +301,14 @@ public class RingOfForce extends Ring {
|
||||
}
|
||||
|
||||
//buff must be active for at least 50 turns, to discourage micro-managing for max charges
|
||||
public boolean active;
|
||||
public boolean active = true;
|
||||
private int minTurnsLeft;
|
||||
|
||||
public void reset(){
|
||||
if (!active){
|
||||
//announce the buff
|
||||
target.sprite.showStatus(CharSprite.POSITIVE, Messages.titleCase(name()));
|
||||
}
|
||||
active = true;
|
||||
minTurnsLeft = 50;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user