Prev: 37395 Up: Map Next: 37613
37557: Action: Add To The Player's Strength
Used by the routines at Action_RollAgainstTen and Event_ARandomHalf.
Adds 10 to the player's strength. At 128 the player reads that foul gluttony has killed you. Reached through the action lists of 0 - "You", 34 - "Food" and 38 - "Lunch" for action 27, dispatched by TriggerAction.
If the message is held back, the player's strength is not increased.
Action_AddToThePlayersStrength 37557 CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the player's strength is not increased.
37560 LD A,10 The strength added for a hit is 10.
This entry point is used by the routine at Action_RollAgainstTen.
Action_AddToThePlayersStrength_AddToTheStrength 37562 LD IX,(46860) Read *Pointer_CurrentCharacter.
37566 ADD A,(IX+5) Jump to Action_AddToThePlayersStrength_PrintTheDeath if the character's strength plus A is not below 128.
37569 CP 128
37571 JR NC,Action_AddToThePlayersStrength_PrintTheDeath
37573 LD (IX+5),A Update the character's strength.
37576 LD IX,(46856) Read *46856.
37580 LD (IX+1),255 Mark where this object is as unset.
37584 LD B,(IX+0) Load the copy count into B.
Action_AddToThePlayersStrength_Loop 37587 LD (IX+16),0 Clear the object's location.
37591 INC IX Step to the next byte of this object.
37593 DJNZ Action_AddToThePlayersStrength_Loop Loop back to Action_AddToThePlayersStrength_Loop until every copy's location is clear.
37595 RET Return.
Action_AddToThePlayersStrength_PrintTheDeath 37596 LD HL,45382 Point at the message "[0x0c] foul gluttony has{5} killed you[0x15]" (45382).
Print the message at HL.
37599 CALL PrintMessage Call PrintMessage to print message.
37602 LD A,(46826) Read *CurrentCharacter.
37605 JP Turn_ThePlayerHasDied_0 Jump to Turn_ThePlayerHasDied_0 to skip the rest of attack.
37608 LD A,131 Pass code 131 on to the naming routine.
37610 JP Message_NameFromTheOtherRecord Jump to Message_NameFromTheOtherRecord to save the address and 45088.
Prev: 37395 Up: Map Next: 37613