Prev: 61840 Up: Map Next: 62061
61974: Action: Give
Give the chest or the crystals to the blacksmith.
Action_Give 61974 CALL Parser_ValidateTwoDirectObjects Call Parser_ValidateTwoDirectObjects.
61977 RET C Return if the direct object is malformed.
Was the player trying to give ... to the old man / blacksmith?
61978 LD HL,59459 Call Parser_AdvanceToSeparator with 59459.
61981 CALL Parser_AdvanceToSeparator
61984 JR NZ,Give_YouCant Jump to Give_YouCant if the token isn't for the old man.
61986 LD A,37 Jump to Give_CheckOpenChest if ValidateItemPresent reports that "The blacksmith. He says:- 'I have been instructed to make a mighty sword for you" is in the current room.
61988 CALL ValidateItemPresent
61991 JR Z,Give_CheckOpenChest
Print "You can't.He's dead.".
61993 LD HL,56632 HL=Messaging_YouCantHesDead.
61996 JP PrintResponse Jump to PrintResponse.
Give_CheckOpenChest 61999 LD A,13 Jump to Give_CheckCrystals if ValidateItemPresent reports that "An open chest containing the Crystals of Vulcan" isn't in the current room.
62001 CALL ValidateItemPresent
62004 JR NZ,Give_CheckCrystals
62006 LD BC,3342 Call TransformItem to transform "An open chest containing the Crystals of Vulcan" into "An empty chest".
62009 CALL TransformItem
62012 JR Give_HandOver Jump to Give_HandOver.
Give_CheckCrystals 62014 LD A,15 Call IsObjectCarried with item 15: "The Crystals of Vulcan".
62016 CALL IsObjectCarried
62019 JR NZ,Give_HandOver Jump to Give_HandOver if "The Crystals of Vulcan" isn't held.
62021 LD HL,47720 Decrease *Count_InventoryItems by one.
62024 DEC (HL)
Give_HandOver 62025 LD A,15 Call Handler_DestroyItem with item 15: "The Crystals of Vulcan".
62027 CALL Handler_DestroyItem
62030 LD BC,9510 Call TransformItem to transform "The blacksmith. He says:- 'I have been instructed to make a mighty sword for you" into "The blacksmith".
62033 CALL TransformItem
62036 LD A,136 Call Handler_DestroyItem with 136.
62038 CALL Handler_DestroyItem
62041 LD A,10 Call Handler_UpdateItemForTheCurrentRoom with item 10: "A sword".
62043 CALL Handler_UpdateItemForTheCurrentRoom
Print "You give him the crystals. He puts them in the flames.".
62046 LD HL,56653 HL=Messaging_YouGiveHimTheCrystals.
62049 CALL PrintStringAndNewline Call PrintStringAndNewline.
Print "After some time, he shapes a piece of metal from the fire,on the anvil. He produces a fine sword.".
62052 LD HL,56708 HL=Messaging_AfterSomeTime.
62055 JP PauseAndPrintResponse Jump to PauseAndPrintResponse.
Nothing else is valid.
Give_YouCant 62058 JP Response_YouCant_GameLoop Jump to Response_YouCant_GameLoop.
Prev: 61840 Up: Map Next: 62061