This commit is contained in:
Lylian 2024-10-10 15:22:36 +02:00
parent 05ad97f64f
commit b5d8034e97
3 changed files with 4 additions and 3 deletions

View File

@ -451,6 +451,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
active: true,
available: true,
species: randomIllusion,
formIndex: randomIllusion.formIndex,
name: this.name,
shiny: this.shiny,
variant: this.variant,
@ -686,6 +687,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
*/
getSpeciesForm(ignoreOverride?: boolean, useIllusion: boolean = false): PokemonSpeciesForm {
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;
if (!ignoreOverride && this.summonData?.speciesForm) {
@ -1194,7 +1196,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
* @param {boolean} useIllusion - Whether we want the gender of the illusion or not.
*/
getGender(ignoreOverride?: boolean, useIllusion: boolean = false): Gender {
console.log("ALLLO", this.battleData.illusion.active);
if (useIllusion && this.battleData.illusion.active) {
return this.battleData.illusion.gender!;
} else if (!ignoreOverride && this.summonData?.gender !== undefined) {

View File

@ -106,7 +106,7 @@ class DefaultOverrides {
// --------------------------
// OPPONENT / ENEMY OVERRIDES
// --------------------------
readonly OPP_SPECIES_OVERRIDE: Species | number = 0;
readonly OPP_SPECIES_OVERRIDE: Species | number = Species.ZOROARK;
readonly OPP_LEVEL_OVERRIDE: number = 0;
readonly OPP_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
readonly OPP_PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;

View File

@ -1,5 +1,5 @@
import BattleScene from "#app/battle-scene";
import { applyPreSummonAbAttrs, applyPreSwitchOutAbAttrs, PreSummonAbAttr, PreSwitchOutAbAttr } from "#app/data/ability.js";
import { applyPreSummonAbAttrs, applyPreSwitchOutAbAttrs, PreSummonAbAttr, PreSwitchOutAbAttr } from "#app/data/ability";
import { allMoves, ForceSwitchOutAttr } from "#app/data/move";
import { getPokeballTintColor } from "#app/data/pokeball";
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms";