v3.3.0: fixed further cases of brutes becoming immortal
This commit is contained in:
@@ -159,6 +159,9 @@ public class Berserk extends ShieldBuff implements ActionIndicator.Action {
|
||||
@Override
|
||||
public void detach() {
|
||||
super.detach();
|
||||
if (state == State.BERSERK) {
|
||||
state = State.RECOVERING;
|
||||
}
|
||||
ActionIndicator.clearAction(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ public class Brute extends Mob {
|
||||
}
|
||||
}
|
||||
|
||||
//cache this buff to prevent having to call buff(...) a bunch.
|
||||
//cache this buff to prevent having to call buff(...) a bunch in isAlive
|
||||
private BruteRage rage;
|
||||
|
||||
@Override
|
||||
@@ -92,16 +92,15 @@ public class Brute extends Mob {
|
||||
triggerEnrage();
|
||||
}
|
||||
if (rage == null){
|
||||
for (BruteRage b : buffs(BruteRage.class)){
|
||||
rage = b;
|
||||
}
|
||||
rage = buff(BruteRage.class);
|
||||
}
|
||||
return rage != null && rage.shielding() > 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected void triggerEnrage(){
|
||||
Buff.affect(this, BruteRage.class).setShield(HT/2 + 4);
|
||||
rage = Buff.affect(this, BruteRage.class);
|
||||
rage.setShield(HT/2 + 4);
|
||||
sprite.showStatusWithIcon( CharSprite.POSITIVE, Integer.toString(HT/2 + 4), FloatingText.SHIELDING );
|
||||
if (Dungeon.level.heroFOV[pos]) {
|
||||
SpellSprite.show( this, SpellSprite.BERSERK);
|
||||
@@ -149,6 +148,12 @@ public class Brute extends Mob {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detach() {
|
||||
super.detach();
|
||||
decShield(shielding()); //clear shielding to track that this was detached
|
||||
}
|
||||
|
||||
@Override
|
||||
public int icon () {
|
||||
return BuffIndicator.FURY;
|
||||
|
||||
Reference in New Issue
Block a user