check for bank before raise
This commit is contained in:
parent
69f925e0f6
commit
fc55bd2830
@ -185,37 +185,55 @@ bot.on("message", async e => {
|
||||
}
|
||||
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%)`;
|
||||
const toRaise = env.callamount + helper.rand(5) * 10;
|
||||
if(toRaise > env.bank) {
|
||||
action = 'raise ' + toRaise.toString();
|
||||
debug = `decent hand (${env.odds}, callphase, 10%)`;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(env.odds > 50 && env.odds <= 70) { // good hand lol
|
||||
if(helper.rand(3) === 1) { // 33%
|
||||
action = 'raise ' + (env.callamount + helper.rand(6) * 10);
|
||||
debug = `good hand lol (${env.odds}, callphase, 70%)`;
|
||||
const toRaise = env.callamount + helper.rand(6) * 10;
|
||||
if(toRaise > env.bank) {
|
||||
action = 'raise ' + toRaise.toString();
|
||||
debug = `good hand lol (${env.odds}, callphase, 33%)`;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(env.odds > 70) { // fuck them all
|
||||
action = 'raise ' + (env.callamount + helper.rand(7) * 10);
|
||||
debug = `fuck them all (${env.odds}, callphase)`;
|
||||
const toRaise = env.callamount + helper.rand(7) * 10;
|
||||
if(toRaise > env.bank) {
|
||||
action = 'raise ' + toRaise.toString();
|
||||
debug = `fuck them all (${env.odds}, callphase)`;
|
||||
}
|
||||
}
|
||||
}
|
||||
else { // checkphase
|
||||
if(env.odds > 55 && env.odds <= 70) { // decend hand, raise
|
||||
if(helper.rand(5) === 1) { // 20%
|
||||
action = 'raise ' + (env.callamount + helper.rand(5) * 10);
|
||||
debug = `decent hand (${env.odds}, checkphase, 20%)`;
|
||||
const toRaise = env.callamount + helper.rand(5) * 10;
|
||||
if(toRaise > env.bank) {
|
||||
action = 'raise ' + toRaise.toString();
|
||||
debug = `decent hand (${env.odds}, checkphase, 20%)`;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(env.odds > 70 && env.odds <= 85) { // good hand lol
|
||||
if(helper.rand(2) === 1) { // 50%
|
||||
action = 'r ' + (env.callamount + helper.rand(6) * 10);
|
||||
debug = `good hand lol (${env.odds}, callphase, 50%)`;
|
||||
const toRaise = env.callamount + helper.rand(6) * 10;
|
||||
if(toRaise > env.bank) {
|
||||
action = 'raise ' + toRaise.toString();
|
||||
debug = `good hand lol (${env.odds}, callphase, 50%)`;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(env.odds > 85) { // fuck them all
|
||||
action = 'raise ' + (env.callamount + helper.rand(7) * 10);
|
||||
debug = `fuck them all (${env.odds}, callphase)`;
|
||||
const toRaise = env.callamount + helper.rand(7) * 10;
|
||||
if(toRaise > env.bank) {
|
||||
action = 'raise ' + toRaise.toString();
|
||||
debug = `fuck them all (${env.odds}, callphase)`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user