This commit is contained in:
Lylian 2024-10-10 18:00:06 +02:00
parent 1e9a2a749d
commit cf8f778dd3
3 changed files with 48 additions and 48 deletions

View File

@ -4562,7 +4562,7 @@ export class IllusionPreSummonAbAttr extends PreSummonAbAttr {
*/
applyPreSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
let suppressed = false;
console.log("PRESUMMONILLUSION : ", pokemon.name)
console.log("PRESUMMONILLUSION : ", pokemon.name);
pokemon.scene.getField(true).filter(p => p !== pokemon).map(p => {
if ((p.getAbility().hasAttr(SuppressFieldAbilitiesAbAttr) && p.canApplyAbility()) || (p.getPassiveAbility().hasAttr(SuppressFieldAbilitiesAbAttr) && p.canApplyAbility(true))) {
suppressed = true;

View File

@ -399,10 +399,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
*/
generateIllusion(): boolean {
if (this.hasTrainer()) {
console.log("GENERATEILLUSION() : ", this.name)
console.log("GENERATEILLUSION() : ", this.name);
const party: Pokemon[] = (this.isPlayer() ? this.scene.getParty() : this.scene.getEnemyParty()).filter(p => p.isAllowedInBattle());
const lastPokemon: Pokemon = party.filter(p => p !== this).at(-1) || this;
console.log(lastPokemon.name)
console.log(lastPokemon.name);
const speciesId = lastPokemon.species.speciesId;
if ( lastPokemon === this || this.illusion.active ||
@ -475,12 +475,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
this.name = randomIllusion.name;
this.loadAssets(false, true).then(() => this.playAnim());
}
console.log("L'ILLUSION : ", this.illusion)
console.log("L'ILLUSION : ", this.illusion);
return true;
}
breakIllusion(): boolean {
console.log("BREAKILLUSION")
console.log("BREAKILLUSION");
if (!this.illusion.active) {
return false;
}

View File

@ -126,7 +126,7 @@ describe("Abilities - Illusion", () => {
await game.phaseInterceptor.to(TurnEndPhase);
const zoroark = game.scene.getPlayerPokemon()!;
console.log(zoroark.illusion)
console.log(zoroark.illusion);
expect(zoroark.name).equals("Axew");
expect(zoroark.getNameToRender()).equals("axew nickname");
expect(zoroark.getGender(false, true)).equals(Gender.FEMALE);