mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 14:55:40 +02:00
This is better
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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.');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user