🐛 checking if busted before comparing
This commit is contained in:
@@ -472,8 +472,9 @@ def blackjackFinish(channel):
|
|||||||
winnings += math.floor(2.5 * data["blackjack games"][channel]["user hands"][user]["bet"])
|
winnings += math.floor(2.5 * data["blackjack games"][channel]["user hands"][user]["bet"])
|
||||||
elif data["blackjack games"][channel]["dealer blackjack"]:
|
elif data["blackjack games"][channel]["dealer blackjack"]:
|
||||||
reason += "(dealer blackjack)"
|
reason += "(dealer blackjack)"
|
||||||
|
elif data["blackjack games"][channel]["user hands"][user]["busted"]:
|
||||||
|
reason = "(busted)"
|
||||||
else:
|
else:
|
||||||
if data["blackjack games"][channel]["user hands"][user]["busted"] == False:
|
|
||||||
if data["blackjack games"][channel]["dealer busted"]:
|
if data["blackjack games"][channel]["dealer busted"]:
|
||||||
reason = "(dealer busted)"
|
reason = "(dealer busted)"
|
||||||
winnings += 2 * data["blackjack games"][channel]["user hands"][user]["bet"]
|
winnings += 2 * data["blackjack games"][channel]["user hands"][user]["bet"]
|
||||||
@@ -484,8 +485,7 @@ def blackjackFinish(channel):
|
|||||||
winnings += data["blackjack games"][channel]["user hands"][user]["bet"]
|
winnings += data["blackjack games"][channel]["user hands"][user]["bet"]
|
||||||
else:
|
else:
|
||||||
reason = "(highest value)"
|
reason = "(highest value)"
|
||||||
else:
|
|
||||||
reason = "(busted)"
|
|
||||||
|
|
||||||
if data["blackjack games"][channel]["user hands"][user]["split"]:
|
if data["blackjack games"][channel]["user hands"][user]["split"]:
|
||||||
winnings -= data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"]
|
winnings -= data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"]
|
||||||
@@ -494,8 +494,9 @@ def blackjackFinish(channel):
|
|||||||
winnings += math.floor(2.5 * data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"])
|
winnings += math.floor(2.5 * data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"])
|
||||||
elif data["blackjack games"][channel]["dealer blackjack"]:
|
elif data["blackjack games"][channel]["dealer blackjack"]:
|
||||||
reason += "(dealer blackjack)"
|
reason += "(dealer blackjack)"
|
||||||
|
elif data["blackjack games"][channel]["user hands"][user]["busted"]:
|
||||||
|
reason = "(busted)"
|
||||||
else:
|
else:
|
||||||
if data["blackjack games"][channel]["user hands"][user]["other hand"]["busted"] == False:
|
|
||||||
if data["blackjack games"][channel]["dealer busted"]:
|
if data["blackjack games"][channel]["dealer busted"]:
|
||||||
reason += "(dealer busted)"
|
reason += "(dealer busted)"
|
||||||
winnings += 2 * data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"]
|
winnings += 2 * data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"]
|
||||||
@@ -507,8 +508,7 @@ def blackjackFinish(channel):
|
|||||||
winnings += data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"]
|
winnings += data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"]
|
||||||
else:
|
else:
|
||||||
reason += "(highest value)"
|
reason += "(highest value)"
|
||||||
else:
|
|
||||||
reason += "(busted)"
|
|
||||||
|
|
||||||
|
|
||||||
if winnings < 0:
|
if winnings < 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user