mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 14:22:19 +02:00
Zoroark keep illusion between battles
This commit is contained in:
parent
e522ab3d31
commit
83f5968c27
@ -812,13 +812,13 @@ export default class BattleScene extends SceneBase {
|
||||
}
|
||||
|
||||
public getPlayerParty(fakeShininess: boolean = true): PlayerPokemon[] {
|
||||
const party = this.party
|
||||
if(!fakeShininess){
|
||||
const party = this.party;
|
||||
if (!fakeShininess) {
|
||||
party.map(pokemon => {
|
||||
pokemon.shiny = pokemon.isShiny()
|
||||
pokemon.variant = pokemon.getVariant()
|
||||
pokemon.name = pokemon.getNameToRender()
|
||||
if(pokemon.isFusion()){
|
||||
pokemon.shiny = pokemon.isShiny();
|
||||
pokemon.variant = pokemon.getVariant();
|
||||
pokemon.name = pokemon.getNameToRender();
|
||||
if (pokemon.isFusion()) {
|
||||
pokemon.fusionVariant = pokemon.battleData?.illusion.basePokemon!.fusionVariant ?? pokemon.fusionVariant;
|
||||
pokemon.fusionShiny = pokemon.battleData?.illusion.basePokemon!.fusionShiny ?? pokemon.fusionShiny;
|
||||
}
|
||||
|
@ -4778,7 +4778,7 @@ export class IllusionPostBattleAbAttr extends PostBattleAbAttr {
|
||||
* @returns {boolean} - Whether the illusion was applied.
|
||||
*/
|
||||
applyPostBattle(pokemon: Pokemon, passive: boolean, simulated:boolean, args: any[]): boolean {
|
||||
console.log("POSTBATTLE")
|
||||
console.log("POSTBATTLE");
|
||||
pokemon.breakIllusion();
|
||||
pokemon.battleData.illusion.available = true;
|
||||
return true;
|
||||
|
@ -455,7 +455,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
fusionGender: lastPokemon.fusionGender
|
||||
};
|
||||
|
||||
console.log("GENERATE ILLUSION ", this.battleData.illusion.basePokemon!.name)
|
||||
console.log("GENERATE ILLUSION ", this.battleData.illusion.basePokemon!.name);
|
||||
|
||||
this.name = lastPokemon.name;
|
||||
this.nickname = lastPokemon.nickname;
|
||||
@ -509,7 +509,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
if (this.shiny) {
|
||||
this.initShinySparkle();
|
||||
}
|
||||
if(!toSave){
|
||||
if (!toSave) {
|
||||
this.loadAssets(false).then(() => this.playAnim());
|
||||
this.updateInfo(true);
|
||||
}
|
||||
@ -3966,12 +3966,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
}
|
||||
|
||||
resetBattleData(): void {
|
||||
console.log("RESETBATTLEDATA : ", this.getNameToRender(false))
|
||||
console.log("RESETBATTLEDATA : ", this.getNameToRender(false));
|
||||
const illusionActive: boolean = this.battleData?.illusion.active;
|
||||
this.breakIllusion();
|
||||
this.battleData = new PokemonBattleData();
|
||||
if(illusionActive){
|
||||
this.generateIllusion()
|
||||
if (illusionActive) {
|
||||
this.generateIllusion();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ import { TrainerSlot } from "#app/data/trainer-config";
|
||||
import { getRandomWeatherType } from "#app/data/weather";
|
||||
import { EncounterPhaseEvent } from "#app/events/battle-scene";
|
||||
import type Pokemon from "#app/field/pokemon";
|
||||
import { FieldPosition, PlayerPokemon } from "#app/field/pokemon";
|
||||
import { FieldPosition } from "#app/field/pokemon";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { BoostBugSpawnModifier, IvScannerModifier, TurnHeldItemTransferModifier } from "#app/modifier/modifier";
|
||||
import { ModifierPoolType, regenerateModifierPoolThresholds } from "#app/modifier/modifier-type";
|
||||
@ -203,7 +203,7 @@ export class EncounterPhase extends BattlePhase {
|
||||
}
|
||||
if (e < (battle.double ? 2 : 1)) {
|
||||
if (battle.battleType === BattleType.WILD) {
|
||||
for(const pokemon of globalScene.getPlayerField()){
|
||||
for (const pokemon of globalScene.getPlayerField()) {
|
||||
applyPreSummonAbAttrs(PreSummonAbAttr, pokemon, []);
|
||||
}
|
||||
applyPreSummonAbAttrs(PreSummonAbAttr, enemyPokemon, []);
|
||||
|
Loading…
Reference in New Issue
Block a user