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
|
@Override
|
||||||
public void detach() {
|
public void detach() {
|
||||||
super.detach();
|
super.detach();
|
||||||
|
if (state == State.BERSERK) {
|
||||||
|
state = State.RECOVERING;
|
||||||
|
}
|
||||||
ActionIndicator.clearAction(this);
|
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;
|
private BruteRage rage;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -92,16 +92,15 @@ public class Brute extends Mob {
|
|||||||
triggerEnrage();
|
triggerEnrage();
|
||||||
}
|
}
|
||||||
if (rage == null){
|
if (rage == null){
|
||||||
for (BruteRage b : buffs(BruteRage.class)){
|
rage = buff(BruteRage.class);
|
||||||
rage = b;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return rage != null && rage.shielding() > 0;
|
return rage != null && rage.shielding() > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void triggerEnrage(){
|
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 );
|
sprite.showStatusWithIcon( CharSprite.POSITIVE, Integer.toString(HT/2 + 4), FloatingText.SHIELDING );
|
||||||
if (Dungeon.level.heroFOV[pos]) {
|
if (Dungeon.level.heroFOV[pos]) {
|
||||||
SpellSprite.show( this, SpellSprite.BERSERK);
|
SpellSprite.show( this, SpellSprite.BERSERK);
|
||||||
@@ -149,6 +148,12 @@ public class Brute extends Mob {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void detach() {
|
||||||
|
super.detach();
|
||||||
|
decShield(shielding()); //clear shielding to track that this was detached
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int icon () {
|
public int icon () {
|
||||||
return BuffIndicator.FURY;
|
return BuffIndicator.FURY;
|
||||||
|
|||||||
Reference in New Issue
Block a user