[concept] Add framework for conditional boss ultra rares
parent
7d86634bbb
commit
71c131f9a0
|
@ -34,6 +34,15 @@ interface BiomeDepths {
|
|||
[key: integer]: [integer, integer]
|
||||
}
|
||||
|
||||
interface BiomeConditions {
|
||||
[key: integer]: (p: any) => boolean;
|
||||
}
|
||||
|
||||
export const biomeConditions: BiomeConditions = {
|
||||
[Biome.TOWN]: (p) => !!p.scene.getParty().find(p => p.species.speciesId === Species.MEWTWO),
|
||||
[Biome.PLAINS]: () => {return false},
|
||||
}
|
||||
|
||||
export const biomeLinks: BiomeLinks = {
|
||||
[Biome.TOWN]: Biome.PLAINS,
|
||||
[Biome.PLAINS]: [ Biome.GRASS, Biome.METROPOLIS, Biome.LAKE ],
|
||||
|
@ -82,7 +91,8 @@ export enum BiomePoolTier {
|
|||
BOSS,
|
||||
BOSS_RARE,
|
||||
BOSS_SUPER_RARE,
|
||||
BOSS_ULTRA_RARE
|
||||
BOSS_ULTRA_RARE,
|
||||
BOSS_CONDITIONAL_ULTRA_RARE
|
||||
};
|
||||
|
||||
export const uncatchableSpecies: Species[] = [];
|
||||
|
@ -157,7 +167,8 @@ export const biomePokemonPools: BiomePokemonPools = {
|
|||
[BiomePoolTier.BOSS]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [] },
|
||||
[BiomePoolTier.BOSS_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [] },
|
||||
[BiomePoolTier.BOSS_SUPER_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [] },
|
||||
[BiomePoolTier.BOSS_ULTRA_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [] }
|
||||
[BiomePoolTier.BOSS_ULTRA_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [Species.ZEKROM] },
|
||||
[BiomePoolTier.BOSS_CONDITIONAL_ULTRA_RARE]: { [TimeOfDay.DAWN]: [], [TimeOfDay.DAY]: [], [TimeOfDay.DUSK]: [], [TimeOfDay.NIGHT]: [], [TimeOfDay.ALL]: [Species.RESHIRAM]},
|
||||
},
|
||||
[Biome.PLAINS]: {
|
||||
[BiomePoolTier.COMMON]: {
|
||||
|
@ -5126,11 +5137,13 @@ export const biomeTrainerPools: BiomeTrainerPools = {
|
|||
]
|
||||
],
|
||||
[ Species.RESHIRAM, Type.DRAGON, Type.FIRE, [
|
||||
[ Biome.VOLCANO, BiomePoolTier.BOSS_ULTRA_RARE ]
|
||||
[ Biome.VOLCANO, BiomePoolTier.BOSS_ULTRA_RARE ],
|
||||
[ Biome.TOWN, BiomePoolTier.BOSS_CONDITIONAL_ULTRA_RARE ]
|
||||
]
|
||||
],
|
||||
[ Species.ZEKROM, Type.DRAGON, Type.ELECTRIC, [
|
||||
[ Biome.POWER_PLANT, BiomePoolTier.BOSS_ULTRA_RARE ]
|
||||
[ Biome.POWER_PLANT, BiomePoolTier.BOSS_ULTRA_RARE ],
|
||||
[ Biome.TOWN, BiomePoolTier.BOSS_ULTRA_RARE ]
|
||||
]
|
||||
],
|
||||
[ Species.LANDORUS, Type.GROUND, Type.FLYING, [
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import BattleScene from "../battle-scene";
|
||||
import { BiomePoolTier, PokemonPools, BiomeTierTrainerPools, biomePokemonPools, biomeTrainerPools } from "../data/biomes";
|
||||
import { BiomePoolTier, PokemonPools, BiomeTierTrainerPools, biomePokemonPools, biomeTrainerPools, biomeConditions } from "../data/biomes";
|
||||
import { Biome } from "../data/enums/biome";
|
||||
import * as Utils from "../utils";
|
||||
import PokemonSpecies, { getPokemonSpecies } from "../data/pokemon-species";
|
||||
|
@ -68,13 +68,24 @@ export class Arena {
|
|||
const overrideSpecies = this.scene.gameMode.getOverrideSpecies(waveIndex);
|
||||
if (overrideSpecies)
|
||||
return overrideSpecies;
|
||||
const isBoss = !!this.scene.getEncounterBossSegments(waveIndex, level) && !!this.pokemonPool[BiomePoolTier.BOSS].length
|
||||
&& (this.biomeType !== Biome.END || this.scene.gameMode.isClassic || this.scene.gameMode.isWaveFinal(waveIndex));
|
||||
const tierValue = Utils.randSeedInt(!isBoss ? 512 : 64);
|
||||
// const isBoss = !!this.scene.getEncounterBossSegments(waveIndex, level) && !!this.pokemonPool[BiomePoolTier.BOSS].length
|
||||
// && (this.biomeType !== Biome.END || this.scene.gameMode.isClassic || this.scene.gameMode.isWaveFinal(waveIndex));
|
||||
const isBoss = true; // OVERIDE
|
||||
// const tierValue = Utils.randSeedInt(!isBoss ? 512 : 64);
|
||||
// let tier = !isBoss
|
||||
// ? tierValue >= 156 ? BiomePoolTier.COMMON : tierValue >= 32 ? BiomePoolTier.UNCOMMON : tierValue >= 6 ? BiomePoolTier.RARE : tierValue >= 1 ? BiomePoolTier.SUPER_RARE : BiomePoolTier.ULTRA_RARE
|
||||
// : tierValue >= 20 ? BiomePoolTier.BOSS : tierValue >= 6 ? BiomePoolTier.BOSS_RARE : tierValue >= 1 ? BiomePoolTier.BOSS_SUPER_RARE : BiomePoolTier.BOSS_ULTRA_RARE;
|
||||
const tierValue = 0; // Utils.randSeedInt(!isBoss ? 512 : 128); OVERRIDE
|
||||
let tier = !isBoss
|
||||
? tierValue >= 156 ? BiomePoolTier.COMMON : tierValue >= 32 ? BiomePoolTier.UNCOMMON : tierValue >= 6 ? BiomePoolTier.RARE : tierValue >= 1 ? BiomePoolTier.SUPER_RARE : BiomePoolTier.ULTRA_RARE
|
||||
: tierValue >= 20 ? BiomePoolTier.BOSS : tierValue >= 6 ? BiomePoolTier.BOSS_RARE : tierValue >= 1 ? BiomePoolTier.BOSS_SUPER_RARE : BiomePoolTier.BOSS_ULTRA_RARE;
|
||||
: tierValue >= 40 ? BiomePoolTier.BOSS : tierValue >= 12 ? BiomePoolTier.BOSS_RARE : tierValue >= 2 ? BiomePoolTier.BOSS_SUPER_RARE : tierValue >= 1 ? BiomePoolTier.BOSS_ULTRA_RARE :
|
||||
biomeConditions[this.biomeType](this) ? BiomePoolTier.BOSS_CONDITIONAL_ULTRA_RARE : BiomePoolTier.BOSS_ULTRA_RARE;
|
||||
console.log("this.scene: " + this.scene);
|
||||
console.log("this.scene get party " + this.scene.getParty());
|
||||
console.log("biome condition: " + biomeConditions[this.biomeType](this));
|
||||
console.log(BiomePoolTier[tier]);
|
||||
console.log(this.pokemonPool);
|
||||
console.log(this.pokemonPool[tier]);
|
||||
while (!this.pokemonPool[tier].length) {
|
||||
console.log(`Downgraded rarity tier from ${BiomePoolTier[tier]} to ${BiomePoolTier[tier - 1]}`);
|
||||
tier--;
|
||||
|
|
Loading…
Reference in New Issue