This is better

This commit is contained in:
Daniel Odendahl Jr
2017-12-04 15:44:34 +00:00
parent 92b5453aac
commit cf1f6739f7
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -85,8 +85,8 @@ module.exports = class BattleCommand extends Command {
guard = true;
reset(false);
} else if (choice === 'special') {
const hit = Math.floor(Math.random() * 4) + 1;
if (hit === 1) {
const miss = Math.floor(Math.random() * 4);
if (!miss) {
const damage = randomRange(100, guard ? 150 : 300);
await msg.say(`${user} deals **${damage}** damage!`);
dealDamage(damage);
+2 -2
View File
@@ -11,8 +11,8 @@ module.exports = class LotteryCommand extends Command {
}
run(msg) {
const lottery = Math.floor(Math.random() * 1000) + 1;
if (lottery === 1) return msg.reply('Nice job! 10/10! You deserve some cake!');
const loss = Math.floor(Math.random() * 1000);
if (!loss) return msg.reply('Nice job! 10/10! You deserve some cake!');
return msg.reply('Nope, sorry, you lost.');
}
};