v1.3.2: fixed further levelgen inconsistencies caused by champions

This commit is contained in:
Evan Debenham
2022-07-22 12:53:35 -04:00
parent 401a0701e7
commit 4f800f4ebc
@@ -100,7 +100,8 @@ public abstract class ChampionEnemy extends Buff {
Dungeon.mobsToChampion--; Dungeon.mobsToChampion--;
if (Dungeon.mobsToChampion <= 0){ //we roll for a champion enemy even if we aren't spawning one to ensure that
//mobsToChampion does not affect levelgen RNG (number of calls to Random.Int() is constant)
Class<?extends ChampionEnemy> buffCls; Class<?extends ChampionEnemy> buffCls;
switch (Random.Int(6)){ switch (Random.Int(6)){
case 0: default: buffCls = Blazing.class; break; case 0: default: buffCls = Blazing.class; break;
@@ -111,12 +112,11 @@ public abstract class ChampionEnemy extends Buff {
case 5: buffCls = Growing.class; break; case 5: buffCls = Growing.class; break;
} }
if (Dungeon.isChallenged(Challenges.CHAMPION_ENEMIES)) { if (Dungeon.mobsToChampion <= 0 && Dungeon.isChallenged(Challenges.CHAMPION_ENEMIES)) {
Buff.affect(m, buffCls); Buff.affect(m, buffCls);
m.state = m.WANDERING; m.state = m.WANDERING;
} }
} }
}
public static class Blazing extends ChampionEnemy { public static class Blazing extends ChampionEnemy {