Apply kev's suggestions from code review

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
Sirz Benjie 2025-03-28 23:02:43 -05:00
parent 38a273a6cc
commit d8af010dbb
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E
3 changed files with 7 additions and 15 deletions

View File

@ -238,18 +238,10 @@ export function getEvilGruntPartyTemplate(): TrainerPartyTemplate {
} }
export function getWavePartyTemplate(...templates: TrainerPartyTemplate[]) { export function getWavePartyTemplate(...templates: TrainerPartyTemplate[]) {
return templates[ const { currentBattle, gameMode } = globalScene;
Math.min( const wave = gameMode.getWaveForDifficulty(currentBattle?.waveIndex || startingWave, true);
Math.max( const templateIndex = Math.ceil((wave - 20) / 30);
Math.ceil( return templates[Phaser.Math.Clamp(templateIndex, 0, templates.length - 1)];
(globalScene.gameMode.getWaveForDifficulty(globalScene.currentBattle?.waveIndex || startingWave, true) - 20) /
30,
),
0,
),
templates.length - 1,
)
];
} }
export function getGymLeaderPartyTemplate() { export function getGymLeaderPartyTemplate() {

View File

@ -123,7 +123,7 @@ const GALACTIC: TrainerTierPools = {
[TrainerPoolTier.RARE]: [Species.SPIRITOMB, Species.URSALUNA, Species.SNEASLER, Species.HISUI_LILLIGANT], [TrainerPoolTier.RARE]: [Species.SPIRITOMB, Species.URSALUNA, Species.SNEASLER, Species.HISUI_LILLIGANT],
}; };
const PLASMA_ZINZOLAN: TrainerTierPools = { const PLASMA_ZINZOLIN: TrainerTierPools = {
[TrainerPoolTier.COMMON]: [ [TrainerPoolTier.COMMON]: [
Species.GIGALITH, Species.GIGALITH,
Species.CONKELDURR, Species.CONKELDURR,
@ -422,7 +422,7 @@ export const evilAdminTrainerPools: Record<EvilTeam, TrainerTierPools> = {
magma: MAGMA, magma: MAGMA,
aqua: AQUA, aqua: AQUA,
galactic: GALACTIC, galactic: GALACTIC,
plasma_zinzolan: PLASMA_ZINZOLAN, plasma_zinzolin: PLASMA_ZINZOLIN,
plasma_colress: PLASMA_COLRESS, plasma_colress: PLASMA_COLRESS,
flare: FLARE, flare: FLARE,
aether: AETHER, aether: AETHER,

View File

@ -2181,7 +2181,7 @@ export const trainerConfigs: TrainerConfigs = {
}), }),
[TrainerType.ZINZOLIN]: new TrainerConfig(++t) [TrainerType.ZINZOLIN]: new TrainerConfig(++t)
.setMoneyMultiplier(1.5) .setMoneyMultiplier(1.5)
.initForEvilTeamAdmin("plasma_sage", "plasma_zinzolan", [Species.CRYOGONAL]) .initForEvilTeamAdmin("plasma_sage", "plasma_zinzolin", [Species.CRYOGONAL])
.setEncounterBgm(TrainerType.PLASMA_GRUNT) .setEncounterBgm(TrainerType.PLASMA_GRUNT)
.setBattleBgm("battle_plasma_grunt") .setBattleBgm("battle_plasma_grunt")
.setMixedBattleBgm("battle_plasma_grunt") .setMixedBattleBgm("battle_plasma_grunt")