Prev: 27265 Up: Map Next: 27309
27267: Action: Wear
Wears the object. It must be carried and in this room, and it must not already be worn. The worn id replaces the object's location and the carried count drops.
WearObject 27267 CALL ObjectAddress Point at the object. Already worn is refused.
27270 LD A,(23946)
27273 CP C
27274 JR NZ,WearObject_Held
27276 LD A,29 Message 29: you are wearing it.
27278 JP GetObject_Refuse
WearObject_Held 27281 LD A,(23945) A carried object is taken off the carried count.
27284 CP C
27285 JR Z,WearObject_Count
27287 LD A,(23943) In this room, it can be worn.
27290 CP C
27291 JR Z,WearObject_Take
27293 LD A,22 Message 22: it is not here.
27295 JP GetObject_Refuse
WearObject_Count 27298 PUSH HL One fewer object is carried.
27299 LD HL,23948
27302 DEC (HL)
27303 POP HL
WearObject_Take 27304 LD A,(23946) The worn id replaces the object's location.
27307 LD (HL),A
27308 RET Return.
Prev: 27265 Up: Map Next: 27309