Here's my version of "gamble.c", and also "Habitue_dialog.h", containing an extra line for when you score 21 by drawing more cards and the gambler tries to draw to match it.
The logic is already scattered through various parts of "gamble.c" - start the game, add a card, update the table, show the end result. A natural 21 is an ace plus 10 or face card at the start of the game, so that's where I've put the code to detect it. It then sets "bStop" to true because the game won't continue if anyone got a natural 21, and also sets variable "iNatural21" to note who got it. Function 'UpdateTable()' then detects "bStop", checks "iNatural21", and ends the game appropriately.
I've played a lot of hands of vingt-un recently, partly to test the game and also when testing the new drinker/gambler characters in Santiago and Havana. It seems to work correctly.
And the earlier question still stands - do we want such characters in Cartagena taverns too? That gives players the choice of normal stakes or the casino's high stakes. (Besides, all the casino characters have "Sneak" skill 10, though they're not protected by "questchar" which means the levelling system will scramble their skills. )
The logic is already scattered through various parts of "gamble.c" - start the game, add a card, update the table, show the end result. A natural 21 is an ace plus 10 or face card at the start of the game, so that's where I've put the code to detect it. It then sets "bStop" to true because the game won't continue if anyone got a natural 21, and also sets variable "iNatural21" to note who got it. Function 'UpdateTable()' then detects "bStop", checks "iNatural21", and ends the game appropriately.
I've played a lot of hands of vingt-un recently, partly to test the game and also when testing the new drinker/gambler characters in Santiago and Havana. It seems to work correctly.
And the earlier question still stands - do we want such characters in Cartagena taverns too? That gives players the choice of normal stakes or the casino's high stakes. (Besides, all the casino characters have "Sneak" skill 10, though they're not protected by "questchar" which means the levelling system will scramble their skills. )
Attachments
Last edited: