mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 00:06:42 +02:00
Add base stat total
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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