Prev: 91D9 Up: Map Next: 922D
91E0: 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 91E0 LD A,($8E59) Jump to InGameControls if *InteractionCounter is equal to 07.
91E3 CP $07
91E5 JP Z,InGameControls
The player can't raise if they have no cash.
91E8 LD A,($96B5) C=*PlayerCash.
91EB LD C,A
91EC OR A Jump to InGameControls if *PlayerCash is zero.
91ED JP Z,InGameControls
The player can't raise if the girl has no cash.
91F0 LD A,($96B6) Jump to InGameControls if *GirlCash is zero.
91F3 OR A
91F4 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).
91F7 LD A,($96B7) Jump to InGameControls if *CurrentRaiseValue minus *PlayerCash is zero.
91FA SUB C
91FB JP Z,InGameControls
Finally, we're good to go ahead to let the player make a raise, but ... process the girls raise first.
91FE ADD A,C Restore *CurrentRaiseValue back to A.
91FF PUSH AF Stash the current raise amount on the stack.
Update the display.
9200 LD A,$01 Write 01 to *CurrentRaiseValue.
9202 LD ($96B7),A
9205 CALL PrintStats Call PrintStats.
Action the girls raise.
9208 POP AF Restore the current raise amount from the stack.
9209 LD ($96B7),A Write A to *CurrentRaiseValue.
920C CALL PlayerAddToPot Call PlayerAddToPot.
Initialise the raise amount for the player.
920F LD A,$01 Write 01 to *CurrentRaiseValue.
9211 LD ($96B7),A
Get the new raise amount.
9214 CALL HandlerRaising Call HandlerRaising.
Now, action it.
9217 LD A,($96B5) Take the raise amount away from *PlayerCash (and write it back to *PlayerCash).
921A SUB B
921B LD ($96B5),A
921E LD A,($96B4) Add the raise amount to *PotValue (and write it back to *PotValue).
9221 ADD A,B
9222 LD ($96B4),A
Display a random "nervous about the player raising" message.
ID Message ID Message
01 message-16-00 02 message-16-01
03 message-16-02 04 message-16-03
05 message-16-04 06 message-16-05
9225 LD A,$10 Call Messaging_Girl using message block 10.
9227 CALL Messaging_Girl
922A LD A,$01 Return with A=01 ("raise").
922C RET
Prev: 91D9 Up: Map Next: 922D