Prev: A9BD Up: Map Next: A9E5
A9D6: Has the player won?
Used by the routine at END_OF_TURN.
The first thing END_OF_TURN does. The game is won when the valuable treasure, object $23, is held by the wooden chest, object $25 -- byte 1 of the treasure's record. Then a cheering crowd of dwarves, hobbits and elves carries the player off into the sunset, and the game waits for a key and starts again, through the tail of PLAYER_DIES.
CHECK_WON A9D6 LD A,(VALUABLE_TREASURE_HOLDER) The treasure not in the chest? Play on
A9D9 CP $25
A9DB RET NZ
A9DC LD HL,MSG_A_C_H_E "a cheering crowd of dwarves, hobbits and elves appears..."; wait and start again
A9DF CALL RUN_MESSAGE_HL
A9E2 JP WAIT_AND_RESTART
Prev: A9BD Up: Map Next: A9E5