mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 22:02:18 +02:00
added override gender and arena tint (day & night)
This commit is contained in:
parent
3fd1ecf6a7
commit
c7b77a4dc1
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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<Moves> = [];
|
||||
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<Moves> = [];
|
||||
export const OPP_SHINY_OVERRIDE: boolean = false;
|
||||
export const OPP_VARIANT_OVERRIDE: Variant = 0;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user