Self-destruct destroys a ship after a countdown and can release a neutron shock wave that damages other ships. Use DESTRUCT to start the sequence or ABORT to stop it before completion. It is available in classic Galactic Empire and ge-next, but disabled in ge-arena.

What happens at zero

When the countdown reaches zero, the game sets the ship's structural damage to 101, beyond the normal destruction threshold. Existing hull condition, armor, and shields do not save the ship. Other players whose scanners cover its location receive an explosion announcement. In ge-next, that announcement uses each observer's effective scanner range; unlike the earlier countdown warnings, it does not apply the usual nebula visibility restriction.

Classic always releases an outward shock wave, even with the source ship's shields raised. In ge-next 0.3 and later, raised source shields contain the wave completely: the source ship is still destroyed, but nearby ships are not damaged. The game checks shield state when the countdown finishes, so the player can raise shields before zero to contain the wave or lower them to release it. If the wave damages other ships, ge-next reports the damage to the initiating player before the normal destruction sequence.

Shock-wave damage

With the stock settings, an uncontained wave can reach ships less than 10,000 distance units from the explosion. Each target's distance from the source determines its damage; ships exactly on the boundary are outside the effect. Classic checks targets against MINERANGE but scales blast damage using DESTRUCTRANGE; both constants default to 10,000. ge-next uses DESTRUCTRANGE for both checks. User ships and NPCs can be hit, but a ship inside the neutral zone is protected even if the explosion is nearby. The source ship itself is already lost.

Damage starts with the configurable MNDAMMAX, also used as the mine-damage maximum and set to 75 by default. It falls off cubically with distance:

proximity = 1 - (distance / 10000)
distance-scaled damage = MNDAMMAX * proximity^3

The game then truncates the distance-scaled amount to an integer before multiplying it by the exploding ship's class factor. Classic uses (ship class number / 2) + 1, with integer division: a class's position in the ship table therefore changes its blast strength. ge-next 0.3 instead uses DAMF / 100, also with integer division, so the configured damage factor determines the multiplier. A target with raised shields divides the resulting hull damage by a random value involving its shield class and also takes a separate shield-system impact. An unshielded target takes the full calculated hull damage. Near the edge, integer truncation can leave a target inside the radius but with zero hull damage.

Ownership and kill credit

The routine marks the source ship for destruction before applying the outward blast. For each unprotected ship inside the blast radius, it applies the calculated damage and then sets that ship's lastfired to -1, regardless of who last attacked it or whether the blast itself dealt enough damage to destroy it. If the target is destroyed, the later death routine finds no credited killer. A surviving target likewise loses its previous attacker attribution until another qualifying hit sets lastfired again. In ge-next, raised source shields skip the blast loop entirely, leaving other ships' lastfired values untouched.

The self-destructing player's account is not deleted. Rather, the source ship is already doomed and will be removed from active play, while normal kill processing expects a valid winner ship to receive credit and collect spoils. Depending on ship update order, the source ship could already be gone when a blast victim's death is processed. Assigning that victim's kill to the source channel would therefore credit a destroyed ship, or a slot no longer representing that combatant. Setting lastfired to -1 treats the shock wave as an unattributed cause instead; it also prevents an unrelated earlier attacker on the victim from receiving credit for the blast death.

Classic includes the exploding ship in its own shock-wave loop. After the explosion message, the player can therefore receive a second message about damage from the ship's own blast, such as “The shock wave caused severe damage Sir!” when its shields are down and the calculated damage is severe. With shields up, the message instead says that the shields deflected some of the blast. This redundant hit also clears the source ship's lastfired, so someone who damaged it before the self-destruct does not receive credit for its loss. ge-next excludes the source ship from the loop, eliminating the redundant self-hit and message. Its prior lastfired remains in place, allowing a previous attacker to receive credit if the ship self-destructs after combat.

See also