out-of-battle effects now under desc
This commit is contained in:
parent
d9179f446e
commit
e188daff70
2 changed files with 16 additions and 5 deletions
|
@ -42,6 +42,7 @@ module.exports = class {
|
||||||
bulbapediaPage
|
bulbapediaPage
|
||||||
serebiiPage
|
serebiiPage
|
||||||
smogonPage
|
smogonPage
|
||||||
|
isFieldAbility
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`})
|
`})
|
||||||
|
@ -63,13 +64,19 @@ module.exports = class {
|
||||||
}
|
}
|
||||||
|
|
||||||
const ability = json.data.getAbilityDetailsByFuzzy;
|
const ability = json.data.getAbilityDetailsByFuzzy;
|
||||||
|
|
||||||
|
let fieldEffects = '';
|
||||||
|
if (ability.isFieldAbility) {
|
||||||
|
fieldEffects = ` Outside of battle, ${ability.isFieldAbility}`;
|
||||||
|
}
|
||||||
|
|
||||||
const embed = new Embed()
|
const embed = new Embed()
|
||||||
.setColour(client.functions.displayHexColour(message.channel.guild, client.user.id))
|
.setColour(client.functions.displayHexColour(message.channel.guild, client.user.id))
|
||||||
.setTitle(ability.name.toProperCase());
|
.setTitle(ability.name.toProperCase());
|
||||||
if (ability.desc) {
|
if (ability.desc) {
|
||||||
embed.setDescription(ability.desc);
|
embed.setDescription(ability.desc + fieldEffects);
|
||||||
} else {
|
} else {
|
||||||
embed.setDescription(ability.shortDesc);
|
embed.setDescription(ability.shortDesc + fieldEffects);
|
||||||
}
|
}
|
||||||
embed.addField('External Resources:', `[Bulbapedia](${ability.bulbapediaPage}) • [Serebii](${ability.serebiiPage}) • [Smogon](${ability.smogonPage})`);
|
embed.addField('External Resources:', `[Bulbapedia](${ability.bulbapediaPage}) • [Serebii](${ability.serebiiPage}) • [Smogon](${ability.smogonPage})`);
|
||||||
message.channel.createMessage({ embed: embed });
|
message.channel.createMessage({ embed: embed });
|
||||||
|
|
|
@ -55,6 +55,7 @@ module.exports = class {
|
||||||
bulbapediaPage
|
bulbapediaPage
|
||||||
serebiiPage
|
serebiiPage
|
||||||
smogonPage
|
smogonPage
|
||||||
|
isFieldMove
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`})
|
`})
|
||||||
|
@ -81,19 +82,22 @@ module.exports = class {
|
||||||
|
|
||||||
if (move.isZ) {
|
if (move.isZ) {
|
||||||
suffix = ' (Z-Move)';
|
suffix = ' (Z-Move)';
|
||||||
} else if (!move.maxMovePower) {
|
} else if (!move.maxMovePower && move.basePower > 0) {
|
||||||
suffix = ' (Max Move)';
|
suffix = ' (Max Move)';
|
||||||
} else if (move.isGMax) {
|
} else if (move.isGMax) {
|
||||||
suffix = ' (G-Max Move)';
|
suffix = ' (G-Max Move)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let fieldEffects = '';
|
||||||
|
if (move.isFieldMove) fieldEffects = ' Outside of battle, ' + move.isFieldMove;
|
||||||
|
|
||||||
const embed = new Embed()
|
const embed = new Embed()
|
||||||
.setColour(colours[move.type])
|
.setColour(colours[move.type])
|
||||||
.setTitle(move.name.toProperCase() + suffix);
|
.setTitle(move.name.toProperCase() + suffix);
|
||||||
if (move.desc) {
|
if (move.desc) {
|
||||||
embed.setDescription(move.desc);
|
embed.setDescription(move.desc + fieldEffects);
|
||||||
} else {
|
} else {
|
||||||
embed.setDescription(move.shortDesc);
|
embed.setDescription(move.shortDesc + fieldEffects);
|
||||||
}
|
}
|
||||||
|
|
||||||
embed.addField('Type:', move.type, true);
|
embed.addField('Type:', move.type, true);
|
||||||
|
|
Loading…
Reference in a new issue