Prev: 62603 Up: Map Next: 62685
62662: 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 62662 LD A,(51461) The stack height.
62665 LD (62976),A Update the height of the stack of units that the ship carries.
62668 LD A,(62957) The ships remaining.
62671 DEC A Step A back.
62672 LD (62957),A Update the ships remaining.
62675 JR Z,GameOver Jump to GameOver if the zero flag is set.
62677 LD A,(62178) The two player flag.
62680 AND A Call SwapPlayers if A is not zero.
62681 CALL NZ,SwapPlayers
62684 RET Return.
Prev: 62603 Up: Map Next: 62685