mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-20 23:32:19 +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)
|
if (Overrides.OPP_SPECIES_OVERRIDE)
|
||||||
species = getPokemonSpecies(Overrides.OPP_SPECIES_OVERRIDE);
|
species = getPokemonSpecies(Overrides.OPP_SPECIES_OVERRIDE);
|
||||||
const pokemon = new EnemyPokemon(this, species, level, trainerSlot, boss, dataSource);
|
const pokemon = new EnemyPokemon(this, species, level, trainerSlot, boss, dataSource);
|
||||||
|
if (Overrides.OPP_GENDER_OVERRIDE) {
|
||||||
|
pokemon.gender = Overrides.OPP_GENDER_OVERRIDE;
|
||||||
|
}
|
||||||
overrideModifiers(this, false);
|
overrideModifiers(this, false);
|
||||||
overrideHeldItems(this, pokemon, false);
|
overrideHeldItems(this, pokemon, false);
|
||||||
if (boss && !dataSource) {
|
if (boss && !dataSource) {
|
||||||
|
@ -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] {
|
getDayTint(): [integer, integer, integer] {
|
||||||
|
if (Overrides.ARENA_TINT_OVERRIDE) return this.overrideTint();
|
||||||
switch (this.biomeType) {
|
switch (this.biomeType) {
|
||||||
case Biome.ABYSS:
|
case Biome.ABYSS:
|
||||||
return [ 64, 64, 64 ];
|
return [ 64, 64, 64 ];
|
||||||
@ -452,6 +472,7 @@ export class Arena {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getDuskTint(): [integer, integer, integer] {
|
getDuskTint(): [integer, integer, integer] {
|
||||||
|
if (Overrides.ARENA_TINT_OVERRIDE) return this.overrideTint();
|
||||||
if (!this.isOutside())
|
if (!this.isOutside())
|
||||||
return [ 0, 0, 0 ];
|
return [ 0, 0, 0 ];
|
||||||
|
|
||||||
@ -462,6 +483,7 @@ export class Arena {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getNightTint(): [integer, integer, integer] {
|
getNightTint(): [integer, integer, integer] {
|
||||||
|
if (Overrides.ARENA_TINT_OVERRIDE) return this.overrideTint();
|
||||||
switch (this.biomeType) {
|
switch (this.biomeType) {
|
||||||
case Biome.ABYSS:
|
case Biome.ABYSS:
|
||||||
case Biome.SPACE:
|
case Biome.SPACE:
|
||||||
|
@ -11,6 +11,8 @@ import { Type } from './data/type';
|
|||||||
import {Stat} from './data/pokemon-stat';
|
import {Stat} from './data/pokemon-stat';
|
||||||
import {PokeballCounts} from './battle-scene';
|
import {PokeballCounts} from './battle-scene';
|
||||||
import {PokeballType} from './data/pokeball';
|
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
|
* 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 DOUBLE_BATTLE_OVERRIDE: boolean = false;
|
||||||
export const STARTING_WAVE_OVERRIDE: integer = 0;
|
export const STARTING_WAVE_OVERRIDE: integer = 0;
|
||||||
export const STARTING_BIOME_OVERRIDE: Biome = Biome.TOWN;
|
export const STARTING_BIOME_OVERRIDE: Biome = Biome.TOWN;
|
||||||
|
export const ARENA_TINT_OVERRIDE: TimeOfDay = TimeOfDay.NIGHT;
|
||||||
// default 1000
|
// default 1000
|
||||||
export const STARTING_MONEY_OVERRIDE: integer = 0;
|
export const STARTING_MONEY_OVERRIDE: integer = 0;
|
||||||
export const POKEBALL_OVERRIDE: { active: boolean, pokeballs: PokeballCounts } = {
|
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 STARTER_SPECIES_OVERRIDE: Species | integer = 0;
|
||||||
export const ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
export const ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||||
export const PASSIVE_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 MOVESET_OVERRIDE: Array<Moves> = [];
|
||||||
export const SHINY_OVERRIDE: boolean = false;
|
export const SHINY_OVERRIDE: boolean = false;
|
||||||
export const VARIANT_OVERRIDE: Variant = 0;
|
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_SPECIES_OVERRIDE: Species | integer = 0;
|
||||||
export const OPP_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
export const OPP_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||||
export const OPP_PASSIVE_ABILITY_OVERRIDE = 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_MOVESET_OVERRIDE: Array<Moves> = [];
|
||||||
export const OPP_SHINY_OVERRIDE: boolean = false;
|
export const OPP_SHINY_OVERRIDE: boolean = false;
|
||||||
export const OPP_VARIANT_OVERRIDE: Variant = 0;
|
export const OPP_VARIANT_OVERRIDE: Variant = 0;
|
||||||
|
@ -518,8 +518,9 @@ export class SelectStarterPhase extends Phase {
|
|||||||
const starterGender = starter.species.malePercent !== null
|
const starterGender = starter.species.malePercent !== null
|
||||||
? !starterProps.female ? Gender.MALE : Gender.FEMALE
|
? !starterProps.female ? Gender.MALE : Gender.FEMALE
|
||||||
: Gender.GENDERLESS;
|
: Gender.GENDERLESS;
|
||||||
|
const genderOverride = Overrides.GENDER_OVERRIDE;
|
||||||
const starterIvs = this.scene.gameData.dexData[starter.species.speciesId].ivs.slice(0);
|
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);
|
starterPokemon.tryPopulateMoveset(starter.moveset);
|
||||||
if (starter.passive)
|
if (starter.passive)
|
||||||
starterPokemon.passive = true;
|
starterPokemon.passive = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user