v0.9.2: tweaked randomness on hostile champions and tuned it up slightly
This commit is contained in:
parent
25c61c4939
commit
e92b42d5fb
|
@ -84,6 +84,6 @@ challenges.darkness_desc=It is a dungeon after all!\n\n- Regular visible distanc
|
|||
challenges.no_scrolls=Forbidden runes
|
||||
challenges.no_scrolls_desc=A certain rune is harder to find. Unfortunately, it's always the most useful one.\n\n- Half of the dungeon's upgrades scrolls are removed
|
||||
challenges.champion_enemies=Hostile champions
|
||||
challenges.champion_enemies_desc=You're not the only one who can level up!\n\n- Regular enemies have a 1/10 chance to spawn with a special champion buff.\n- Champions wake up if they spawn asleep\n- The hero knows when a champion spawns\n- Champions are immune to corruption\n\nThere are six types of champion enemy:\n_Blazing (orange):_ +25% melee damage, ignites on hit, immune to fire, spreads flames on death\n_Projecting (purple):_ +25% melee damage, can attack anything they see\n_Antimagic (green):_ -25% damage taken, immune to magical effects\n_Giant (blue):_ -75% damage taken, +1 melee range, cannot move into tunnels\n_Blessed (yellow):_ +200% accuracy, +200% evasion\n_Growing (red):_ +20% accuracy, evasion, damage, and effective HP. Increases by 1% every 3 turns.
|
||||
challenges.champion_enemies_desc=You're not the only one who can level up!\n\n- Regular enemies have a 1/8 chance to spawn with a special champion buff.\n- Champions wake up if they spawn asleep\n- The hero knows when a champion spawns\n- Champions are immune to corruption\n\nThere are six types of champion enemy:\n_Blazing (orange):_ +25% melee damage, ignites on hit, immune to fire, spreads flames on death\n_Projecting (purple):_ +25% melee damage, can attack anything they see\n_Antimagic (green):_ -25% damage taken, immune to magical effects\n_Giant (blue):_ -75% damage taken, +1 melee range, cannot move into tunnels\n_Blessed (yellow):_ +200% accuracy, +200% evasion\n_Growing (red):_ +20% accuracy, evasion, damage, and effective HP. Increases by 1% every 3 turns.
|
||||
|
||||
rankings$record.something=Killed by Something
|
||||
|
|
|
@ -149,6 +149,7 @@ public class Dungeon {
|
|||
}
|
||||
|
||||
public static int challenges;
|
||||
public static int mobsToChampion;
|
||||
|
||||
public static Hero hero;
|
||||
public static Level level;
|
||||
|
@ -171,6 +172,7 @@ public class Dungeon {
|
|||
|
||||
version = Game.versionCode;
|
||||
challenges = SPDSettings.challenges();
|
||||
mobsToChampion = -1;
|
||||
|
||||
seed = DungeonSeed.randomSeed();
|
||||
|
||||
|
@ -448,6 +450,7 @@ public class Dungeon {
|
|||
private static final String VERSION = "version";
|
||||
private static final String SEED = "seed";
|
||||
private static final String CHALLENGES = "challenges";
|
||||
private static final String MOBS_TO_CHAMPION = "mobs_to_champion";
|
||||
private static final String HERO = "hero";
|
||||
private static final String GOLD = "gold";
|
||||
private static final String DEPTH = "depth";
|
||||
|
@ -467,6 +470,7 @@ public class Dungeon {
|
|||
bundle.put( VERSION, version );
|
||||
bundle.put( SEED, seed );
|
||||
bundle.put( CHALLENGES, challenges );
|
||||
bundle.put( MOBS_TO_CHAMPION, mobsToChampion );
|
||||
bundle.put( HERO, hero );
|
||||
bundle.put( GOLD, gold );
|
||||
bundle.put( DEPTH, depth );
|
||||
|
@ -561,6 +565,7 @@ public class Dungeon {
|
|||
QuickSlotButton.reset();
|
||||
|
||||
Dungeon.challenges = bundle.getInt( CHALLENGES );
|
||||
Dungeon.mobsToChampion = bundle.getInt( MOBS_TO_CHAMPION );
|
||||
|
||||
Dungeon.level = null;
|
||||
Dungeon.depth = -1;
|
||||
|
|
|
@ -34,8 +34,6 @@ import com.watabou.utils.Bundle;
|
|||
import com.watabou.utils.PathFinder;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
public abstract class ChampionEnemy extends Buff {
|
||||
|
||||
{
|
||||
|
@ -94,20 +92,12 @@ public abstract class ChampionEnemy extends Buff {
|
|||
immunities.add(Corruption.class);
|
||||
}
|
||||
|
||||
public static void rollForChampion(Mob m, HashSet<Mob> existing){
|
||||
int existingChamps = 0;
|
||||
for (Mob e : existing){
|
||||
if (!e.buffs(ChampionEnemy.class).isEmpty()){
|
||||
existingChamps++;
|
||||
}
|
||||
}
|
||||
public static void rollForChampion(Mob m){
|
||||
if (Dungeon.mobsToChampion <= 0) Dungeon.mobsToChampion = 8;
|
||||
|
||||
//cap of 2/2/3/3/4 champs for each region. Mainly to prevent terrible luck in the earlygame
|
||||
if (existingChamps >= 2 + Dungeon.depth/10){
|
||||
return;
|
||||
}
|
||||
Dungeon.mobsToChampion--;
|
||||
|
||||
if (Random.Int(10) == 0){
|
||||
if (Dungeon.mobsToChampion <= 0){
|
||||
switch (Random.Int(6)){
|
||||
case 0: default: Buff.affect(m, Blazing.class); break;
|
||||
case 1: Buff.affect(m, Projecting.class); break;
|
||||
|
|
|
@ -462,7 +462,7 @@ public abstract class Level implements Bundlable {
|
|||
|
||||
Mob m = Reflection.newInstance(mobsToSpawn.remove(0));
|
||||
if (Dungeon.isChallenged(Challenges.CHAMPION_ENEMIES)){
|
||||
ChampionEnemy.rollForChampion(m, mobs);
|
||||
ChampionEnemy.rollForChampion(m);
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user