mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 14:55:40 +02:00
Add base stat total
This commit is contained in:
@@ -45,6 +45,11 @@ module.exports = class Pokemon {
|
||||
: path.join(__dirname, '..', '..', 'assets', 'sounds', 'pokedex', `${data.id}.wav`);
|
||||
}
|
||||
|
||||
get baseStatTotal() {
|
||||
if (!this.stats) return null;
|
||||
return this.stats.hp + this.stats.atk + this.stats.def + this.stats.sAtk + this.stats.sDef + this.stats.spd;
|
||||
}
|
||||
|
||||
get displayID() {
|
||||
if (this.missingno) return '???';
|
||||
return this.id.toString().padStart(3, '0');
|
||||
|
||||
Reference in New Issue
Block a user