Add base stat total

This commit is contained in:
Dragon Fire
2020-12-03 10:50:40 -05:00
parent 1b05a94d1e
commit a55fdc2a22
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -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');