This commit is contained in:
SpudGunMan
2024-09-20 11:34:44 -07:00
parent 135bb622e1
commit 40dd55d828
+9 -12
View File
@@ -272,24 +272,22 @@ def playVideoPoker(nodeID, message):
try:
bet = int(message)
except ValueError:
msg = "Please enter a valid bet amount. 1 to 5 coins."
msg += "Please enter a valid bet amount. 1 to 5 coins."
# Check if bet is valid
if bet > player.bankroll:
msg = "You can only bet the money you have. No strip poker here..."
msg += "You can only bet the money you have. No strip poker here..."
elif bet < 1:
msg = "You must bet at least 1 coin."
msg += "You must bet at least 1 coin."
elif bet > 5:
msg = "You can only bet up to 5 coins."
# take bet
msg = player.bet(str(message))
msg += "You can only bet up to 5 coins."
# if msg contains an error, return it
if msg is not None and msg != '':
return msg
else:
# Take the bet
player.bet(str(message))
# Bet placed, start the game
setLastCmdVp(nodeID, "playing")
@@ -363,10 +361,9 @@ def playVideoPoker(nodeID, message):
if player.bankroll < 1:
player.bankroll = vpStartingCash
msg += "\nLooks 💸 like you're out of money. 🏧🪙 resetting ballance"
# check if player has new high score
if player.bankroll > vpTracker[i]['highScore']:
msg += "\nLooks 💸 like you're out of money. 💳 resetting ballance 🏧"
elif player.bankroll > vpTracker[i]['highScore']:
vpTracker[i]['highScore'] = player.bankroll
msg += " 🎉HighScore! {} coins.".format(player.bankroll)
else:
msg += " Score is {} coins.".format(vpTracker[i]['highScore'])