Prev: F48B Up: Map Next: F4DD
F4C6: Lose Life
Used by the routine at ExplodeShip.
Saves the height of the stack of units and takes a ship away from the current player. If there are none left the game is over for the player. Otherwise, in a game with two players, the players are swapped.
LoseLife F4C6 LD A,($C905) The stack height.
F4C9 LD ($F600),A Update the height of the stack of units that the ship carries.
F4CC LD A,($F5ED) The ships remaining.
F4CF DEC A Step A back.
F4D0 LD ($F5ED),A Update the ships remaining.
F4D3 JR Z,GameOver Jump to GameOver if the zero flag is set.
F4D5 LD A,($F2E2) The two player flag.
F4D8 AND A Call SwapPlayers if A is not zero.
F4D9 CALL NZ,SwapPlayers
F4DC RET Return.
Prev: F48B Up: Map Next: F4DD