#233: open with fewer enemies, of one kind, arriving in sequence
Measured before changing anything. The ticket's two halves needed opposite
fixes, and the first one made the second worse.
TOO COMPLEX. Variety was gated on fleet size alone, so a player who had
grown early met two kinds of trouble in the first wave they ever saw - a
fleet of four opened on two lancers and three chasers. Each roster entry now
carries a min_wave as well, so the openings teach one enemy at a time
whatever the fleet already looks like.
That alone pushed wave 1 against a fleet of six from a mixed six to SEVEN
chasers: budget that used to buy a lancer now bought two more chasers. So an
early wave also has a size ceiling, 2 + wave_number * 2. Wave 1 is four
chasers at any fleet size; the cap stops binding by wave 6 and nothing about
later balance moves.
before wave 1 fleet 4 -> 2 lancers, 3 chasers
wave 1 fleet 6 -> 1 sniper, 2 lancers, 3 chasers
after wave 1 fleet 4 -> 4 chasers
wave 1 fleet 6 -> 4 chasers
ARRIVE AT THE SAME TIME was literal: the whole wave spawned inside one frame
as a closed ring around the fleet, which reads as a wall rather than as an
attack. The first hull still lands immediately so a wave is never felt as
late, and the rest follow every 0.45s. Same enemies, same bearing, same
total - they simply do not all exist at once.
Four existing cases objected, and each was right to: they encode intents
that still hold LATER - a large wave must be varied, fleet growth must open
more kinds, a wave can field a lancer at all, and killing a wave must bring
the quiet back. The first three now ask at a wave number where variety is
permitted rather than being weakened. The fourth runs the arrivals out
before killing anything, and gained an assertion that doing so ADDS enemies
- which fails if the staggering ever collapses back into one frame.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019AJMdB7iuHuLFZM1aBu3GD
This commit is contained in:
parent
885f977768
commit
cb3650e3a9
4 changed files with 138 additions and 21 deletions
|
|
@ -3275,14 +3275,30 @@ func wave_strength(fleet_size: int) -> int:
|
|||
# roster until the fleet is big enough to have earned it. At BASE_FLEET_SIZE
|
||||
# the player meets chasers and nothing else, however long they take, and each
|
||||
# vessel past the starting three opens exactly one new kind of trouble.
|
||||
#
|
||||
# min_wave is the third gate (#233). min_fleet alone still let a player who
|
||||
# had grown early meet two kinds of trouble in the FIRST wave they ever saw -
|
||||
# a fleet of four opened on two lancers and three chasers. Whatever the fleet
|
||||
# looks like, the opening waves teach one enemy at a time.
|
||||
const WAVE_ROSTER: Array = [
|
||||
{"id": "artillery", "cost": 9, "min_strength": 26, "min_fleet": 6},
|
||||
{"id": "sniper", "cost": 6, "min_strength": 16, "min_fleet": 5},
|
||||
{"id": "lancer", "cost": 4, "min_strength": 12, "min_fleet": 4},
|
||||
{"id": "chaser", "cost": 3, "min_strength": 0, "min_fleet": 0},
|
||||
{"id": "artillery", "cost": 9, "min_strength": 26, "min_fleet": 6, "min_wave": 4},
|
||||
{"id": "sniper", "cost": 6, "min_strength": 16, "min_fleet": 5, "min_wave": 3},
|
||||
{"id": "lancer", "cost": 4, "min_strength": 12, "min_fleet": 4, "min_wave": 2},
|
||||
{"id": "chaser", "cost": 3, "min_strength": 0, "min_fleet": 0, "min_wave": 0},
|
||||
]
|
||||
const WAVE_MAX_ENEMIES: int = 18
|
||||
|
||||
# How many can arrive in one wave, early on (#233). The variety gate above
|
||||
# fixed "too complex" but made the other half of that ticket WORSE: budget
|
||||
# that used to buy a lancer now buys two more chasers, so a grown fleet's
|
||||
# FIRST wave went from a mixed six to seven chasers at once.
|
||||
#
|
||||
# Strength still rises with the fleet and the wave number - it simply cannot
|
||||
# all be spent at once yet. What the budget cannot buy is not carried over;
|
||||
# an early wave is meant to be smaller, not delayed.
|
||||
func wave_max_enemies() -> int:
|
||||
return mini(WAVE_MAX_ENEMIES, 2 + wave_number * 2)
|
||||
|
||||
|
||||
func wave_composition(fleet_size: int) -> PackedStringArray:
|
||||
var budget: int = wave_strength(fleet_size)
|
||||
|
|
@ -3290,13 +3306,15 @@ func wave_composition(fleet_size: int) -> PackedStringArray:
|
|||
var out: PackedStringArray = PackedStringArray()
|
||||
for entry in WAVE_ROSTER:
|
||||
if strength < int(entry.min_strength) \
|
||||
or fleet_size < int(entry.get("min_fleet", 0)):
|
||||
or fleet_size < int(entry.get("min_fleet", 0)) \
|
||||
or wave_number < int(entry.get("min_wave", 0)):
|
||||
continue
|
||||
var cost: int = int(entry.cost)
|
||||
# The cheapest tier is last and takes whatever is left, so the budget
|
||||
# is always spent rather than rounded away.
|
||||
var share: int = budget if String(entry.id) == "chaser" else budget / 2
|
||||
while share >= cost and budget >= cost and out.size() < WAVE_MAX_ENEMIES:
|
||||
var ceiling: int = wave_max_enemies()
|
||||
while share >= cost and budget >= cost and out.size() < ceiling:
|
||||
out.append(String(entry.id))
|
||||
budget -= cost
|
||||
share -= cost
|
||||
|
|
|
|||
Loading…
Reference in a new issue