out-of-battle effects now under desc

This commit is contained in:
Emily 2020-11-10 11:50:06 +11:00
parent d9179f446e
commit e188daff70
2 changed files with 16 additions and 5 deletions

View file

@ -42,6 +42,7 @@ module.exports = class {
bulbapediaPage
serebiiPage
smogonPage
isFieldAbility
}
}
`})
@ -63,13 +64,19 @@ module.exports = class {
}
const ability = json.data.getAbilityDetailsByFuzzy;
let fieldEffects = '';
if (ability.isFieldAbility) {
fieldEffects = ` Outside of battle, ${ability.isFieldAbility}`;
}
const embed = new Embed()
.setColour(client.functions.displayHexColour(message.channel.guild, client.user.id))
.setTitle(ability.name.toProperCase());
if (ability.desc) {
embed.setDescription(ability.desc);
embed.setDescription(ability.desc + fieldEffects);
} else {
embed.setDescription(ability.shortDesc);
embed.setDescription(ability.shortDesc + fieldEffects);
}
embed.addField('External Resources:', `[Bulbapedia](${ability.bulbapediaPage}) • [Serebii](${ability.serebiiPage}) • [Smogon](${ability.smogonPage})`);
message.channel.createMessage({ embed: embed });

View file

@ -55,6 +55,7 @@ module.exports = class {
bulbapediaPage
serebiiPage
smogonPage
isFieldMove
}
}
`})
@ -81,19 +82,22 @@ module.exports = class {
if (move.isZ) {
suffix = ' (Z-Move)';
} else if (!move.maxMovePower) {
} else if (!move.maxMovePower && move.basePower > 0) {
suffix = ' (Max Move)';
} else if (move.isGMax) {
suffix = ' (G-Max Move)';
}
let fieldEffects = '';
if (move.isFieldMove) fieldEffects = ' Outside of battle, ' + move.isFieldMove;
const embed = new Embed()
.setColour(colours[move.type])
.setTitle(move.name.toProperCase() + suffix);
if (move.desc) {
embed.setDescription(move.desc);
embed.setDescription(move.desc + fieldEffects);
} else {
embed.setDescription(move.shortDesc);
embed.setDescription(move.shortDesc + fieldEffects);
}
embed.addField('Type:', move.type, true);