v2.3.0: fixed Tengu not quite handling taking massive damage correctly
This commit is contained in:
@@ -137,31 +137,35 @@ public class Tengu extends Mob {
|
||||
PrisonBossLevel.State state = ((PrisonBossLevel)Dungeon.level).state();
|
||||
|
||||
int hpBracket = HT / 8;
|
||||
|
||||
|
||||
int curbracket = HP / hpBracket;
|
||||
|
||||
int beforeHitHP = HP;
|
||||
super.damage(dmg, src);
|
||||
dmg = beforeHitHP - HP;
|
||||
|
||||
//tengu cannot be hit through multiple brackets at a time
|
||||
if ((beforeHitHP/hpBracket - HP/hpBracket) >= 2){
|
||||
HP = hpBracket * ((beforeHitHP/hpBracket)-1) + 1;
|
||||
|
||||
//cannot be hit through multiple brackets at a time
|
||||
if (HP <= (curbracket-1)*hpBracket){
|
||||
HP = (curbracket-1)*hpBracket + 1;
|
||||
}
|
||||
|
||||
|
||||
int newBracket = HP / hpBracket;
|
||||
dmg = beforeHitHP - HP;
|
||||
|
||||
LockedFloor lock = Dungeon.hero.buff(LockedFloor.class);
|
||||
if (lock != null) {
|
||||
if (Dungeon.isChallenged(Challenges.STRONGER_BOSSES)) lock.addTime(2*dmg/3f);
|
||||
else lock.addTime(dmg);
|
||||
}
|
||||
|
||||
|
||||
//phase 2 of the fight is over
|
||||
if (HP == 0 && state == PrisonBossLevel.State.FIGHT_ARENA) {
|
||||
//let full attack action complete first
|
||||
Actor.add(new Actor() {
|
||||
|
||||
|
||||
{
|
||||
actPriority = VFX_PRIO;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean act() {
|
||||
Actor.remove(this);
|
||||
@@ -171,16 +175,16 @@ public class Tengu extends Mob {
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//phase 1 of the fight is over
|
||||
if (state == PrisonBossLevel.State.FIGHT_START && HP <= HT/2){
|
||||
HP = (HT/2);
|
||||
yell(Messages.get(this, "interesting"));
|
||||
((PrisonBossLevel)Dungeon.level).progress();
|
||||
BossHealthBar.bleed(true);
|
||||
|
||||
|
||||
//if tengu has lost a certain amount of hp, jump
|
||||
} else if (beforeHitHP / hpBracket != HP / hpBracket) {
|
||||
} else if (newBracket != curbracket) {
|
||||
//let full attack action complete first
|
||||
Actor.add(new Actor() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user