mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-20 23:32:19 +02:00
fix nit
This commit is contained in:
parent
1e9a2a749d
commit
cf8f778dd3
@ -4562,7 +4562,7 @@ export class IllusionPreSummonAbAttr extends PreSummonAbAttr {
|
|||||||
*/
|
*/
|
||||||
applyPreSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
|
applyPreSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
|
||||||
let suppressed = false;
|
let suppressed = false;
|
||||||
console.log("PRESUMMONILLUSION : ", pokemon.name)
|
console.log("PRESUMMONILLUSION : ", pokemon.name);
|
||||||
pokemon.scene.getField(true).filter(p => p !== pokemon).map(p => {
|
pokemon.scene.getField(true).filter(p => p !== pokemon).map(p => {
|
||||||
if ((p.getAbility().hasAttr(SuppressFieldAbilitiesAbAttr) && p.canApplyAbility()) || (p.getPassiveAbility().hasAttr(SuppressFieldAbilitiesAbAttr) && p.canApplyAbility(true))) {
|
if ((p.getAbility().hasAttr(SuppressFieldAbilitiesAbAttr) && p.canApplyAbility()) || (p.getPassiveAbility().hasAttr(SuppressFieldAbilitiesAbAttr) && p.canApplyAbility(true))) {
|
||||||
suppressed = true;
|
suppressed = true;
|
||||||
|
@ -399,10 +399,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
*/
|
*/
|
||||||
generateIllusion(): boolean {
|
generateIllusion(): boolean {
|
||||||
if (this.hasTrainer()) {
|
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 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;
|
const lastPokemon: Pokemon = party.filter(p => p !== this).at(-1) || this;
|
||||||
console.log(lastPokemon.name)
|
console.log(lastPokemon.name);
|
||||||
const speciesId = lastPokemon.species.speciesId;
|
const speciesId = lastPokemon.species.speciesId;
|
||||||
|
|
||||||
if ( lastPokemon === this || this.illusion.active ||
|
if ( lastPokemon === this || this.illusion.active ||
|
||||||
@ -475,12 +475,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
this.name = randomIllusion.name;
|
this.name = randomIllusion.name;
|
||||||
this.loadAssets(false, true).then(() => this.playAnim());
|
this.loadAssets(false, true).then(() => this.playAnim());
|
||||||
}
|
}
|
||||||
console.log("L'ILLUSION : ", this.illusion)
|
console.log("L'ILLUSION : ", this.illusion);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
breakIllusion(): boolean {
|
breakIllusion(): boolean {
|
||||||
console.log("BREAKILLUSION")
|
console.log("BREAKILLUSION");
|
||||||
if (!this.illusion.active) {
|
if (!this.illusion.active) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ describe("Abilities - Illusion", () => {
|
|||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
|
|
||||||
const zoroark = game.scene.getPlayerPokemon()!;
|
const zoroark = game.scene.getPlayerPokemon()!;
|
||||||
console.log(zoroark.illusion)
|
console.log(zoroark.illusion);
|
||||||
expect(zoroark.name).equals("Axew");
|
expect(zoroark.name).equals("Axew");
|
||||||
expect(zoroark.getNameToRender()).equals("axew nickname");
|
expect(zoroark.getNameToRender()).equals("axew nickname");
|
||||||
expect(zoroark.getGender(false, true)).equals(Gender.FEMALE);
|
expect(zoroark.getGender(false, true)).equals(Gender.FEMALE);
|
||||||
|
Loading…
Reference in New Issue
Block a user