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[]) {
return templates[
Math.min(
Math.max(
Math.ceil(
(globalScene.gameMode.getWaveForDifficulty(globalScene.currentBattle?.waveIndex || startingWave, true) - 20) /
30,
),
0,
),
templates.length - 1,
)
];
const { currentBattle, gameMode } = globalScene;
const wave = gameMode.getWaveForDifficulty(currentBattle?.waveIndex || startingWave, true);
const templateIndex = Math.ceil((wave - 20) / 30);
return templates[Phaser.Math.Clamp(templateIndex, 0, templates.length - 1)];
}
export function getGymLeaderPartyTemplate() {

View File

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

View File

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