Prev: 9213 Up: Map Next: 92ED
92B5: Action: Add To The Player's Strength
Used by the routines at Action_RollAgainstTen and Event_ARandomHalf.
Adds 0A to the player's strength. At 80 the player reads that foul gluttony has killed you. Reached through the action lists of $00 - "You", $22 - "Food" and $26 - "Lunch" for action 1B, dispatched by TriggerAction.
If the message is held back, the player's strength is not increased.
Action_AddToThePlayersStrength 92B5 CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the player's strength is not increased.
92B8 LD A,$0A The strength added for a hit is 0A.
This entry point is used by the routine at Action_RollAgainstTen.
Action_AddToThePlayersStrength_AddToTheStrength 92BA LD IX,($B70C) Read *Pointer_CurrentCharacter.
92BE ADD A,(IX+$05) Jump to Action_AddToThePlayersStrength_PrintTheDeath if the character's strength plus A is not below 80.
92C1 CP $80
92C3 JR NC,Action_AddToThePlayersStrength_PrintTheDeath
92C5 LD (IX+$05),A Update the character's strength.
92C8 LD IX,($B708) Read *B708.
92CC LD (IX+$01),$FF Mark where this object is as unset.
92D0 LD B,(IX+$00) Load the copy count into B.
Action_AddToThePlayersStrength_Loop 92D3 LD (IX+$10),$00 Clear the object's location.
92D7 INC IX Step to the next byte of this object.
92D9 DJNZ Action_AddToThePlayersStrength_Loop Loop back to Action_AddToThePlayersStrength_Loop until every copy's location is clear.
92DB RET Return.
Action_AddToThePlayersStrength_PrintTheDeath 92DC LD HL,$B146 Point at the message "[0x0c] foul gluttony has{5} killed you[0x15]" (B146).
Print the message at HL.
92DF CALL PrintMessage Call PrintMessage to print message.
92E2 LD A,($B6EA) Read *CurrentCharacter.
92E5 JP Turn_ThePlayerHasDied_0 Jump to Turn_ThePlayerHasDied_0 to skip the rest of attack.
92E8 LD A,$83 Pass code 83 on to the naming routine.
92EA JP Message_NameFromTheOtherRecord Jump to Message_NameFromTheOtherRecord to save the address and B020.
Prev: 9213 Up: Map Next: 92ED