Maelstrom: You don't lose your specials until you finish exploding

From 78770c57a74aa2a0f31f9a5a11ab8f73b5e46059 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 27 Apr 2026 22:06:30 -0700
Subject: [PATCH] You don't lose your specials until you finish exploding

---
 game/player.cpp | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/game/player.cpp b/game/player.cpp
index d84bfabc..3c196ad5 100644
--- a/game/player.cpp
+++ b/game/player.cpp
@@ -173,6 +173,7 @@ Player::NewWave(void)
 
 	NoShieldsThisLevel = (ShieldLevel == 0);
 }
+
 /* Returns the number of lives left */
 int 
 Player::NewShip(void)
@@ -216,8 +217,15 @@ Player::NewShip(void)
 	}
 	UpdateCamera();
 
+	// We may lose our special abilities
+	if ((special & LUCKY_IRISH) && (FastRandom(LUCK_ODDS) == 0)) {
+		special &= ~LUCKY_IRISH;
+	} else {
+		special = 0;
+	}
+
 	// In Kid Mode you automatically get air brakes
-	if ( gGameInfo.IsKidMode() ) {
+	if (gGameInfo.IsKidMode()) {
 		special |= AIR_BRAKES;
 	}
 	return(Lives);
@@ -381,12 +389,6 @@ Player::Explode(void)
 	newsprite = gNumSprites;
 	gSprites[newsprite]=new Shrapnel(x, y, xVel, yVel, gShrapnel2[Index]);
 
-	/* We may lose our special abilities */
-	if ( (special & LUCKY_IRISH) && (FastRandom(LUCK_ODDS) == 0) )
-		special &= ~LUCKY_IRISH;
-	else
-		special = 0;
-
 	/* Finish our explosion */
 	Exploding = 1;
 	Thrusting = 0;