From 77915957cef376386818536e43eba8e81c62c998 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Thu, 20 Jan 2022 18:27:39 +0500 Subject: [PATCH] =?UTF-8?q?v3.3.1=20=D0=9F=D0=B5=D1=80=D0=B5=D0=BC=D0=B5?= =?UTF-8?q?=D1=89=D0=B5=D0=BD=D1=8B=20=D0=B8=D0=B3=D1=80=D1=8B,=20=D0=B4?= =?UTF-8?q?=D0=B0=D1=8E=D1=89=D0=B8=D0=B5=20=D0=B4=D0=B5=D0=BD=D1=8C=D0=B3?= =?UTF-8?q?=D0=B8=20=D0=B2=20Economy=20=D0=9D=D0=BE=D0=B2=D1=8B=D0=B5=20?= =?UTF-8?q?=D0=BA=D0=BE=D1=8D=D1=84=D1=84=D0=B8=D1=86=D0=B8=D0=B5=D0=BD?= =?UTF-8?q?=D1=82=D1=8B=20=D0=B4=D0=BB=D1=8F=20horserace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/{Fun => Economy}/findwords.js | 0 commands/{Fun => Economy}/horserace.js | 23 +++++++++++++++++++---- commands/{Fun => Economy}/number.js | 0 commands/{Fun => Economy}/tictactoe.js | 0 dashboard/public/docs/updates.md | 5 +++++ package.json | 2 +- 6 files changed, 25 insertions(+), 5 deletions(-) rename commands/{Fun => Economy}/findwords.js (100%) rename commands/{Fun => Economy}/horserace.js (91%) rename commands/{Fun => Economy}/number.js (100%) rename commands/{Fun => Economy}/tictactoe.js (100%) 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,