add override for forcing switches

This commit is contained in:
snoozbuster 2024-08-02 19:06:40 -07:00
parent dff0e9179d
commit f428fd114c
2 changed files with 10 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import i18next from "i18next";
import { PartyMemberStrength } from "#enums/party-member-strength"; import { PartyMemberStrength } from "#enums/party-member-strength";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { TrainerType } from "#enums/trainer-type"; import { TrainerType } from "#enums/trainer-type";
import Overrides from "#app/overrides";
export enum TrainerVariant { export enum TrainerVariant {
DEFAULT, DEFAULT,
@ -429,6 +430,10 @@ export default class Trainer extends Phaser.GameObjects.Container {
} }
getPartyMemberMatchupScores(trainerSlot: TrainerSlot = TrainerSlot.NONE, forSwitch: boolean = false): [integer, integer][] { getPartyMemberMatchupScores(trainerSlot: TrainerSlot = TrainerSlot.NONE, forSwitch: boolean = false): [integer, integer][] {
if (Overrides.TRAINER_ALWAYS_SWITCHES) {
return [[1, 100], [1, 100]];
}
if (trainerSlot && !this.isDouble()) { if (trainerSlot && !this.isDouble()) {
trainerSlot = TrainerSlot.NONE; trainerSlot = TrainerSlot.NONE;
} }

View File

@ -116,6 +116,11 @@ class DefaultOverrides {
readonly OPP_VARIANT_OVERRIDE: Variant = 0; readonly OPP_VARIANT_OVERRIDE: Variant = 0;
readonly OPP_IVS_OVERRIDE: integer | integer[] = []; readonly OPP_IVS_OVERRIDE: integer | integer[] = [];
// --------------------------
// TRAINER/AI OVERRIDES
// --------------------------
readonly TRAINER_ALWAYS_SWITCHES: boolean = false;
// ------------- // -------------
// EGG OVERRIDES // EGG OVERRIDES
// ------------- // -------------