boss waves

This commit is contained in:
2026-06-03 21:30:38 +02:00
parent 457fc47c75
commit b5185b0906
10 changed files with 214 additions and 162 deletions

View File

@@ -75,12 +75,12 @@ TEST_CASE("ConfigLoader loads the committed bin/config/ configs end-to-end", "[c
REQUIRE(cfg.world.regions.playerBufferWidth == 10);
REQUIRE(cfg.world.regions.enemyBufferWidth == 15);
REQUIRE(cfg.world.expansion.columnsPerExpansion == 10);
REQUIRE(cfg.world.push.scalingFactor == Approx(1.2));
REQUIRE(cfg.world.push.bossAdvanceSeconds == Approx(60.0));
// Spot-check that a config-derived formula computes as expected.
// threat_rate_formula = "1*x - 30": zero at x=30, 30 at x=60.
REQUIRE(cfg.world.waves.threatRateFormula.evaluate(30.0) == Approx(0.0));
REQUIRE(cfg.world.waves.threatRateFormula.evaluate(60.0) == Approx(30.0));
// threat_rate_formula = "x": evaluates to the input value.
REQUIRE(cfg.world.waves.threatRateFormula.evaluate(1.0) == Approx(1.0));
REQUIRE(cfg.world.waves.threatRateFormula.evaluate(5.0) == Approx(5.0));
// buildings.toml
REQUIRE(cfg.buildings.buildings.size() >= 8);
@@ -222,11 +222,11 @@ cost_building_blocks = 200
[push]
push_expand_columns = 20
scaling_factor = 1.2
boss_advance_seconds = 60
[waves]
threat_rate_formula = "1 +"
ship_level_formula = "1 + x / 120"
ship_level_formula = "1 + x / 10"
gap_min_seconds = 15
gap_max_seconds = 45
spawn_duration_seconds = 10