This commit is contained in:
Lylian 2025-03-10 13:39:47 +01:00
parent 15fbd9a54f
commit f4c0ac6575

View File

@ -1900,7 +1900,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
* @param {boolean} fakeName - Whether we want the fake name or the real name of the Pokemon (for Illusion ability).
*/
getName(fakeName: boolean = false): string {
return (!fakeName && this.battleData?.illusion.active && this.battleData?.illusion.basePokemon) ? this.battleData?.illusion.basePokemon.name : this.name;
return (!fakeName && this.battleData?.illusion.active && this.battleData?.illusion.basePokemon)
? this.battleData?.illusion.basePokemon.name
: this.name;
}
/**