Prev: 37337 Up: Map Next: 37421
37344: Player Action: Raise
Used by the routine at InGame_Select.
The player isn't allowed to raise on the last of their turns.
PlayerAction_Raise 37344 LD A,(36441) Jump to InGameControls if *InteractionCounter is equal to 7.
37347 CP 7
37349 JP Z,InGameControls
The player can't raise if they have no cash.
37352 LD A,(38581) C=*PlayerCash.
37355 LD C,A
37356 OR A Jump to InGameControls if *PlayerCash is zero.
37357 JP Z,InGameControls
The player can't raise if the girl has no cash.
37360 LD A,(38582) Jump to InGameControls if *GirlCash is zero.
37363 OR A
37364 JP Z,InGameControls
Both the player and the girl have cash, but the current raise amount can't take the cash the player has down to zero (they'll have nothing left to raise with).
37367 LD A,(38583) Jump to InGameControls if *CurrentRaiseValue minus *PlayerCash is zero.
37370 SUB C
37371 JP Z,InGameControls
Finally, we're good to go ahead to let the player make a raise, but ... process the girls raise first.
37374 ADD A,C Restore *CurrentRaiseValue back to A.
37375 PUSH AF Stash the current raise amount on the stack.
Update the display.
37376 LD A,1 Write 1 to *CurrentRaiseValue.
37378 LD (38583),A
37381 CALL PrintStats Call PrintStats.
Action the girls raise.
37384 POP AF Restore the current raise amount from the stack.
37385 LD (38583),A Write A to *CurrentRaiseValue.
37388 CALL PlayerAddToPot Call PlayerAddToPot.
Initialise the raise amount for the player.
37391 LD A,1 Write 1 to *CurrentRaiseValue.
37393 LD (38583),A
Get the new raise amount.
37396 CALL HandlerRaising Call HandlerRaising.
Now, action it.
37399 LD A,(38581) Take the raise amount away from *PlayerCash (and write it back to *PlayerCash).
37402 SUB B
37403 LD (38581),A
37406 LD A,(38580) Add the raise amount to *PotValue (and write it back to *PotValue).
37409 ADD A,B
37410 LD (38580),A
Display a random "nervous about the player raising" message.
ID Message ID Message
1 message-16-00 2 message-16-01
3 message-16-02 4 message-16-03
5 message-16-04 6 message-16-05
37413 LD A,16 Call Messaging_Girl using message block 16.
37415 CALL Messaging_Girl
37418 LD A,1 Return with A=1 ("raise").
37420 RET
Prev: 37337 Up: Map Next: 37421