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
+1
View File
@@ -102,6 +102,7 @@ module.exports = class PokedexCommand extends Command {
\`Sp. Attack: [${'█'.repeat(repeat.sAtk)}${' '.repeat(20 - repeat.sAtk)}]\` **${data.stats.sAtk}**
\`Sp. Defense: [${'█'.repeat(repeat.sDef)}${' '.repeat(20 - repeat.sDef)}]\` **${data.stats.sDef}**
\`Speed: [${'█'.repeat(repeat.spd)}${' '.repeat(20 - repeat.spd)}]\` **${data.stats.spd}**
**Total: ${data.baseStatTotal}**
`)
.addField(' Abilities', data.abilities.join(' / '));
if (data.cry) {
+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');