Rule. (Nuke)
Nukes are special game events. Some nukes are triggered by players.
Each player may nuke at most once per game.
Remark.
There are 3 different types of nuke: Exploder-nuke, concede, and
end-of-overtime-nuke. The level decides whether the player nuke
triggers an exploder-nuke or a concede. The player-triggered nuke comes
into effect immediately. This can trigger overtime, see overtime.
Player input is always made between updates n and n+1, and affects update
n+1. The command to nuke carries information to execute at the beginning
of update n+1, and the nuke will be in full effect during update n+1:
A lix may explode, lixes may be unassignable, or unable to enter exits,
depending on the type of nuke.
Rule. (Exploder-nuke)
Exploder-nuke may be triggered by the player iff the level allows it.
The player's number of lix in hatch is set to zero.
The player's lix explode in spawn order, one lix per physics update.
Remark.
In general, exits remain open after exploder-nuke, and the player
remains in control of his lix and may assign skills.
When the level is set to zero overtime, and the player has saved at
least one lix, exploder-nuke immediately triggers the end-of-overtime-nuke.
End-of-overtime-nuke closes the exits. See end-of-overtime-nuke.
Rule. (Concede)
Concede may be triggered by the player iff the level doesn't allow
exploder-nuke.
The player loses control of his lix, i.e., he may not assign any more
skills. Since skill assignments and nuking are the only methods of
interaction, and the player has already nuked, this is equivalent to
setting the player's skills to zero.
Remark.
In general, exits remain open after concede, lix may continue to spawn
from the player's hatches, and the player's lix do not explode.
These will only happen later, when end-of-overtime-nuke kicks in. This
may be immediately if overtime is zero -- in this case, exits close
and lix explode immedeately after conceding.
Rule. (Overtime)
Overtime may be zero, or greater than zero. Overtime starts running if
there exists a player that satisfies all of these conditions:
* The player has saved at least one lix.
* The player can't possibly have an effect on the game anymore.
This may be because he has nuked, and the exploder-nuke
has killed all his lix, or his concession has removed his control.
Remark.
Overtime may be zero from the get-go. In this case, whatever triggers
overtime always triggers the end-of-overtime nuke, because the
conditions for end-of-overtime are weaker then.
Definition. (End-of-overtime-nuke)
End-of-overtime-nuke is not triggered by the player, but happens
automatically to all players if all of these conditions are met:
* At least one player has saved at least one lix.
* The remaining overtime is zero. This may be because overtime
has begun earlier and therefore is now used up, or because the
level has been set to zero overtime.
At this time, end-of-overtime nuke kicks in. All players' lix in hatch
are set to zero. All players' lixes explode in spawn order, one from
each player per physics update. All players lose control of their lix.
All exits close. It's not possible to save after
Remark.
Here's a summary of all three nuke types.
| Exploder-nuke | Concede | End-of-overtime-nuke
---------------------|----------------------------------------------------
Triggered by whom? | player | player | end of overtime
Lix in hatch := 0? | zero in hatch | no | zero in hatch
Lix explode? | lix explode | no | lix explode
Lose control of lix? | no | lose control | lose control
Exits close? | no | no | exits close
Remark.
Each level must be set either to exploder-nuke or to concede.
When overtime is set to zero, the level's choice of nuke still matters,
because players may nuke before any player has saved anything.
Remark.
For a racing mode, set the overtime to zero. The instant any player
has saved at least one lix, end-of-overtime-nuke kicks in: No further
saves are possible, and all lixes explode.
Hunch
Argh, this is way too complicated. :-/ Where can we simplify?
Maybe remove exploder-nuke, and keep only concede?
The nuke button would express a desire to nuke all players,
the overtime overtime would become a nuke delay.