mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-05-13 11:53:50 +01:00
[Balance][Refactor] Move fixed boss waves enum to file, adjust GL templates (#5689)
* Move fixed boss waves enum to file, adjust GL templates * Move post return to default case * Address comment --------- Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>
This commit is contained in:
parent
389ad6ceb6
commit
b49c994d2d
@ -31,29 +31,7 @@ import type { CustomModifierSettings } from "#app/modifier/modifier-type";
|
|||||||
import { ModifierTier } from "#app/modifier/modifier-tier";
|
import { ModifierTier } from "#app/modifier/modifier-tier";
|
||||||
import type { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
import type { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||||
import { BattleType } from "#enums/battle-type";
|
import { BattleType } from "#enums/battle-type";
|
||||||
|
import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves";
|
||||||
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,
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum BattlerIndex {
|
export enum BattlerIndex {
|
||||||
ATTACKER = -1,
|
ATTACKER = -1,
|
||||||
|
@ -8,7 +8,8 @@ import { speciesStarterCosts } from "#app/data/balance/starters";
|
|||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { PokemonMove } from "#app/field/pokemon";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
import type { FixedBattleConfig } from "#app/battle";
|
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 { BattleType } from "#enums/battle-type";
|
||||||
import Trainer, { TrainerVariant } from "#app/field/trainer";
|
import Trainer, { TrainerVariant } from "#app/field/trainer";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { startingWave } from "#app/starting-wave";
|
import { startingWave } from "#app/starting-wave";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { PartyMemberStrength } from "#enums/party-member-strength";
|
import { PartyMemberStrength } from "#enums/party-member-strength";
|
||||||
|
import { GameModes } from "#app/game-mode";
|
||||||
|
import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves";
|
||||||
|
|
||||||
export class TrainerPartyTemplate {
|
export class TrainerPartyTemplate {
|
||||||
public size: number;
|
public size: number;
|
||||||
@ -165,6 +167,11 @@ export const trainerPartyTemplates = {
|
|||||||
new TrainerPartyTemplate(1, PartyMemberStrength.STRONGER),
|
new TrainerPartyTemplate(1, PartyMemberStrength.STRONGER),
|
||||||
),
|
),
|
||||||
GYM_LEADER_5: new TrainerPartyCompoundTemplate(
|
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(3, PartyMemberStrength.AVERAGE),
|
||||||
new TrainerPartyTemplate(2, PartyMemberStrength.STRONG),
|
new TrainerPartyTemplate(2, PartyMemberStrength.STRONG),
|
||||||
new TrainerPartyTemplate(1, PartyMemberStrength.STRONGER),
|
new TrainerPartyTemplate(1, PartyMemberStrength.STRONGER),
|
||||||
@ -222,19 +229,18 @@ export const trainerPartyTemplates = {
|
|||||||
*/
|
*/
|
||||||
export function getEvilGruntPartyTemplate(): TrainerPartyTemplate {
|
export function getEvilGruntPartyTemplate(): TrainerPartyTemplate {
|
||||||
const waveIndex = globalScene.currentBattle?.waveIndex;
|
const waveIndex = globalScene.currentBattle?.waveIndex;
|
||||||
if (waveIndex < 40) {
|
switch (waveIndex) {
|
||||||
|
case ClassicFixedBossWaves.EVIL_GRUNT_1:
|
||||||
return trainerPartyTemplates.TWO_AVG;
|
return trainerPartyTemplates.TWO_AVG;
|
||||||
}
|
case ClassicFixedBossWaves.EVIL_GRUNT_2:
|
||||||
if (waveIndex < 63) {
|
|
||||||
return trainerPartyTemplates.THREE_AVG;
|
return trainerPartyTemplates.THREE_AVG;
|
||||||
}
|
case ClassicFixedBossWaves.EVIL_GRUNT_3:
|
||||||
if (waveIndex < 65) {
|
|
||||||
return trainerPartyTemplates.TWO_AVG_ONE_STRONG;
|
return trainerPartyTemplates.TWO_AVG_ONE_STRONG;
|
||||||
}
|
case ClassicFixedBossWaves.EVIL_ADMIN_1:
|
||||||
if (waveIndex < 112) {
|
|
||||||
return trainerPartyTemplates.GYM_LEADER_4; // 3avg 1 strong 1 stronger
|
return trainerPartyTemplates.GYM_LEADER_4; // 3avg 1 strong 1 stronger
|
||||||
|
default:
|
||||||
|
return trainerPartyTemplates.GYM_LEADER_6; // 3 avg 2 strong 1 stronger
|
||||||
}
|
}
|
||||||
return trainerPartyTemplates.GYM_LEADER_5; // 3 avg 2 strong 1 stronger
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getWavePartyTemplate(...templates: TrainerPartyTemplate[]) {
|
export function getWavePartyTemplate(...templates: TrainerPartyTemplate[]) {
|
||||||
@ -245,11 +251,40 @@ export function getWavePartyTemplate(...templates: TrainerPartyTemplate[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getGymLeaderPartyTemplate() {
|
export function getGymLeaderPartyTemplate() {
|
||||||
|
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(
|
return getWavePartyTemplate(
|
||||||
trainerPartyTemplates.GYM_LEADER_1,
|
trainerPartyTemplates.GYM_LEADER_1,
|
||||||
trainerPartyTemplates.GYM_LEADER_2,
|
trainerPartyTemplates.GYM_LEADER_2,
|
||||||
trainerPartyTemplates.GYM_LEADER_3,
|
trainerPartyTemplates.GYM_LEADER_3,
|
||||||
trainerPartyTemplates.GYM_LEADER_4,
|
trainerPartyTemplates.GYM_LEADER_4,
|
||||||
trainerPartyTemplates.GYM_LEADER_5,
|
trainerPartyTemplates.GYM_LEADER_5,
|
||||||
|
trainerPartyTemplates.GYM_LEADER_6,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
22
src/enums/fixed-boss-waves.ts
Normal file
22
src/enums/fixed-boss-waves.ts
Normal file
@ -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 type { BattlerIndex } from "#app/battle";
|
||||||
import { ClassicFixedBossWaves } from "#app/battle";
|
import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves";
|
||||||
import { BattleType } from "#enums/battle-type";
|
import { BattleType } from "#enums/battle-type";
|
||||||
import type { CustomModifierSettings } from "#app/modifier/modifier-type";
|
import type { CustomModifierSettings } from "#app/modifier/modifier-type";
|
||||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user