mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
blackjack: avoid deleting player state twice when winning insurance
This commit is contained in:
parent
e0da99eb63
commit
4b6f08d2a1
1 changed files with 3 additions and 1 deletions
|
@ -723,6 +723,7 @@ def Insurance(link,cmd):
|
|||
return
|
||||
if IsBlackjack(dealer_hand):
|
||||
Lose(link,True)
|
||||
# From here on, players[identity] is deleted
|
||||
win_insurance_units = insurance_units * 2
|
||||
link.send('%s wins %s insurance - dealer had a blackjack - %s' % (link.user.nick, AmountToString(win_insurance_units), HandToString(dealer_hand,identity in utf8users,False,False)))
|
||||
UpdateSidebetRecord(link,"insurance",True,False,win_insurance_units)
|
||||
|
@ -730,6 +731,7 @@ def Insurance(link,cmd):
|
|||
link.send('%s loses %s insurance - dealer had no blackjack' % (link.user.nick, AmountToString(insurance_units)))
|
||||
UpdateSidebetRecord(link,"insurance",False,True,insurance_units)
|
||||
link.send("%s: Your hand is %s. Dealer's hand is %s" % (link.user.nick, PlayerHandsToString(link,True),HandToString(dealer_hand,identity in utf8users,True,False)))
|
||||
if identity in players:
|
||||
players[identity]['insurance'] = True
|
||||
|
||||
def IsCurrentPlayerHandASplitAce(link):
|
||||
|
|
Loading…
Reference in a new issue