mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-15 06:15:22 +00:00
[Misc] OPP_FORM_OVERRIDES
now accepts 0 as a valid form index (#5514)
This commit is contained in:
parent
4e1ee9e50b
commit
e8e0041ed0
@ -6916,10 +6916,10 @@ export class EnemyPokemon extends Pokemon {
|
||||
|
||||
if (
|
||||
speciesId in Overrides.OPP_FORM_OVERRIDES &&
|
||||
Overrides.OPP_FORM_OVERRIDES[speciesId] &&
|
||||
!isNullOrUndefined(Overrides.OPP_FORM_OVERRIDES[speciesId]) &&
|
||||
this.species.forms[Overrides.OPP_FORM_OVERRIDES[speciesId]]
|
||||
) {
|
||||
this.formIndex = Overrides.OPP_FORM_OVERRIDES[speciesId] ?? 0;
|
||||
this.formIndex = Overrides.OPP_FORM_OVERRIDES[speciesId];
|
||||
}
|
||||
|
||||
if (!dataSource) {
|
||||
|
@ -1,5 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
/* eslint-disable @typescript-eslint/consistent-type-imports */
|
||||
import { type PokeballCounts } from "#app/battle-scene";
|
||||
import { EvolutionItem } from "#app/data/balance/pokemon-evolutions";
|
||||
import { Gender } from "#app/data/gender";
|
||||
|
@ -53,6 +53,7 @@ export class SelectStarterPhase extends Phase {
|
||||
let starterFormIndex = Math.min(starterProps.formIndex, Math.max(starter.species.forms.length - 1, 0));
|
||||
if (
|
||||
starter.species.speciesId in Overrides.STARTER_FORM_OVERRIDES &&
|
||||
!Utils.isNullOrUndefined(Overrides.STARTER_FORM_OVERRIDES[starter.species.speciesId]) &&
|
||||
starter.species.forms[Overrides.STARTER_FORM_OVERRIDES[starter.species.speciesId]!]
|
||||
) {
|
||||
starterFormIndex = Overrides.STARTER_FORM_OVERRIDES[starter.species.speciesId]!;
|
||||
|
Loading…
x
Reference in New Issue
Block a user