![]()  | 
Routines | 
| Prev: 63043 | Up: Map | Next: 63201 | 
| 
 
Used by the routine at Process_KillWarrior.
 
 | 
||||
| 
 
The player wants to kill the Fomorian, check which version of the Fomorian is is in the current room.
 
 | 
||||
| Process_KillFomorian | 63135 | LD HL,58184 | Call CheckItemGroupPresent with Data_ItemGroup_Fomorian. | |
| 63138 | CALL CheckItemGroupPresent | |||
| 
 
Is the Fomorian already dead?
 
 | 
||||
| 63141 | LD HL,64650 | HL=Data_DeadFomorian. | ||
| 63144 | LD BC,3 | Set a counter in BC of the length of the table 0003. | ||
| 63147 | CPIR | Search for the version of the Fomorian found in the table of dead Fomorian item IDs. | ||
| 
 
Print "You've done that already." if the Fomorian is already dead...
 
 | 
||||
| 63149 | JP Z,Response_YouveDoneThatAlready | Jump to Response_YouveDoneThatAlready if the Fomorian is dead. | ||
| 
 
The Fomorian is alive (for now).
 
 | 
||||
| 63152 | LD (42867),A | Temporarily stash the version of the Fomorian in *TemporaryStorage_SingleByte. | ||
| 
 
Make sure the player is even carrying a sword.
 
 | 
||||
| 63155 | CALL IsPlayerCarryingSword | Call IsPlayerCarryingSword. | ||
| 63158 | LD A,(42867) | Restore the version of the Fomorian from *TemporaryStorage_SingleByte. | ||
| 
 
So uhhhh... is the player trying to kill one Fomorian or an entire tribe?
 
 | 
||||
| 63161 | CP 15 | Jump to KillFomorian if the version of the Fomorian is not "The Fomorian tribe". | ||
| 63163 | JR NZ,KillFomorian | |||
| 
 
The player is overly ambitious, and is attempting to take on an entire tribe of Fomorians.
 
Bad luck!
 
 | 
||||
| 63165 | LD HL,59826 | Switch GameOver onto the stack so the next return actions a "game over". | ||
| 63168 | EX (SP),HL | |||
| 
 
Print "You attack in vain.They quickly
overwhelm you.".
 
 | 
||||
| 63169 | LD HL,56710 | HL=Messaging_AttackInVain. | ||
| 63172 | JP PrintStringAndNewline_Duplicate | Jump to PrintStringAndNewline_Duplicate. | ||
| 
 
There's a single Fomorian present, but does the player have a sword?
 
 | 
||||
| KillFomorian | 63175 | LD A,57 | Call ValidateItemPresent with item 57: "A sword". | |
| 63177 | CALL ValidateItemPresent | |||
| 63180 | JR Z,KillFomorianWithSword | Jump to KillFomorianWithSword if "A sword" is either in the current room or in the players inventory. | ||
| 
 
Print "The Fomorian is unaffected by
your blows.".
 
 | 
||||
| 63182 | LD HL,56757 | HL=Messaging_FomorianUnaffected. | ||
| 63185 | JP PrintStringAndNewline_Duplicate | Jump to PrintStringAndNewline_Duplicate. | ||
| 
 
The player is able to kill the Fomorian with a sword.
 
 | 
||||
| KillFomorianWithSword | 63188 | LD A,(42867) | Set the "from" item ID in B, restored from *TemporaryStorage_SingleByte. | |
| 63191 | LD B,A | |||
| 63192 | ADD A,9 | Set the "destination" item ID in C which is the source ID+9. | ||
| 63194 | LD C,A | |||
| 
 
Change the Fomorian state!
 
 | 
||||
| 63195 | CALL TransformItem | Call TransformItem to transform item ID of the version of the Fomorian to one 9 higher (e.g. N/A to "The body of a Fomorian"). | ||
| 63198 | JP Response_KilledRoman | Jump to Response_KilledRoman. | ||
| Prev: 63043 | Up: Map | Next: 63201 |