mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 13:53:12 +02:00
Fix battle timeout
This commit is contained in:
@@ -36,7 +36,7 @@ module.exports = class BattleCommand extends Command {
|
||||
return msg.say('Looks like they declined...');
|
||||
}
|
||||
}
|
||||
while (!battle.winner && battle.winner !== 'time') {
|
||||
while (!battle.winner || battle.winner !== 'time') {
|
||||
const choice = await battle.attacker.chooseAction(msg);
|
||||
if (choice === 'attack') {
|
||||
const damage = randomRange(battle.defender.guard ? 5 : 20, battle.defender.guard ? 20 : 50);
|
||||
|
||||
Reference in New Issue
Block a user