bugfix
This commit is contained in:
parent
9fd3c3e307
commit
0a9337c92d
|
@ -281,8 +281,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
|
|
||||||
|
|
||||||
getNameToRender(useIllusion: boolean = true) {
|
getNameToRender(useIllusion: boolean = true) {
|
||||||
const name: string = (!useIllusion && this.battleData.illusion.active) ? this.battleData.illusion.name! : this.name;
|
const name: string = (!useIllusion && this.battleData?.illusion.active) ? this.battleData?.illusion.name! : this.name;
|
||||||
const nickname: string = (!useIllusion && this.battleData.illusion.active) ? this.battleData.illusion.nickname! : this.nickname;
|
const nickname: string = (!useIllusion && this.battleData?.illusion.active) ? this.battleData?.illusion.nickname! : this.nickname;
|
||||||
try {
|
try {
|
||||||
if (nickname) {
|
if (nickname) {
|
||||||
return decodeURIComponent(escape(atob(nickname)));
|
return decodeURIComponent(escape(atob(nickname)));
|
||||||
|
@ -400,7 +400,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
const lastPokemon: Pokemon = party.filter(p => p !== this).at(-1) || this;
|
const lastPokemon: Pokemon = party.filter(p => p !== this).at(-1) || this;
|
||||||
const speciesId = lastPokemon.species.speciesId;
|
const speciesId = lastPokemon.species.speciesId;
|
||||||
|
|
||||||
if ( lastPokemon === this || this.battleData.illusion.active ||
|
if ( lastPokemon === this || this.battleData?.illusion.active ||
|
||||||
((speciesId === Species.OGERPON || speciesId === Species.TERAPAGOS) && (lastPokemon.isTerastallized() || this.isTerastallized()))) {
|
((speciesId === Species.OGERPON || speciesId === Species.TERAPAGOS) && (lastPokemon.isTerastallized() || this.isTerastallized()))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -478,12 +478,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.name = this.battleData.illusion.name!;
|
this.name = this.battleData?.illusion.name!;
|
||||||
this.nickname = this.battleData.illusion.nickname!;
|
this.nickname = this.battleData?.illusion.nickname!;
|
||||||
this.shiny = this.battleData.illusion.shiny!;
|
this.shiny = this.battleData?.illusion.shiny!;
|
||||||
this.variant = this.battleData.illusion.variant!;
|
this.variant = this.battleData?.illusion.variant!;
|
||||||
this.fusionVariant = this.battleData.illusion.fusionVariant!;
|
this.fusionVariant = this.battleData?.illusion.fusionVariant!;
|
||||||
this.fusionShiny = this.battleData.illusion.fusionShiny!;
|
this.fusionShiny = this.battleData?.illusion.fusionShiny!;
|
||||||
this.battleData.illusion = { active: false, available: false };
|
this.battleData.illusion = { active: false, available: false };
|
||||||
if (this.isOnField()) {
|
if (this.isOnField()) {
|
||||||
this.scene.playSound("PRSFX- Transform");
|
this.scene.playSound("PRSFX- Transform");
|
||||||
|
@ -513,15 +513,15 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
Promise.allSettled(moveIds.map(m => initMoveAnim(this.scene, m)))
|
Promise.allSettled(moveIds.map(m => initMoveAnim(this.scene, m)))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loadMoveAnimAssets(this.scene, moveIds);
|
loadMoveAnimAssets(this.scene, moveIds);
|
||||||
const formIndex = this.battleData.illusion.active && useIllusion ? this.battleData.illusion.formIndex : this.formIndex;
|
const formIndex = this.battleData?.illusion.active && useIllusion ? this.battleData?.illusion.formIndex : this.formIndex;
|
||||||
this.getSpeciesForm(false, useIllusion).loadAssets(this.scene, this.getGender(useIllusion) === Gender.FEMALE, formIndex, this.isShiny(useIllusion), this.getVariant(useIllusion));
|
this.getSpeciesForm(false, useIllusion).loadAssets(this.scene, this.getGender(useIllusion) === Gender.FEMALE, formIndex, this.isShiny(useIllusion), this.getVariant(useIllusion));
|
||||||
if (this.isPlayer() || this.getFusionSpeciesForm(false, useIllusion)) {
|
if (this.isPlayer() || this.getFusionSpeciesForm(false, useIllusion)) {
|
||||||
this.scene.loadPokemonAtlas(this.getBattleSpriteKey(true, ignoreOverride), this.getBattleSpriteAtlasPath(true, ignoreOverride));
|
this.scene.loadPokemonAtlas(this.getBattleSpriteKey(true, ignoreOverride), this.getBattleSpriteAtlasPath(true, ignoreOverride));
|
||||||
}
|
}
|
||||||
if (this.getFusionSpeciesForm(false, useIllusion)) {
|
if (this.getFusionSpeciesForm(false, useIllusion)) {
|
||||||
const fusionFormIndex = this.battleData.illusion.active && useIllusion ? this.battleData.illusion.fusionFormIndex : this.fusionFormIndex;
|
const fusionFormIndex = this.battleData?.illusion.active && useIllusion ? this.battleData?.illusion.fusionFormIndex : this.fusionFormIndex;
|
||||||
const fusionShiny = this.battleData.illusion.active && !useIllusion ? this.battleData.illusion.fusionShiny : this.fusionShiny;
|
const fusionShiny = this.battleData?.illusion.active && !useIllusion ? this.battleData?.illusion.fusionShiny : this.fusionShiny;
|
||||||
const fusionVariant = this.battleData.illusion.active && !useIllusion ? this.battleData.illusion.fusionVariant : this.fusionVariant;
|
const fusionVariant = this.battleData?.illusion.active && !useIllusion ? this.battleData?.illusion.fusionVariant : this.fusionVariant;
|
||||||
this.getFusionSpeciesForm(false, useIllusion).loadAssets(this.scene, this.getFusionGender(false, useIllusion) === Gender.FEMALE, fusionFormIndex, fusionShiny, fusionVariant);
|
this.getFusionSpeciesForm(false, useIllusion).loadAssets(this.scene, this.getFusionGender(false, useIllusion) === Gender.FEMALE, fusionFormIndex, fusionShiny, fusionVariant);
|
||||||
this.scene.loadPokemonAtlas(this.getFusionBattleSpriteKey(true, ignoreOverride), this.getFusionBattleSpriteAtlasPath(true, ignoreOverride));
|
this.scene.loadPokemonAtlas(this.getFusionBattleSpriteKey(true, ignoreOverride), this.getFusionBattleSpriteAtlasPath(true, ignoreOverride));
|
||||||
}
|
}
|
||||||
|
@ -622,7 +622,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
}
|
}
|
||||||
|
|
||||||
getSpriteId(ignoreOverride?: boolean): string {
|
getSpriteId(ignoreOverride?: boolean): string {
|
||||||
const formIndex: integer = this.battleData.illusion.active ? this.battleData.illusion.formIndex! : this.formIndex;
|
const formIndex: integer = this.battleData?.illusion.active ? this.battleData?.illusion.formIndex! : this.formIndex;
|
||||||
return this.getSpeciesForm(ignoreOverride, true).getSpriteId(this.getGender(ignoreOverride, true) === Gender.FEMALE, formIndex, this.shiny, this.variant);
|
return this.getSpeciesForm(ignoreOverride, true).getSpriteId(this.getGender(ignoreOverride, true) === Gender.FEMALE, formIndex, this.shiny, this.variant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -631,7 +631,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
back = this.isPlayer();
|
back = this.isPlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
const formIndex: integer = this.battleData.illusion.active ? this.battleData.illusion.formIndex! : this.formIndex;
|
const formIndex: integer = this.battleData?.illusion.active ? this.battleData?.illusion.formIndex! : this.formIndex;
|
||||||
|
|
||||||
return this.getSpeciesForm(ignoreOverride, true).getSpriteId(this.getGender(ignoreOverride, true) === Gender.FEMALE, formIndex, this.shiny, this.variant, back);
|
return this.getSpeciesForm(ignoreOverride, true).getSpriteId(this.getGender(ignoreOverride, true) === Gender.FEMALE, formIndex, this.shiny, this.variant, back);
|
||||||
}
|
}
|
||||||
|
@ -640,8 +640,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
return this.getSpeciesForm(ignoreOverride, false).getSpriteKey(
|
return this.getSpeciesForm(ignoreOverride, false).getSpriteKey(
|
||||||
this.getGender(ignoreOverride) === Gender.FEMALE,
|
this.getGender(ignoreOverride) === Gender.FEMALE,
|
||||||
this.formIndex,
|
this.formIndex,
|
||||||
this.battleData.illusion.shiny ?? this.shiny,
|
this.battleData?.illusion.shiny ?? this.shiny,
|
||||||
this.battleData.illusion.variant ?? this.variant
|
this.battleData?.illusion.variant ?? this.variant
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -650,7 +650,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
}
|
}
|
||||||
|
|
||||||
getFusionSpriteId(ignoreOverride?: boolean): string {
|
getFusionSpriteId(ignoreOverride?: boolean): string {
|
||||||
const fusionFormIndex: integer = this.battleData.illusion.active ? this.battleData.illusion.fusionFormIndex! : this.fusionFormIndex;
|
const fusionFormIndex: integer = this.battleData?.illusion.active ? this.battleData?.illusion.fusionFormIndex! : this.fusionFormIndex;
|
||||||
return this.getFusionSpeciesForm(ignoreOverride, true).getSpriteId(this.getFusionGender(ignoreOverride, true) === Gender.FEMALE, fusionFormIndex, this.fusionShiny, this.fusionVariant);
|
return this.getFusionSpeciesForm(ignoreOverride, true).getSpriteId(this.getFusionGender(ignoreOverride, true) === Gender.FEMALE, fusionFormIndex, this.fusionShiny, this.fusionVariant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -659,7 +659,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
back = this.isPlayer();
|
back = this.isPlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
const fusionFormIndex: integer = this.battleData.illusion.active ? this.battleData.illusion.fusionFormIndex! : this.fusionFormIndex;
|
const fusionFormIndex: integer = this.battleData?.illusion.active ? this.battleData?.illusion.fusionFormIndex! : this.fusionFormIndex;
|
||||||
|
|
||||||
return this.getFusionSpeciesForm(ignoreOverride, true).getSpriteId(this.getFusionGender(ignoreOverride, true) === Gender.FEMALE, fusionFormIndex, this.fusionShiny, this.fusionVariant, back);
|
return this.getFusionSpeciesForm(ignoreOverride, true).getSpriteId(this.getFusionGender(ignoreOverride, true) === Gender.FEMALE, fusionFormIndex, this.fusionShiny, this.fusionVariant, back);
|
||||||
}
|
}
|
||||||
|
@ -673,7 +673,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
}
|
}
|
||||||
|
|
||||||
getIconAtlasKey(ignoreOverride?: boolean): string {
|
getIconAtlasKey(ignoreOverride?: boolean): string {
|
||||||
const formIndex: integer = this.battleData.illusion.active ? this.battleData.illusion.formIndex! : this.formIndex;
|
const formIndex: integer = this.battleData?.illusion.active ? this.battleData?.illusion.formIndex! : this.formIndex;
|
||||||
return this.getSpeciesForm(ignoreOverride, true).getIconAtlasKey(formIndex, this.shiny, this.variant);
|
return this.getSpeciesForm(ignoreOverride, true).getIconAtlasKey(formIndex, this.shiny, this.variant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -682,12 +682,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
}
|
}
|
||||||
|
|
||||||
getIconId(ignoreOverride?: boolean): string {
|
getIconId(ignoreOverride?: boolean): string {
|
||||||
const formIndex: integer = this.battleData.illusion.active ? this.battleData.illusion.formIndex! : this.formIndex;
|
const formIndex: integer = this.battleData?.illusion.active ? this.battleData?.illusion.formIndex! : this.formIndex;
|
||||||
return this.getSpeciesForm(ignoreOverride, true).getIconId(this.getGender(ignoreOverride, true) === Gender.FEMALE, formIndex, this.shiny, this.variant);
|
return this.getSpeciesForm(ignoreOverride, true).getIconId(this.getGender(ignoreOverride, true) === Gender.FEMALE, formIndex, this.shiny, this.variant);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFusionIconId(ignoreOverride?: boolean): string {
|
getFusionIconId(ignoreOverride?: boolean): string {
|
||||||
const fusionFormIndex: integer = this.battleData.illusion.active ? this.battleData.illusion.fusionFormIndex! : this.fusionFormIndex;
|
const fusionFormIndex: integer = this.battleData?.illusion.active ? this.battleData?.illusion.fusionFormIndex! : this.fusionFormIndex;
|
||||||
return this.getFusionSpeciesForm(ignoreOverride, true).getIconId(this.getFusionGender(ignoreOverride, true) === Gender.FEMALE, fusionFormIndex, this.fusionShiny, this.fusionVariant);
|
return this.getFusionSpeciesForm(ignoreOverride, true).getIconId(this.getFusionGender(ignoreOverride, true) === Gender.FEMALE, fusionFormIndex, this.fusionShiny, this.fusionVariant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -695,9 +695,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
* @param {boolean} useIllusion - Whether we want the speciesForm of the illusion or not.
|
* @param {boolean} useIllusion - Whether we want the speciesForm of the illusion or not.
|
||||||
*/
|
*/
|
||||||
getSpeciesForm(ignoreOverride?: boolean, useIllusion: boolean = false): PokemonSpeciesForm {
|
getSpeciesForm(ignoreOverride?: boolean, useIllusion: boolean = false): PokemonSpeciesForm {
|
||||||
const species: PokemonSpecies = useIllusion && this.battleData.illusion.active ? this.battleData.illusion.species! : this.species;
|
const species: PokemonSpecies = useIllusion && this.battleData?.illusion.active ? this.battleData?.illusion.species! : this.species;
|
||||||
|
|
||||||
const formIndex: integer = useIllusion && this.battleData.illusion.active ? this.battleData.illusion.formIndex! : this.formIndex;
|
const formIndex: integer = useIllusion && this.battleData?.illusion.active ? this.battleData?.illusion.formIndex! : this.formIndex;
|
||||||
|
|
||||||
if (!ignoreOverride && this.summonData?.speciesForm) {
|
if (!ignoreOverride && this.summonData?.speciesForm) {
|
||||||
return this.summonData.speciesForm;
|
return this.summonData.speciesForm;
|
||||||
|
@ -713,8 +713,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
* @param {boolean} useIllusion - Whether we want the fusionSpeciesForm of the illusion or not.
|
* @param {boolean} useIllusion - Whether we want the fusionSpeciesForm of the illusion or not.
|
||||||
*/
|
*/
|
||||||
getFusionSpeciesForm(ignoreOverride?: boolean, useIllusion: boolean = false): PokemonSpeciesForm {
|
getFusionSpeciesForm(ignoreOverride?: boolean, useIllusion: boolean = false): PokemonSpeciesForm {
|
||||||
const fusionSpecies: PokemonSpecies = useIllusion && this.battleData.illusion.active ? this.battleData.illusion.fusionSpecies! : this.fusionSpecies!;
|
const fusionSpecies: PokemonSpecies = useIllusion && this.battleData?.illusion.active ? this.battleData?.illusion.fusionSpecies! : this.fusionSpecies!;
|
||||||
const fusionFormIndex: integer = useIllusion && this.battleData.illusion.active ? this.battleData.illusion.fusionFormIndex! : this.fusionFormIndex;
|
const fusionFormIndex: integer = useIllusion && this.battleData?.illusion.active ? this.battleData?.illusion.fusionFormIndex! : this.fusionFormIndex;
|
||||||
|
|
||||||
if (!ignoreOverride && this.summonData?.speciesForm) {
|
if (!ignoreOverride && this.summonData?.speciesForm) {
|
||||||
return this.summonData.fusionSpeciesForm;
|
return this.summonData.fusionSpeciesForm;
|
||||||
|
@ -1210,8 +1210,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
* @param {boolean} useIllusion - Whether we want the gender of the illusion or not.
|
* @param {boolean} useIllusion - Whether we want the gender of the illusion or not.
|
||||||
*/
|
*/
|
||||||
getGender(ignoreOverride?: boolean, useIllusion: boolean = false): Gender {
|
getGender(ignoreOverride?: boolean, useIllusion: boolean = false): Gender {
|
||||||
if (useIllusion && this.battleData.illusion.active) {
|
if (useIllusion && this.battleData?.illusion.active) {
|
||||||
return this.battleData.illusion.gender!;
|
return this.battleData?.illusion.gender!;
|
||||||
} else if (!ignoreOverride && this.summonData?.gender !== undefined) {
|
} else if (!ignoreOverride && this.summonData?.gender !== undefined) {
|
||||||
return this.summonData.gender;
|
return this.summonData.gender;
|
||||||
}
|
}
|
||||||
|
@ -1222,8 +1222,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
* @param {boolean} useIllusion - Whether we want the fusionGender of the illusion or not.
|
* @param {boolean} useIllusion - Whether we want the fusionGender of the illusion or not.
|
||||||
*/
|
*/
|
||||||
getFusionGender(ignoreOverride?: boolean, useIllusion: boolean = false): Gender {
|
getFusionGender(ignoreOverride?: boolean, useIllusion: boolean = false): Gender {
|
||||||
if (useIllusion && this.battleData.illusion.active) {
|
if (useIllusion && this.battleData?.illusion.active) {
|
||||||
return this.battleData.illusion.fusionGender!;
|
return this.battleData?.illusion.fusionGender!;
|
||||||
} else if (!ignoreOverride && this.summonData?.fusionGender !== undefined) {
|
} else if (!ignoreOverride && this.summonData?.fusionGender !== undefined) {
|
||||||
return this.summonData.fusionGender;
|
return this.summonData.fusionGender;
|
||||||
}
|
}
|
||||||
|
@ -1231,24 +1231,24 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
}
|
}
|
||||||
|
|
||||||
isShiny(useIllusion: boolean = false): boolean {
|
isShiny(useIllusion: boolean = false): boolean {
|
||||||
if (!useIllusion && this.battleData.illusion.active) {
|
if (!useIllusion && this.battleData?.illusion.active) {
|
||||||
return this.battleData.illusion.shiny || (!!this.battleData.illusion.fusionSpecies && this.battleData.illusion.fusionShiny) || false;
|
return this.battleData?.illusion.shiny || (!!this.battleData?.illusion.fusionSpecies && this.battleData?.illusion.fusionShiny) || false;
|
||||||
} else {
|
} else {
|
||||||
return this.shiny || (this.isFusion(useIllusion) && this.fusionShiny);
|
return this.shiny || (this.isFusion(useIllusion) && this.fusionShiny);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isDoubleShiny(useIllusion: boolean = false): boolean {
|
isDoubleShiny(useIllusion: boolean = false): boolean {
|
||||||
if (!useIllusion && this.battleData.illusion.active) {
|
if (!useIllusion && this.battleData?.illusion.active) {
|
||||||
return this.isFusion(false) && this.battleData.illusion.shiny! && this.battleData.illusion.fusionShiny!;
|
return this.isFusion(false) && this.battleData?.illusion.shiny! && this.battleData?.illusion.fusionShiny!;
|
||||||
} else {
|
} else {
|
||||||
return this.isFusion(useIllusion) && this.shiny && this.fusionShiny;
|
return this.isFusion(useIllusion) && this.shiny && this.fusionShiny;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getVariant(useIllusion: boolean = false): Variant {
|
getVariant(useIllusion: boolean = false): Variant {
|
||||||
if (!useIllusion && this.battleData.illusion.active) {
|
if (!useIllusion && this.battleData?.illusion.active) {
|
||||||
return !this.isFusion(false) ? this.battleData.illusion.variant! : Math.max(this.variant, this.fusionVariant) as Variant;
|
return !this.isFusion(false) ? this.battleData?.illusion.variant! : Math.max(this.variant, this.fusionVariant) as Variant;
|
||||||
} else {
|
} else {
|
||||||
return !this.isFusion(true) ? this.variant : Math.max(this.variant, this.fusionVariant) as Variant;
|
return !this.isFusion(true) ? this.variant : Math.max(this.variant, this.fusionVariant) as Variant;
|
||||||
}
|
}
|
||||||
|
@ -1257,7 +1257,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
|
|
||||||
getBaseVariant(doubleShiny: boolean): Variant {
|
getBaseVariant(doubleShiny: boolean): Variant {
|
||||||
if (doubleShiny) {
|
if (doubleShiny) {
|
||||||
return this.battleData.illusion.active ? this.battleData.illusion.variant! : this.variant;
|
return this.battleData?.illusion.active ? this.battleData?.illusion.variant! : this.variant;
|
||||||
} else {
|
} else {
|
||||||
return this.getVariant();
|
return this.getVariant();
|
||||||
}
|
}
|
||||||
|
@ -1268,15 +1268,15 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
}
|
}
|
||||||
|
|
||||||
isFusion(useIllusion: boolean = false): boolean {
|
isFusion(useIllusion: boolean = false): boolean {
|
||||||
if (useIllusion && this.battleData.illusion.active) {
|
if (useIllusion && this.battleData?.illusion.active) {
|
||||||
return !!this.battleData.illusion.fusionSpecies;
|
return !!this.battleData?.illusion.fusionSpecies;
|
||||||
} else {
|
} else {
|
||||||
return !!this.fusionSpecies;
|
return !!this.fusionSpecies;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getName(illusion: boolean = false): string {
|
getName(illusion: boolean = false): string {
|
||||||
return (!illusion && this.battleData.illusion.active && this.battleData.illusion.name) ? this.battleData.illusion.name : this.name;
|
return (!illusion && this.battleData?.illusion.active && this.battleData?.illusion.name) ? this.battleData?.illusion.name : this.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1380,7 +1380,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
if (this.mysteryEncounterPokemonData.types && this.mysteryEncounterPokemonData.types.length > 0) {
|
if (this.mysteryEncounterPokemonData.types && this.mysteryEncounterPokemonData.types.length > 0) {
|
||||||
// "Permanent" override for a Pokemon's normal types, currently only used by Mystery Encounters
|
// "Permanent" override for a Pokemon's normal types, currently only used by Mystery Encounters
|
||||||
this.mysteryEncounterPokemonData.types.forEach(t => types.push(t));
|
this.mysteryEncounterPokemonData.types.forEach(t => types.push(t));
|
||||||
} else if (!ignoreOverride && this.summonData?.types && this.summonData.types.length > 0 && (!this.battleData.illusion.active || !doIllusion)) {
|
} else if (!ignoreOverride && this.summonData?.types && this.summonData.types.length > 0 && (!this.battleData?.illusion.active || !doIllusion)) {
|
||||||
this.summonData.types.forEach(t => types.push(t));
|
this.summonData.types.forEach(t => types.push(t));
|
||||||
} else if (this.mysteryEncounterPokemonData.types && this.mysteryEncounterPokemonData.types.length > 0) {
|
} else if (this.mysteryEncounterPokemonData.types && this.mysteryEncounterPokemonData.types.length > 0) {
|
||||||
// "Permanent" override for a Pokemon's normal types, currently only used by Mystery Encounters
|
// "Permanent" override for a Pokemon's normal types, currently only used by Mystery Encounters
|
||||||
|
|
Loading…
Reference in New Issue