Bladeren bron

Fixed bug where dealer has blackjack in inusrance phase but doesn't reveal it

Bug caused insurance payouts to not be paid and allowed play to continue when it should have ended with dealer blackjack revealed.
kirath 8 maanden geleden
bovenliggende
commit
fd72e9e08c
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 3 3
      locations/casino.qsrc

+ 3 - 3
locations/casino.qsrc

@@ -861,9 +861,8 @@ if $ARGS[0] = 'insurance1':
 end
 
 if $ARGS[0] = 'insurance2':
-	if deckFace[dealerCards[1]] > 9: gs 'casino', 'blackjack_view', 1
-	if deckFace[dealerCards[1]] < 10: gs 'casino', 'blackjack_view'
-	if dealerPoints = 21:
+	if dealerPoints = 21 or deckFace[dealerHand[1]] > 9:
+      	gs 'casino', 'blackjack_view', 1
 		*pl 'DEALER WINS'
 		*p 'The dealer takes your <<playerBets[0]>> <b>₽</b> bet'
 		if insurance > 0: *p ' but also gives you <<insurance>> <b>₽</b> for your side bet'
@@ -872,6 +871,7 @@ if $ARGS[0] = 'insurance2':
 		money += insurance
 		act 'Continue' : gt 'casino', 'blackjack_play'
 	else
+      	gs 'casino', 'blackjack_view'
 		*pl 'The dealer takes a peek at his hole card; no blackjack.'
 		if insurance > 0: *p 'He relieves you of <<insurance>> <b>₽</b> for your side bet.'
 		money -= insurance