Prev: F440 Up: Map Next: F4DD
F4C6: Take a life from the current player
Used by the routine at play.
Keeps the ore aboard (ore) in the player's record (+25, ore_kept), takes a life (+6), and if that was the last ends the player's game (game_over). Otherwise, with two players, hands over to the other one (swap_players).
The JR Z tests the flags the DEC A leaves; LD does not touch them. With the DEC A taken out (a NOP poked over it, as stage 0's infinite-lives poke did) the JR Z picks up the zero flag left by the last DEC C of clear_play_area, which the death sequence has just run, and every death goes to game_over with the lives kept. An OR A in its place keeps the lives and tests them (run for the reference pages).
lose_life F4C6 LD A,(ore) Keep the ore aboard in the record
F4C9 LD (ore_kept),A
F4CC LD A,(lives) A life less; none left: game over
F4CF DEC A
F4D0 LD (lives),A
F4D3 JR Z,game_over
F4D5 LD A,(player_count) Two players: the other one's turn
F4D8 AND A
F4D9 CALL NZ,swap_players
F4DC RET
Prev: F440 Up: Map Next: F4DD