Orbi-Raiders: power-ups as on the Stage B sheet
Paul decided the approved power-up sheet wins over the brief: Turbo Tuner lasts 10 s, Double Broadcast 12 s, and the Guide Bomb clears one row (the lowest occupied row of the grid, divers included, a Corrupt Pixel doesn't split; the Dead Channel and its sprites are immune). Tests and the prototype doc updated (43 Raiders tests pass). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -108,13 +108,13 @@ internal class Spark {
|
||||
var colour = 0
|
||||
}
|
||||
|
||||
/** The six power-ups (Stage B power-up sheet, timings from the approved proposal). Four are timed and only one of those is ever on. */
|
||||
/** The six power-ups, as on the approved Stage B power-up sheet (Paul, 8 Nov 2026: the sheet wins over the brief). Four are timed and only one of those is ever on. */
|
||||
internal enum class Power(val title: String, val line: String, val seconds: Float, val weight: Int) {
|
||||
SignalShield("Signal Shield", "Soaks up one hit", 8f, 22),
|
||||
TurboTuner("Turbo Tuner", "Faster ship", 8f, 18),
|
||||
TurboTuner("Turbo Tuner", "Faster ship", 10f, 18),
|
||||
RewindBurst("Rewind Burst", "Pushes the wave back up", 3f, 14),
|
||||
DoubleBroadcast("Double Broadcast", "Two shots", 10f, 22),
|
||||
GuideBomb("Guide Bomb", "Clears the weak invaders", 0f, 12),
|
||||
DoubleBroadcast("Double Broadcast", "Two shots", 12f, 22),
|
||||
GuideBomb("Guide Bomb", "Clears the lowest row", 0f, 12),
|
||||
OrbitOverdrive("Orbit Overdrive", "Fills Overdrive", 0f, 12);
|
||||
|
||||
val timed get() = seconds > 0f
|
||||
@@ -675,7 +675,7 @@ internal class RaidersSim(var pilot: Pilot = Pilot.Ollie, difficulty: Difficulty
|
||||
kill(e)
|
||||
}
|
||||
|
||||
private fun kill(e: Enemy) {
|
||||
private fun kill(e: Enemy, split: Boolean = true) {
|
||||
e.active = false
|
||||
streak++
|
||||
score += Kind.points[e.kind] * multiplier
|
||||
@@ -686,7 +686,7 @@ internal class RaidersSim(var pilot: Pilot = Pilot.Ollie, difficulty: Difficulty
|
||||
// Its place in the pool is free now and may be reused by the first half, so read it all first.
|
||||
val kind = e.kind; val x = e.x; val y = e.y; val slotX = e.slotX; val slotY = e.slotY
|
||||
val mode = if (e.mode == M_FORM) M_FORM else M_RETURN
|
||||
if (kind == Kind.PIXEL) {
|
||||
if (split && kind == Kind.PIXEL) {
|
||||
spawn(Kind.PIXEL_SMALL, slotX - 8f, slotY, mode)?.let { it.x = x - 8f; it.y = y }
|
||||
spawn(Kind.PIXEL_SMALL, slotX + 8f, slotY, mode)?.let { it.x = x + 8f; it.y = y }
|
||||
}
|
||||
@@ -737,9 +737,15 @@ internal class RaidersSim(var pilot: Pilot = Pilot.Ollie, difficulty: Difficulty
|
||||
fun collect(p: Power) {
|
||||
events = events or Events.POWER
|
||||
when (p) {
|
||||
Power.GuideBomb -> for (i in enemies.indices) {
|
||||
val e = enemies[i]
|
||||
if (e.active && (e.kind == Kind.STATIC || e.kind == Kind.PIXEL_SMALL || e.kind == Kind.GREMLIN || e.kind == Kind.MINION)) { damage += e.hp; kill(e) }
|
||||
Power.GuideBomb -> {
|
||||
// Clears one row of the grid: the lowest occupied formation row (its divers too), whatever the invaders in
|
||||
// it are. A Corrupt Pixel caught by it doesn't split. The Dead Channel and its free-flying sprites aren't
|
||||
// in a row, so they're immune.
|
||||
var row = -1f
|
||||
for (e in enemies) if (e.active && e.kind != Kind.MINION && e.slotY > row) row = e.slotY
|
||||
if (row >= 0f) for (e in enemies) {
|
||||
if (e.active && e.kind != Kind.MINION && abs(e.slotY - row) < .5f) { damage += e.hp; kill(e, split = false) }
|
||||
}
|
||||
}
|
||||
Power.OrbitOverdrive -> meter = 1f
|
||||
else -> { power = p; powerLeft = p.seconds }
|
||||
|
||||
Reference in New Issue
Block a user