From 69f925e0f6062a55b5e33a95c2de71484f7d6f73 Mon Sep 17 00:00:00 2001 From: Flummi Date: Sun, 16 Jul 2023 19:10:57 +0200 Subject: [PATCH] change odds --- src/index.mjs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/index.mjs b/src/index.mjs index 34201b7..ed5714c 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -106,8 +106,8 @@ bot.on("message", async e => { return e.reply("f"); if(e.message === ".d" && !env.hand) return e.reply("d"); - if(e.message === ".env" && cfg.get('debug')) { - e.reply(JSON.stringify(env)); + if(e.message === ".env") { + return helper.debug(env, 5); } if(e.user.nick !== cfg.get('pokerbot') || !env.hand) @@ -173,8 +173,7 @@ bot.on("message", async e => { if(env.callamount > env.bank) // not enough money lol return e.reply(['huan!', 'f']); - if(env.odds <= 30) { - console.log('callphase', env); + if(env.odds <= 40) { if(helper.rand(20) === 1 && env.callamount < (helper.rand(2, 6) * 10)) { // bad hand, call anyway action = 'call'; debug = `bad hand, call anyway (${env.odds}, callphase, 5%)`; @@ -184,14 +183,14 @@ bot.on("message", async e => { debug = `bad hand (${env.odds}, callphase, 95%)`; } } - else if(env.odds > 30 && env.odds <= 50) { // decent hand, raise + else if(env.odds > 40 && env.odds <= 50) { // decent hand, raise if(helper.rand(10) === 1) { // 10% action = 'raise ' + (env.callamount + helper.rand(5) * 10); debug = `decent hand (${env.odds}, callphase, 20%)`; } } else if(env.odds > 50 && env.odds <= 70) { // good hand lol - if(helper.rand(2) === 1) { // 50% + if(helper.rand(3) === 1) { // 33% action = 'raise ' + (env.callamount + helper.rand(6) * 10); debug = `good hand lol (${env.odds}, callphase, 70%)`; } @@ -202,7 +201,6 @@ bot.on("message", async e => { } } else { // checkphase - console.log('checkphase', env); if(env.odds > 55 && env.odds <= 70) { // decend hand, raise if(helper.rand(5) === 1) { // 20% action = 'raise ' + (env.callamount + helper.rand(5) * 10);