This commit is contained in:
Dragon Fire
2021-01-24 21:48:15 -05:00
parent 2d13c5d514
commit ce2cd66bab
+5 -5
View File
@@ -155,7 +155,7 @@ module.exports = class CarRaceCommand extends Command {
let oppoCarSpaces = 0;
let lastRoundWinner;
let lastTurnTimeout = false;
while (userCarSpaces < 5 && oppoCarSpaces < 5) {
while (userCarSpaces < 6 && oppoCarSpaces < 6) {
const board = this.generateBoard(bg, userCar, oppoCar, userCarSpaces, oppoCarSpaces);
let text;
if (lastRoundWinner) {
@@ -177,8 +177,8 @@ module.exports = class CarRaceCommand extends Command {
time: randomRange(1000, 30000)
});
if (earlyEnd.size) {
if (earlyEnd.first().author.id === msg.author.id) oppoCarSpaces = 5;
else if (earlyEnd.first().author.id === opponent.id) userCarSpaces = 5;
if (earlyEnd.first().author.id === msg.author.id) oppoCarSpaces = 6;
else if (earlyEnd.first().author.id === opponent.id) userCarSpaces = 6;
break;
}
const word = words[Math.floor(Math.random() * words.length)];
@@ -204,8 +204,8 @@ module.exports = class CarRaceCommand extends Command {
}
const win = winner.first();
if (win.content.toLowerCase() === 'end') {
if (win.author.id === msg.author.id) oppoCarSpaces = 5;
else if (win.author.id === opponent.id) userCarSpaces = 5;
if (win.author.id === msg.author.id) oppoCarSpaces = 6;
else if (win.author.id === opponent.id) userCarSpaces = 6;
break;
}
if (win.author.id === msg.author.id) userCarSpaces += 1;