diff --git a/commands/Fun/findwords.js b/commands/Economy/findwords.js similarity index 100% rename from commands/Fun/findwords.js rename to commands/Economy/findwords.js diff --git a/commands/Fun/horserace.js b/commands/Economy/horserace.js similarity index 91% rename from commands/Fun/horserace.js rename to commands/Economy/horserace.js index 8de6d78b..93ea56cf 100644 --- a/commands/Fun/horserace.js +++ b/commands/Economy/horserace.js @@ -37,7 +37,14 @@ class Horserace extends Command { const f = []; for (let i = 0; i < 5; i++) { const speed = this.client.functions.randomNum(1, 5); - const profit = Math.floor((((8.9 / 9) * (6 - speed)) + 1.1) * 10) / 10; + const profit = { + 1: 3.5, + 2: 3, + 3: 2.5, + 4: 2, + 5: 1.5, + }; + // const profit = Math.floor((((8.9 / 9) * (6 - speed)) + 1.1) * 10) / 10; thisGame.horseSpeeds.push(speed); f.push({ name: message.translate("fun/horserace:HORSE_NAME", { @@ -45,7 +52,7 @@ class Horserace extends Command { }), value: message.translate("fun/horserace:HORSE_VALUE", { speed, - profit + profit: profit[speed] }) }); } @@ -95,11 +102,19 @@ class Horserace extends Command { if (horsePositions[i] === 3) { const winnings = []; - const profit = Math.floor((((8.9 / 9) * (6 - thisGame.horseSpeeds[i])) + 1.1) * 10) / 10; + const profit = { + 1: 3.5, + 2: 3, + 3: 2.5, + 4: 2, + 5: 1.5, + }; + + // const profit = Math.floor((((8.9 / 9) * (6 - thisGame.horseSpeeds[i])) + 1.1) * 10) / 10; for (let j = 0; j < Object.keys(thisGame.bets).length; j++) { if (Object.values(thisGame.bets)[j].horse === i + 1) { - winnings.push([Object.keys(thisGame.bets)[j], Object.values(thisGame.bets)[j].amount * profit]); + winnings.push([Object.keys(thisGame.bets)[j], Object.values(thisGame.bets)[j].amount * profit[thisGame.horseSpeeds[i]]]); } } diff --git a/commands/Fun/number.js b/commands/Economy/number.js similarity index 100% rename from commands/Fun/number.js rename to commands/Economy/number.js diff --git a/commands/Fun/tictactoe.js b/commands/Economy/tictactoe.js similarity index 100% rename from commands/Fun/tictactoe.js rename to commands/Economy/tictactoe.js diff --git a/dashboard/public/docs/updates.md b/dashboard/public/docs/updates.md index 7d94ff65..7278bfcd 100644 --- a/dashboard/public/docs/updates.md +++ b/dashboard/public/docs/updates.md @@ -1,3 +1,8 @@ +### JaBa v3.3.1 +* Изменено + * Команды *findwords*, *horserace*, *number* и *tictactoe* перемещены в категорию *Economy*. + * Новые коэффициенты для *horserace*. + ### JaBa v3.3.0 * Добавлено * Команда *horserace* - конные скачки со ставками. diff --git a/package.json b/package.json index cd29f99d..967b48e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jaba", - "version": "3.3.0", + "version": "3.3.1", "description": "A very complete Discord bot (more than 100 commands) that uses the Discord.js", "main": "index.js", "private": true,