When Rieekan's flagship is the last ship remaining on one side and is destroyed, two events are triggered:
General Rieekan: "When a friendly ship or friendly unique squadron is destroyed, it remains in the play area and is treated as if it was not destroyed until the end of the Status Phase."
and
Winning and Losing:
• If all ships in a fleet are destroyed, ignoring squadrons,
the game immediately ends. The player with one or
more ships remaining in the play area is the winner.
The rulebook establishes how "when", "while", "before" and "after" interact with each other, and even how to prioritise events which share the same trigger, but says nothing about "if X, Y immediately happens".
QUESTION 1: Does Rieekan ("when") trigger before, after or at the same time as the endgame condition ("if, immediately") does?
A) before: Rieekan makes the ship "not destroyed" and therefore the W&L effect does not resolve.
B) after: The game ends immediately, before Rieekan has a chance to trigger.
C) at the same time: This is the tricky one. If the destruction happened due to overlapping an obstacle or ship, Rieekan's owner gets to decide the order*, and therefore the ship is not destroyed. If the destruction happened due to enemy shooting, whether Rieekan can save the ship depends entirely on who the first player is**.
If the answer to the above is A or C, i.e. Rieekan saves (or can potentially save) the ship, and that ship or a friendly squadron then goes on to destroy the opponent's last ship, then another doubt arises:
QUESTION 2: If a ship saved by Rieekan as explained above destroys the opponent's last ship, how are victory and margin of victory decided?
A) Rieekan's fleet wins and scores 400 points. Rieekan's ship is counted as destroyed for scoring because Rieekan's ability is no longer active after the game ends.
B) Rieekan's fleet wins and scores 400 points. Rieekan's ship is not counted as destroyed for scoring because the Status Phase never happened.
C) Rieekan's fleet wins and scores 400 points. The opponent also scores 400 points, because they destroyed all of Rieekan's ships.
D) The simultaneous destruction clause*** in the rulebook applies and scores are compared to determine the victor.
*: From Effect Use and Timing :
• If two or more of a player’s effects have the same timing,
that player can resolve those effects in any order.
**: From Effect Use and Timing :
• If both players have effects with the same timing, the first
player resolves all of his effects with that timing first.
***: From Winning and Losing:
• If the last remaining ships in both fleets are destroyed at
the same time, the player with the highest score wins. If
both players have the same score, the second player wins.