mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 14:22:19 +02:00
nit
This commit is contained in:
parent
377aafa85c
commit
a1f7304d4c
@ -5265,10 +5265,12 @@ export class IllusionPostBattleAbAttr extends PostBattleAbAttr {
|
|||||||
* @returns {boolean} - Whether the illusion was applied.
|
* @returns {boolean} - Whether the illusion was applied.
|
||||||
*/
|
*/
|
||||||
override applyPostBattle(pokemon: Pokemon, passive: boolean, simulated:boolean, args: any[]): void {
|
override applyPostBattle(pokemon: Pokemon, passive: boolean, simulated:boolean, args: any[]): void {
|
||||||
pokemon.breakIllusion();
|
const illusion = pokemon.breakIllusion();
|
||||||
|
if (illusion) {
|
||||||
pokemon.battleData.illusion.available = true;
|
pokemon.battleData.illusion.available = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -733,8 +733,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
this.loadAssets(false, true).then(() => this.playAnim());
|
this.loadAssets(false, true).then(() => this.playAnim());
|
||||||
this.updateInfo();
|
this.updateInfo();
|
||||||
} else {
|
} else {
|
||||||
let availables: Species[] = [];
|
const availables: Species[] = [];
|
||||||
let randomIllusion: PokemonSpecies = globalScene.arena.randomSpecies(globalScene.currentBattle.waveIndex, this.level);
|
const randomIllusion: PokemonSpecies = globalScene.arena.randomSpecies(globalScene.currentBattle.waveIndex, this.level);
|
||||||
/*
|
/*
|
||||||
if (this.isBoss()) {
|
if (this.isBoss()) {
|
||||||
availables = [ Species.ENTEI, Species.RAIKOU, Species.SUICUNE ];
|
availables = [ Species.ENTEI, Species.RAIKOU, Species.SUICUNE ];
|
||||||
@ -758,16 +758,15 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
breakIllusion(): boolean {
|
breakIllusion(): boolean {
|
||||||
console.log("breakIllusion");
|
|
||||||
if (!this.battleData?.illusion.active) {
|
if (!this.battleData?.illusion.active) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.name = this.battleData?.illusion.basePokemon!.name;
|
this.name = this.battleData?.illusion.basePokemon?.name ?? this.name;
|
||||||
this.nickname = this.battleData?.illusion.basePokemon!.nickname;
|
this.nickname = this.battleData?.illusion.basePokemon?.nickname ?? this.nickname;
|
||||||
this.shiny = this.battleData?.illusion.basePokemon!.shiny;
|
this.shiny = this.battleData?.illusion.basePokemon?.shiny ?? this.shiny;
|
||||||
this.variant = this.battleData?.illusion.basePokemon!.variant;
|
this.variant = this.battleData?.illusion.basePokemon?.variant ?? this.variant;
|
||||||
this.fusionVariant = this.battleData?.illusion.basePokemon!.fusionVariant;
|
this.fusionVariant = this.battleData?.illusion.basePokemon?.fusionVariant ?? this.fusionVariant;
|
||||||
this.fusionShiny = this.battleData?.illusion.basePokemon!.fusionShiny;
|
this.fusionShiny = this.battleData?.illusion.basePokemon?.fusionShiny ?? this.fusionShiny;
|
||||||
this.battleData.illusion = { active: false, available: false, basePokemon: this };
|
this.battleData.illusion = { active: false, available: false, basePokemon: this };
|
||||||
if (this.isOnField()) {
|
if (this.isOnField()) {
|
||||||
globalScene.playSound("PRSFX- Transform");
|
globalScene.playSound("PRSFX- Transform");
|
||||||
@ -5835,6 +5834,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resetBattleData(): void {
|
resetBattleData(): void {
|
||||||
|
console.log("RESET BATTLE DATA")
|
||||||
const illusionActive: boolean = this.battleData?.illusion.active;
|
const illusionActive: boolean = this.battleData?.illusion.active;
|
||||||
this.breakIllusion();
|
this.breakIllusion();
|
||||||
this.battleData = new PokemonBattleData();
|
this.battleData = new PokemonBattleData();
|
||||||
@ -7829,7 +7829,7 @@ interface Illusion {
|
|||||||
* The formIndex of the illusion
|
* The formIndex of the illusion
|
||||||
* @type {integer}
|
* @type {integer}
|
||||||
*/
|
*/
|
||||||
formIndex?: integer;
|
formIndex?: number;
|
||||||
/**
|
/**
|
||||||
* The gender of the illusion
|
* The gender of the illusion
|
||||||
* @type {Gender}
|
* @type {Gender}
|
||||||
@ -7848,12 +7848,17 @@ interface Illusion {
|
|||||||
* The fusionFormIndex of the illusion
|
* The fusionFormIndex of the illusion
|
||||||
* @type {integer}
|
* @type {integer}
|
||||||
*/
|
*/
|
||||||
fusionFormIndex?: integer;
|
fusionFormIndex?: number;
|
||||||
/**
|
/**
|
||||||
* The fusionGender of the illusion if it's a fusion
|
* The fusionGender of the illusion if it's a fusion
|
||||||
* @type {Gender}
|
* @type {Gender}
|
||||||
*/
|
*/
|
||||||
fusionGender?: Gender;
|
fusionGender?: Gender;
|
||||||
|
/**
|
||||||
|
* The level of the illusion
|
||||||
|
* @type {integer}
|
||||||
|
*/
|
||||||
|
level?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TurnMove {
|
export interface TurnMove {
|
||||||
|
@ -121,7 +121,7 @@ class DefaultOverrides {
|
|||||||
readonly STARTER_FORM_OVERRIDES: Partial<Record<Species, number>> = {};
|
readonly STARTER_FORM_OVERRIDES: Partial<Record<Species, number>> = {};
|
||||||
|
|
||||||
/** default 5 or 20 for Daily */
|
/** default 5 or 20 for Daily */
|
||||||
readonly STARTING_LEVEL_OVERRIDE: number = 0;
|
readonly STARTING_LEVEL_OVERRIDE: number = 30;
|
||||||
/**
|
/**
|
||||||
* SPECIES OVERRIDE
|
* SPECIES OVERRIDE
|
||||||
* will only apply to the first starter in your party or each enemy pokemon
|
* will only apply to the first starter in your party or each enemy pokemon
|
||||||
|
Loading…
Reference in New Issue
Block a user