v2.5.0: fixed cases where Yog wouldn't immediately move to final phase
This commit is contained in:
+22
-18
@@ -183,24 +183,6 @@ public class YogDzewa extends Mob {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phase == 4 && findFist() == null){
|
|
||||||
yell(Messages.get(this, "hope"));
|
|
||||||
summonCooldown = -15; //summon a burst of minions!
|
|
||||||
phase = 5;
|
|
||||||
BossHealthBar.bleed(true);
|
|
||||||
Game.runOnRenderThread(new Callback() {
|
|
||||||
@Override
|
|
||||||
public void call() {
|
|
||||||
Music.INSTANCE.fadeOut(0.5f, new Callback() {
|
|
||||||
@Override
|
|
||||||
public void call() {
|
|
||||||
Music.INSTANCE.play(Assets.Music.HALLS_BOSS_FINALE, true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (phase == 0){
|
if (phase == 0){
|
||||||
spend(TICK);
|
spend(TICK);
|
||||||
return true;
|
return true;
|
||||||
@@ -368,6 +350,28 @@ public class YogDzewa extends Mob {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void processFistDeath(){
|
||||||
|
//normally Yog has no logic when a fist dies specifically
|
||||||
|
//but the very last fist to die does trigger the final phase
|
||||||
|
if (phase == 4 && findFist() == null){
|
||||||
|
yell(Messages.get(this, "hope"));
|
||||||
|
summonCooldown = -15; //summon a burst of minions!
|
||||||
|
phase = 5;
|
||||||
|
BossHealthBar.bleed(true);
|
||||||
|
Game.runOnRenderThread(new Callback() {
|
||||||
|
@Override
|
||||||
|
public void call() {
|
||||||
|
Music.INSTANCE.fadeOut(0.5f, new Callback() {
|
||||||
|
@Override
|
||||||
|
public void call() {
|
||||||
|
Music.INSTANCE.play(Assets.Music.HALLS_BOSS_FINALE, true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAlive() {
|
public boolean isAlive() {
|
||||||
return super.isAlive() || phase != 5;
|
return super.isAlive() || phase != 5;
|
||||||
|
|||||||
@@ -158,6 +158,16 @@ public abstract class YogFist extends Mob {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void die(Object cause) {
|
||||||
|
super.die(cause);
|
||||||
|
for ( Char c : Actor.chars() ){
|
||||||
|
if (c instanceof YogDzewa){
|
||||||
|
((YogDzewa) c).processFistDeath();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected abstract void zap();
|
protected abstract void zap();
|
||||||
|
|
||||||
public void onZapComplete(){
|
public void onZapComplete(){
|
||||||
|
|||||||
Reference in New Issue
Block a user