v1.3.0: fixed hostile champions being on/off slightly affecting levelgen
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
@@ -100,15 +101,20 @@ public abstract class ChampionEnemy extends Buff {
|
||||
Dungeon.mobsToChampion--;
|
||||
|
||||
if (Dungeon.mobsToChampion <= 0){
|
||||
Class<?extends ChampionEnemy> buffCls;
|
||||
switch (Random.Int(6)){
|
||||
case 0: default: Buff.affect(m, Blazing.class); break;
|
||||
case 1: Buff.affect(m, Projecting.class); break;
|
||||
case 2: Buff.affect(m, AntiMagic.class); break;
|
||||
case 3: Buff.affect(m, Giant.class); break;
|
||||
case 4: Buff.affect(m, Blessed.class); break;
|
||||
case 5: Buff.affect(m, Growing.class); break;
|
||||
case 0: default: buffCls = Blazing.class; break;
|
||||
case 1: buffCls = Projecting.class; break;
|
||||
case 2: buffCls = AntiMagic.class; break;
|
||||
case 3: buffCls = Giant.class; break;
|
||||
case 4: buffCls = Blessed.class; break;
|
||||
case 5: buffCls = Growing.class; break;
|
||||
}
|
||||
|
||||
if (Dungeon.isChallenged(Challenges.CHAMPION_ENEMIES)) {
|
||||
Buff.affect(m, buffCls);
|
||||
m.state = m.WANDERING;
|
||||
}
|
||||
m.state = m.WANDERING;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -483,9 +483,7 @@ public abstract class Level implements Bundlable {
|
||||
}
|
||||
|
||||
Mob m = Reflection.newInstance(mobsToSpawn.remove(0));
|
||||
if (Dungeon.isChallenged(Challenges.CHAMPION_ENEMIES)){
|
||||
ChampionEnemy.rollForChampion(m);
|
||||
}
|
||||
ChampionEnemy.rollForChampion(m);
|
||||
return m;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user