diff --git a/funcs/games/blackjack.py b/funcs/games/blackjack.py index f2ef522..dd42dd0 100644 --- a/funcs/games/blackjack.py +++ b/funcs/games/blackjack.py @@ -342,7 +342,24 @@ def blackjackStand(channel,user,handNumber = 0): data = json.load(f) if user in data["blackjack games"][channel]["user hands"]: - hand = data["blackjack games"][channel]["user hands"][user] + if data["blackjack games"][channel]["user hands"][user]["split"] == False: + hand = data["blackjack games"][channel]["user hands"][user] + otherHand = False + else: + if handNumber != 0: + if handNumber == 1: + hand = data["blackjack games"][channel]["user hands"][user] + otherHand = False + elif handNumber == 2: + hand = data["blackjack games"][channel]["user hands"][user]["other hand"] + otherHand = True + else: + logThis(user+" tried to hit without specifying which hand") + return "You have to specify the hand you're hitting with." + else: + logThis(user+" tried to hit without specifying which hand") + return "You have to specify the hand you're hitting with." + if data["blackjack games"][channel]["round"] > 0: if hand["hit"] == False: if hand["standing"] == False: