diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 0f75447a500..d6563cbada8 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -633,6 +633,9 @@ export default class BattleScene extends SceneBase { if (Overrides.OPP_SPECIES_OVERRIDE) species = getPokemonSpecies(Overrides.OPP_SPECIES_OVERRIDE); const pokemon = new EnemyPokemon(this, species, level, trainerSlot, boss, dataSource); + if (Overrides.OPP_GENDER_OVERRIDE) { + pokemon.gender = Overrides.OPP_GENDER_OVERRIDE; + } overrideModifiers(this, false); overrideHeldItems(this, pokemon, false); if (boss && !dataSource) { @@ -946,7 +949,7 @@ export default class BattleScene extends SceneBase { this.pushPhase(new LevelCapPhase(this)); } } - + return this.currentBattle; } diff --git a/src/field/arena.ts b/src/field/arena.ts index 75cc86fcebc..0fee01dccb7 100644 --- a/src/field/arena.ts +++ b/src/field/arena.ts @@ -442,7 +442,27 @@ export class Arena { } } + overrideTint(): [integer, integer, integer] { + if (!Overrides.ARENA_TINT_OVERRIDE) return; + let ret; + switch(Overrides.ARENA_TINT_OVERRIDE) { + case TimeOfDay.DUSK: + ret = [ 98, 48, 73 ].map(c => Math.round((c + 128) / 2)) as [integer, integer, integer]; + break + case (TimeOfDay.NIGHT): + ret = [ 64, 64, 64 ]; + break + case TimeOfDay.DAWN: + case TimeOfDay.DAY: + default: + ret = [ 128, 128, 128 ]; + break + } + return ret; + } + getDayTint(): [integer, integer, integer] { + if (Overrides.ARENA_TINT_OVERRIDE) return this.overrideTint(); switch (this.biomeType) { case Biome.ABYSS: return [ 64, 64, 64 ]; @@ -452,6 +472,7 @@ export class Arena { } getDuskTint(): [integer, integer, integer] { + if (Overrides.ARENA_TINT_OVERRIDE) return this.overrideTint(); if (!this.isOutside()) return [ 0, 0, 0 ]; @@ -462,6 +483,7 @@ export class Arena { } getNightTint(): [integer, integer, integer] { + if (Overrides.ARENA_TINT_OVERRIDE) return this.overrideTint(); switch (this.biomeType) { case Biome.ABYSS: case Biome.SPACE: diff --git a/src/overrides.ts b/src/overrides.ts index b7307ab2f7f..bf88251575b 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -1,16 +1,18 @@ -import { Species } from './data/enums/species'; -import { Abilities } from "./data/enums/abilities"; -import { Biome } from "./data/enums/biome"; -import { Moves } from "./data/enums/moves"; -import { WeatherType } from "./data/weather"; -import { Variant } from './data/variant'; -import { BerryType } from './data/berry'; -import { TempBattleStat } from './data/temp-battle-stat'; -import { Nature } from './data/nature'; -import { Type } from './data/type'; -import { Stat } from './data/pokemon-stat'; -import { PokeballCounts } from './battle-scene'; -import { PokeballType } from './data/pokeball'; +import {Species} from './data/enums/species'; +import {Abilities} from "./data/enums/abilities"; +import {Biome} from "./data/enums/biome"; +import {Moves} from "./data/enums/moves"; +import {WeatherType} from "./data/weather"; +import {Variant} from './data/variant'; +import {BerryType} from './data/berry'; +import {TempBattleStat} from './data/temp-battle-stat'; +import {Nature} from './data/nature'; +import {Type} from './data/type'; +import {Stat} from './data/pokemon-stat'; +import {PokeballCounts} from './battle-scene'; +import {PokeballType} from './data/pokeball'; +import {Gender} from "#app/data/gender"; +import {TimeOfDay} from "#app/data/enums/time-of-day"; /** * Overrides for testing different in game situations @@ -27,6 +29,7 @@ export const WEATHER_OVERRIDE: WeatherType = WeatherType.NONE; export const DOUBLE_BATTLE_OVERRIDE: boolean = false; export const STARTING_WAVE_OVERRIDE: integer = 0; export const STARTING_BIOME_OVERRIDE: Biome = Biome.TOWN; +export const ARENA_TINT_OVERRIDE: TimeOfDay = TimeOfDay.NIGHT; // default 1000 export const STARTING_MONEY_OVERRIDE: integer = 0; export const POKEBALL_OVERRIDE: { active: boolean, pokeballs: PokeballCounts } = { @@ -57,6 +60,7 @@ export const STARTING_LEVEL_OVERRIDE: integer = 0; 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 GENDER_OVERRIDE: Gender = 0; export const MOVESET_OVERRIDE: Array = []; export const SHINY_OVERRIDE: boolean = false; export const VARIANT_OVERRIDE: Variant = 0; @@ -68,6 +72,7 @@ export const VARIANT_OVERRIDE: Variant = 0; 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_GENDER_OVERRIDE: Gender = 0; export const OPP_MOVESET_OVERRIDE: Array = []; export const OPP_SHINY_OVERRIDE: boolean = false; export const OPP_VARIANT_OVERRIDE: Variant = 0; diff --git a/src/phases.ts b/src/phases.ts index b861c82f0e8..2c8cbfcbc54 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -518,8 +518,9 @@ export class SelectStarterPhase extends Phase { const starterGender = starter.species.malePercent !== null ? !starterProps.female ? Gender.MALE : Gender.FEMALE : Gender.GENDERLESS; + const genderOverride = Overrides.GENDER_OVERRIDE; const starterIvs = this.scene.gameData.dexData[starter.species.speciesId].ivs.slice(0); - const starterPokemon = this.scene.addPlayerPokemon(starter.species, this.scene.gameMode.getStartingLevel(), starter.abilityIndex, starterFormIndex, starterGender, starterProps.shiny, starterProps.variant, starterIvs, starter.nature); + const starterPokemon = this.scene.addPlayerPokemon(starter.species, this.scene.gameMode.getStartingLevel(), starter.abilityIndex, starterFormIndex, genderOverride || starterGender, starterProps.shiny, starterProps.variant, starterIvs, starter.nature); starterPokemon.tryPopulateMoveset(starter.moveset); if (starter.passive) starterPokemon.passive = true;