![]() |
Routines |
| Prev: 62205 | Up: Map | Next: 62603 |
|
Used by the routine at Action_Kill.
Fight whichever opponent the player named.
|
||||
| Handler_FightOpponent | 62219 | LD HL,59517 | Jump to Handler_FightOpponent_ElfBow unless the player named the elf with the sword. | |
| 62222 | CALL Parser_AdvanceToSeparator | |||
| 62225 | JR NZ,Handler_FightOpponent_ElfBow | |||
| 62227 | LD HL,59153 | Call Parser_SkipToken to skip to the object named by this phrase. | ||
| 62230 | CALL Parser_SkipToken | |||
| 62233 | BIT 7,A | Jump back to Response_HesAlreadyDead when the named opponent is already dead. | ||
| 62235 | JP Z,Response_HesAlreadyDead | |||
| 62238 | LD (47949),A | Call Handler_RequireSword to make sure the player is holding the sword. | ||
| 62241 | CALL Handler_RequireSword | |||
| 62244 | LD A,10 | Call Handler_ResolveAttack to resolve the attack on the named opponent. | ||
| 62246 | CALL Handler_ResolveAttack | |||
| 62249 | CALL Handler_ApplyCombatResult | Call Handler_ApplyCombatResult to turn the defeated opponent into its corpse. | ||
| 62252 | LD A,(47949) | Jump to Handler_FightOpponent_Next unless the value 130 matches. | ||
| 62255 | CP 130 | |||
| 62257 | JR NZ,Handler_FightOpponent_Next | |||
| 62259 | LD A,134 | Remove object 134 (the centaur) from the game. | ||
| 62261 | CALL Handler_RemoveItemFromPlay | |||
| Handler_FightOpponent_Next | 62264 | LD HL,57156 | Print "Your blow strikes true.". | |
| 62267 | CALL PausePrintStringAndScroll | |||
|
Reply with "The Elf is dead.".
|
||||
| 62270 | LD HL,57251 | Print "The Elf is dead." and return to the game loop. | ||
| 62273 | JP PrintResponse | |||
| Handler_FightOpponent_ElfBow | 62276 | LD HL,59521 | Jump to Handler_FightOpponent_WarriorSword unless the player named the elf with the bow. | |
| 62279 | CALL Parser_AdvanceToSeparator | |||
| 62282 | JR NZ,Handler_FightOpponent_WarriorSword | |||
| 62284 | LD HL,59153 | Call Parser_SkipToken to skip to the object named by this phrase. | ||
| 62287 | CALL Parser_SkipToken | |||
| 62290 | BIT 7,A | Jump back to Response_HesAlreadyDead when the named opponent is already dead. | ||
| 62292 | JP Z,Response_HesAlreadyDead | |||
| 62295 | LD (47949),A | Call Handler_CheckWeapon to make sure the player is holding the bow and some arrows. | ||
| 62298 | CALL Handler_CheckWeapon | |||
| 62301 | LD A,5 | Call Handler_AnnounceArrow to announce the arrow. | ||
| 62303 | CALL Handler_AnnounceArrow | |||
| 62306 | CALL Handler_ApplyCombatResult | Call Handler_ApplyCombatResult to turn the defeated opponent into its corpse. | ||
| 62309 | LD A,(47949) | Jump to Handler_FightOpponent_PerfectShot unless the value 130 matches. | ||
| 62312 | CP 130 | |||
| 62314 | JR NZ,Handler_FightOpponent_PerfectShot | |||
| 62316 | LD A,134 | Remove object 134 (the centaur) from the game. | ||
| 62318 | CALL Handler_RemoveItemFromPlay | |||
| Handler_FightOpponent_PerfectShot | 62321 | LD HL,57102 | Print "Well done! A perfect shot.". | |
| 62324 | CALL PausePrintStringAndScroll | |||
|
Reply with "The Elf is dead.".
|
||||
| 62327 | LD HL,57251 | Print "The Elf is dead." and return to the game loop. | ||
| 62330 | JP PrintResponse | |||
| Handler_FightOpponent_WarriorSword | 62333 | LD HL,59525 | Jump to Handler_FightOpponent_WarriorBow unless the player named the dead warrior. | |
| 62336 | CALL Parser_AdvanceToSeparator | |||
| 62339 | JR NZ,Handler_FightOpponent_WarriorBow | |||
| 62341 | LD HL,59167 | Call Parser_SkipToken to skip to the object named by this phrase. | ||
| 62344 | CALL Parser_SkipToken | |||
| 62347 | BIT 7,A | Jump back to Response_ItsAlreadyDead when the named opponent is already dead. | ||
| 62349 | JP Z,Response_ItsAlreadyDead | |||
| 62352 | LD (47949),A | Call Handler_RequireSword to make sure the player is holding the sword. | ||
| 62355 | CALL Handler_RequireSword | |||
| 62358 | LD A,1 | Call Handler_ResolveAttack to resolve the attack on the named opponent. | ||
| 62360 | CALL Handler_ResolveAttack | |||
| 62363 | CALL Handler_ApplySecondCombatResult | Call Handler_ApplySecondCombatResult to turn the second defeated opponent into its corpse. | ||
| 62366 | LD HL,57156 | Print "Your blow strikes true.". | ||
| 62369 | CALL PausePrintStringAndScroll | |||
|
Reply with "The lizard falls to the ground.
It is dead.".
|
||||
| 62372 | LD HL,57268 | Print "The lizard falls to the ground. It is dead." and return to the game loop. | ||
| 62375 | JP PrintResponse | |||
| Handler_FightOpponent_WarriorBow | 62378 | LD HL,59534 | Jump to Handler_FightOpponent_MonsterBow unless the player named the dead warrior. | |
| 62381 | CALL Parser_AdvanceToSeparator | |||
| 62384 | JR NZ,Handler_FightOpponent_MonsterBow | |||
| 62386 | LD HL,59167 | Call Parser_SkipToken to skip to the object named by this phrase. | ||
| 62389 | CALL Parser_SkipToken | |||
| 62392 | BIT 7,A | Jump back to Response_ItsAlreadyDead when the named opponent is already dead. | ||
| 62394 | JP Z,Response_ItsAlreadyDead | |||
| 62397 | LD (47949),A | Call Handler_CheckWeapon to make sure the player is holding the bow and some arrows. | ||
| 62400 | CALL Handler_CheckWeapon | |||
| 62403 | LD A,5 | Call Handler_AnnounceArrow to announce the arrow. | ||
| 62405 | CALL Handler_AnnounceArrow | |||
| 62408 | CALL Handler_ApplySecondCombatResult | Call Handler_ApplySecondCombatResult to turn the second defeated opponent into its corpse. | ||
| 62411 | LD HL,57102 | Print "Well done! A perfect shot.". | ||
| 62414 | CALL PausePrintStringAndScroll | |||
|
Reply with "The lizard falls to the ground.
It is dead.".
|
||||
| 62417 | LD HL,57268 | Print "The lizard falls to the ground. It is dead." and return to the game loop. | ||
| 62420 | JP PrintResponse | |||
| Handler_FightOpponent_MonsterBow | 62423 | LD HL,59556 | Jump to Handler_FightOpponent_GlowingRock unless the player named the monster with the bow. | |
| 62426 | CALL Parser_AdvanceToSeparator | |||
| 62429 | JR NZ,Handler_FightOpponent_GlowingRock | |||
| 62431 | CALL Handler_CheckWeapon | Call Handler_CheckWeapon to make sure the player is holding the bow and some arrows. | ||
| 62434 | LD A,5 | Call Handler_AnnounceArrow to announce the arrow. | ||
| 62436 | CALL Handler_AnnounceArrow | |||
| 62439 | LD A,30 | Destroy object 30 (the slime monster). | ||
| 62441 | CALL Handler_DestroyItem | |||
| 62444 | LD HL,57102 | Print "Well done! A perfect shot.". | ||
| 62447 | CALL PausePrintStringAndScroll | |||
|
Reply with "The stricken monster slides
back into the oozing slime.".
|
||||
| 62450 | LD HL,57353 | Print "The stricken monster slides back into the oozing slime." and return to the game loop. | ||
| 62453 | JP PrintResponse | |||
| Handler_FightOpponent_GlowingRock | 62456 | LD HL,59543 | Jump to Handler_FightOpponent_ClosedDoor unless the player named the glowing rock. | |
| 62459 | CALL Parser_AdvanceToSeparator | |||
| 62462 | JR NZ,Handler_FightOpponent_ClosedDoor | |||
| 62464 | LD A,22 | Jump to Response_ItsAlreadyDead if object 22 (the dragon) is not here. | ||
| 62466 | CALL IsObjectInCurrentRoom | |||
| 62469 | JP NZ,Response_ItsAlreadyDead | |||
| 62472 | CALL Handler_CheckWeapon | Call Handler_CheckWeapon to make sure the player is holding the bow and some arrows. | ||
| 62475 | XOR A | Call Handler_AnnounceArrow to announce the arrow. | ||
| 62476 | CALL Handler_AnnounceArrow | |||
| 62479 | LD BC,5655 | Replace object 22 (the dragon) with object 23 (the dead dragon). | ||
| 62482 | CALL TransformItem | |||
|
Reply with "You have killed it.".
|
||||
| 62485 | LD HL,57312 | Print "You have killed it." and return to the game loop. | ||
| 62488 | JP PauseAndPrintResponse | |||
| Handler_FightOpponent_ClosedDoor | 62491 | LD HL,59547 | Jump to Handler_FightOpponent_LogBridgeSword unless the player named a closed door. | |
| 62494 | CALL Parser_AdvanceToSeparator | |||
| 62497 | JR NZ,Handler_FightOpponent_LogBridgeSword | |||
| 62499 | LD A,138 | Jump to Response_ShesAlreadyDead if object 138 (the wood nymph) is not here. | ||
| 62501 | CALL IsObjectInCurrentRoom | |||
| 62504 | JP NZ,Response_ShesAlreadyDead | |||
| 62507 | CALL Handler_CheckWeapon | Call Handler_CheckWeapon to make sure the player is holding the bow and some arrows. | ||
| 62510 | XOR A | Call Handler_AnnounceArrow to announce the arrow. | ||
| 62511 | CALL Handler_AnnounceArrow | |||
| 62514 | LD BC,35356 | Replace object 138 (the wood nymph) with object 28 (the dead wood nymph). | ||
| 62517 | CALL TransformItem | |||
| 62520 | LD A,137 | Destroy object 137 (the nymph's glimpse). | ||
| 62522 | CALL Handler_DestroyItem | |||
|
Reply with "You have killed her.".
|
||||
| 62525 | LD HL,57332 | Print "You have killed her." and return to the game loop. | ||
| 62528 | JP PauseAndPrintResponse | |||
| Handler_FightOpponent_LogBridgeSword | 62531 | LD HL,59560 | Jump to Handler_FightOpponent_LogBridgeBow unless the player named the log bridge. | |
| 62534 | CALL Parser_AdvanceToSeparator | |||
| 62537 | JR NZ,Handler_FightOpponent_LogBridgeBow | |||
| 62539 | CALL Handler_RequireSword | Call Handler_RequireSword to make sure the player is holding the sword. | ||
| 62542 | LD A,10 | Call Handler_ResolveAttack to resolve the attack on the named opponent. | ||
| 62544 | CALL Handler_ResolveAttack | |||
| 62547 | LD A,41 | Destroy object 41 (the demons). | ||
| 62549 | CALL Handler_DestroyItem | |||
| 62552 | LD A,73 | Open the way east, then pause and print "The demons scream with panic, then fade away." and return to the game loop. | ||
| 62554 | LD (60122),A | |||
| 62557 | LD HL,57409 | |||
| 62560 | JP PauseAndPrintResponse | |||
| Handler_FightOpponent_LogBridgeBow | 62563 | LD HL,59564 | Jump to Handler_FightOpponent_RingWornSword unless the player named the log bridge. | |
| 62566 | CALL Parser_AdvanceToSeparator | |||
| 62569 | JR NZ,Handler_FightOpponent_RingWornSword | |||
| 62571 | CALL Handler_CheckWeapon | Call Handler_CheckWeapon to make sure the player is holding the bow and some arrows. | ||
|
Reply with "Arrows have no effect.".
|
||||
| 62574 | LD HL,57455 | Print "Arrows have no effect." and return to the game loop. | ||
| 62577 | JP PrintResponse | |||
| Handler_FightOpponent_RingWornSword | 62580 | LD HL,59568 | Jump to Handler_KillTheWarrior_RingWornBow unless the player named the ring being worn. | |
| 62583 | CALL Parser_AdvanceToSeparator | |||
| 62586 | JR NZ,Handler_KillTheWarrior_RingWornBow | |||
| 62588 | LD A,39 | Jump to Response_HesAlreadyDead when object 39 (the dead blacksmith) is here. | ||
| 62590 | CALL IsObjectInCurrentRoom | |||
| 62593 | JP Z,Response_HesAlreadyDead | |||
| 62596 | CALL Handler_RequireSword | Call Handler_RequireSword to make sure the player is holding the sword. | ||
| 62599 | XOR A | Call Handler_ResolveAttack to resolve the attack on the named opponent. | ||
| 62600 | CALL Handler_ResolveAttack | |||
| Prev: 62205 | Up: Map | Next: 62603 |