mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Update lint
This commit is contained in:
@@ -88,12 +88,12 @@ module.exports = class BattleCommand extends Command {
|
||||
reset(false);
|
||||
} else if (choice === 'special') {
|
||||
const miss = Math.floor(Math.random() * 4);
|
||||
if (!miss) {
|
||||
if (miss) {
|
||||
await msg.say(`${user}'s attack missed!`);
|
||||
} else {
|
||||
const damage = randomRange(100, guard ? 150 : 300);
|
||||
await msg.say(`${user} deals **${damage}** damage!`);
|
||||
dealDamage(damage);
|
||||
} else {
|
||||
await msg.say(`${user}'s attack missed!`);
|
||||
}
|
||||
reset();
|
||||
} else if (choice === 'run') {
|
||||
|
||||
@@ -41,7 +41,7 @@ module.exports = class RouletteCommand extends Command {
|
||||
|
||||
run(msg, { space }) {
|
||||
const number = Math.floor(Math.random() * 37);
|
||||
const color = !number ? null : red.includes(number) ? 'RED' : 'BLACK';
|
||||
const color = number ? red.includes(number) ? 'RED' : 'BLACK' : null;
|
||||
const win = this.verifyWin(space, number);
|
||||
return msg.reply(`The result is **${number}${color ? ` ${color}` : ''}**. ${win ? 'You win!' : 'You lose...'}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user