Merge 72e92df4fb
into 110fd2f0a1
This commit is contained in:
commit
309e2dd023
|
@ -31,29 +31,7 @@ import type { CustomModifierSettings } from "#app/modifier/modifier-type";
|
|||
import { ModifierTier } from "#app/modifier/modifier-tier";
|
||||
import type { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||
import { BattleType } from "#enums/battle-type";
|
||||
|
||||
export enum ClassicFixedBossWaves {
|
||||
TOWN_YOUNGSTER = 5,
|
||||
RIVAL_1 = 8,
|
||||
RIVAL_2 = 25,
|
||||
EVIL_GRUNT_1 = 35,
|
||||
RIVAL_3 = 55,
|
||||
EVIL_GRUNT_2 = 62,
|
||||
EVIL_GRUNT_3 = 64,
|
||||
EVIL_ADMIN_1 = 66,
|
||||
RIVAL_4 = 95,
|
||||
EVIL_GRUNT_4 = 112,
|
||||
EVIL_ADMIN_2 = 114,
|
||||
EVIL_BOSS_1 = 115,
|
||||
RIVAL_5 = 145,
|
||||
EVIL_BOSS_2 = 165,
|
||||
ELITE_FOUR_1 = 182,
|
||||
ELITE_FOUR_2 = 184,
|
||||
ELITE_FOUR_3 = 186,
|
||||
ELITE_FOUR_4 = 188,
|
||||
CHAMPION = 190,
|
||||
RIVAL_6 = 195,
|
||||
}
|
||||
import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves";
|
||||
|
||||
export enum BattlerIndex {
|
||||
ATTACKER = -1,
|
||||
|
|
|
@ -8,7 +8,8 @@ import { speciesStarterCosts } from "#app/data/balance/starters";
|
|||
import type Pokemon from "#app/field/pokemon";
|
||||
import { PokemonMove } from "#app/field/pokemon";
|
||||
import type { FixedBattleConfig } from "#app/battle";
|
||||
import { ClassicFixedBossWaves, getRandomTrainerFunc } from "#app/battle";
|
||||
import { getRandomTrainerFunc } from "#app/battle";
|
||||
import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves";
|
||||
import { BattleType } from "#enums/battle-type";
|
||||
import Trainer, { TrainerVariant } from "#app/field/trainer";
|
||||
import { PokemonType } from "#enums/pokemon-type";
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import { startingWave } from "#app/starting-wave";
|
||||
import { globalScene } from "#app/global-scene";
|
||||
import { PartyMemberStrength } from "#enums/party-member-strength";
|
||||
import { GameModes } from "#app/game-mode";
|
||||
import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves";
|
||||
|
||||
export class TrainerPartyTemplate {
|
||||
public size: number;
|
||||
|
@ -165,6 +167,11 @@ export const trainerPartyTemplates = {
|
|||
new TrainerPartyTemplate(1, PartyMemberStrength.STRONGER),
|
||||
),
|
||||
GYM_LEADER_5: new TrainerPartyCompoundTemplate(
|
||||
new TrainerPartyTemplate(4, PartyMemberStrength.AVERAGE),
|
||||
new TrainerPartyTemplate(1, PartyMemberStrength.STRONG),
|
||||
new TrainerPartyTemplate(1, PartyMemberStrength.STRONGER),
|
||||
),
|
||||
GYM_LEADER_6: new TrainerPartyCompoundTemplate(
|
||||
new TrainerPartyTemplate(3, PartyMemberStrength.AVERAGE),
|
||||
new TrainerPartyTemplate(2, PartyMemberStrength.STRONG),
|
||||
new TrainerPartyTemplate(1, PartyMemberStrength.STRONGER),
|
||||
|
@ -222,19 +229,18 @@ export const trainerPartyTemplates = {
|
|||
*/
|
||||
export function getEvilGruntPartyTemplate(): TrainerPartyTemplate {
|
||||
const waveIndex = globalScene.currentBattle?.waveIndex;
|
||||
if (waveIndex < 40) {
|
||||
return trainerPartyTemplates.TWO_AVG;
|
||||
switch (waveIndex) {
|
||||
case ClassicFixedBossWaves.EVIL_GRUNT_1:
|
||||
return trainerPartyTemplates.TWO_AVG;
|
||||
case ClassicFixedBossWaves.EVIL_GRUNT_2:
|
||||
return trainerPartyTemplates.THREE_AVG;
|
||||
case ClassicFixedBossWaves.EVIL_GRUNT_3:
|
||||
return trainerPartyTemplates.TWO_AVG_ONE_STRONG;
|
||||
case ClassicFixedBossWaves.EVIL_ADMIN_1:
|
||||
return trainerPartyTemplates.GYM_LEADER_4; // 3avg 1 strong 1 stronger
|
||||
default:
|
||||
return trainerPartyTemplates.GYM_LEADER_6; // 3 avg 2 strong 1 stronger
|
||||
}
|
||||
if (waveIndex < 63) {
|
||||
return trainerPartyTemplates.THREE_AVG;
|
||||
}
|
||||
if (waveIndex < 65) {
|
||||
return trainerPartyTemplates.TWO_AVG_ONE_STRONG;
|
||||
}
|
||||
if (waveIndex < 112) {
|
||||
return trainerPartyTemplates.GYM_LEADER_4; // 3avg 1 strong 1 stronger
|
||||
}
|
||||
return trainerPartyTemplates.GYM_LEADER_5; // 3 avg 2 strong 1 stronger
|
||||
}
|
||||
|
||||
export function getWavePartyTemplate(...templates: TrainerPartyTemplate[]) {
|
||||
|
@ -245,11 +251,40 @@ export function getWavePartyTemplate(...templates: TrainerPartyTemplate[]) {
|
|||
}
|
||||
|
||||
export function getGymLeaderPartyTemplate() {
|
||||
return getWavePartyTemplate(
|
||||
trainerPartyTemplates.GYM_LEADER_1,
|
||||
trainerPartyTemplates.GYM_LEADER_2,
|
||||
trainerPartyTemplates.GYM_LEADER_3,
|
||||
trainerPartyTemplates.GYM_LEADER_4,
|
||||
trainerPartyTemplates.GYM_LEADER_5,
|
||||
);
|
||||
const { currentBattle, gameMode } = globalScene;
|
||||
switch (gameMode.modeId) {
|
||||
case GameModes.DAILY:
|
||||
if (currentBattle?.waveIndex <= 20) {
|
||||
return trainerPartyTemplates.GYM_LEADER_2
|
||||
}
|
||||
return trainerPartyTemplates.GYM_LEADER_3;
|
||||
case GameModes.CHALLENGE: // In the future, there may be a ChallengeType to call here. For now, use classic's.
|
||||
case GameModes.CLASSIC:
|
||||
if (currentBattle?.waveIndex <= 20) {
|
||||
return trainerPartyTemplates.GYM_LEADER_1; // 1 avg 1 strong
|
||||
}
|
||||
else if (currentBattle?.waveIndex <= 30) {
|
||||
return trainerPartyTemplates.GYM_LEADER_2; // 1 avg 1 strong 1 stronger
|
||||
}
|
||||
else if (currentBattle?.waveIndex <= 60) { // 50 and 60
|
||||
return trainerPartyTemplates.GYM_LEADER_3; // 2 avg 1 strong 1 stronger
|
||||
}
|
||||
else if (currentBattle?.waveIndex <= 80) {
|
||||
return trainerPartyTemplates.GYM_LEADER_4; // 3 avg 1 strong 1 stronger
|
||||
}
|
||||
else if (currentBattle?.waveIndex <= 90) {
|
||||
return trainerPartyTemplates.GYM_LEADER_5; // 4 avg 1 strong 1 stronger
|
||||
}
|
||||
// 110+
|
||||
return trainerPartyTemplates.GYM_LEADER_6; // 3 avg 2 strong 1 stronger
|
||||
default:
|
||||
return getWavePartyTemplate(
|
||||
trainerPartyTemplates.GYM_LEADER_1,
|
||||
trainerPartyTemplates.GYM_LEADER_2,
|
||||
trainerPartyTemplates.GYM_LEADER_3,
|
||||
trainerPartyTemplates.GYM_LEADER_4,
|
||||
trainerPartyTemplates.GYM_LEADER_5,
|
||||
trainerPartyTemplates.GYM_LEADER_6,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
export enum ClassicFixedBossWaves {
|
||||
TOWN_YOUNGSTER = 5,
|
||||
RIVAL_1 = 8,
|
||||
RIVAL_2 = 25,
|
||||
EVIL_GRUNT_1 = 35,
|
||||
RIVAL_3 = 55,
|
||||
EVIL_GRUNT_2 = 62,
|
||||
EVIL_GRUNT_3 = 64,
|
||||
EVIL_ADMIN_1 = 66,
|
||||
RIVAL_4 = 95,
|
||||
EVIL_GRUNT_4 = 112,
|
||||
EVIL_ADMIN_2 = 114,
|
||||
EVIL_BOSS_1 = 115,
|
||||
RIVAL_5 = 145,
|
||||
EVIL_BOSS_2 = 165,
|
||||
ELITE_FOUR_1 = 182,
|
||||
ELITE_FOUR_2 = 184,
|
||||
ELITE_FOUR_3 = 186,
|
||||
ELITE_FOUR_4 = 188,
|
||||
CHAMPION = 190,
|
||||
RIVAL_6 = 195
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
import type { BattlerIndex } from "#app/battle";
|
||||
import { ClassicFixedBossWaves } from "#app/battle";
|
||||
import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves";
|
||||
import { BattleType } from "#enums/battle-type";
|
||||
import type { CustomModifierSettings } from "#app/modifier/modifier-type";
|
||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||
|
|
Loading…
Reference in New Issue