Skip to content

Commit

Permalink
Fix getUpdatedDetails default parameter (#10870)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrebastosdias authored Feb 10, 2025
1 parent 920a0e0 commit 6ab8e0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sim/pokemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,10 @@ export class Pokemon {
return this.isActive ? this.getSlot() + fullname.slice(2) : fullname;
}

getUpdatedDetails(level = this.level) {
getUpdatedDetails(level?: number) {
let name = this.species.name;
if (['Greninja-Bond', 'Rockruff-Dusk'].includes(name)) name = this.species.baseSpecies;
if (!level) level = this.level;
return name + (level === 100 ? '' : ', L' + level) +
(this.gender === '' ? '' : ', ' + this.gender) + (this.set.shiny ? ', shiny' : '');
}
Expand Down

0 comments on commit 6ab8e0d

Please sign in to comment.