Add Status Effect overrides for easier testing

This commit is contained in:
Dmitriy 2024-05-15 23:15:19 -04:00
parent d76d7d5989
commit 845aa292a8
2 changed files with 11 additions and 0 deletions

View File

@ -2559,6 +2559,10 @@ export class PlayerPokemon extends Pokemon {
constructor(scene: BattleScene, species: PokemonSpecies, level: integer, abilityIndex: integer, formIndex: integer, gender: Gender, shiny: boolean, variant: Variant, ivs: integer[], nature: Nature, dataSource: Pokemon | PokemonData) {
super(scene, 106, 148, species, level, abilityIndex, formIndex, gender, shiny, variant, ivs, nature, dataSource);
if (Overrides.STATUS_OVERRIDE) {
this.status = new Status(Overrides.STATUS_OVERRIDE)
}
if (Overrides.SHINY_OVERRIDE) {
this.shiny = true;
this.initShinySparkle();
@ -2949,6 +2953,10 @@ export class EnemyPokemon extends Pokemon {
if (boss)
this.setBoss();
if (Overrides.OPP_STATUS_OVERRIDE) {
this.status = new Status(Overrides.OPP_STATUS_OVERRIDE)
}
if (!dataSource) {
this.generateAndPopulateMoveset();

View File

@ -11,6 +11,7 @@ import { Type } from './data/type';
import { Stat } from './data/pokemon-stat';
import { PokeballCounts } from './battle-scene';
import { PokeballType } from './data/pokeball';
import { StatusEffect } from './data/status-effect';
/**
* Overrides for testing different in game situations
@ -58,6 +59,7 @@ export const STARTER_SPECIES_OVERRIDE: Species | integer = 0;
export const ABILITY_OVERRIDE: Abilities = Abilities.NONE;
export const PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
export const MOVESET_OVERRIDE: Array<Moves> = [];
export const STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE;
export const SHINY_OVERRIDE: boolean = false;
export const VARIANT_OVERRIDE: Variant = 0;
@ -69,6 +71,7 @@ export const OPP_SPECIES_OVERRIDE: Species | integer = 0;
export const OPP_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
export const OPP_PASSIVE_ABILITY_OVERRIDE = Abilities.NONE;
export const OPP_MOVESET_OVERRIDE: Array<Moves> = [];
export const OPP_STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE;
export const OPP_SHINY_OVERRIDE: boolean = false;
export const OPP_VARIANT_OVERRIDE: Variant = 0;