From 55d7a4b1b9d2ae1da7cfc385694fd39a6cdb2f86 Mon Sep 17 00:00:00 2001 From: "local-model/engine-L2-grok-4.5" Date: Sat, 19 Sep 2026 11:41:18 +0200 Subject: [PATCH] engine-c: Evolved bld cluster + clash ROCK/crater --- engine-c/src/engine.c | 64 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/engine-c/src/engine.c b/engine-c/src/engine.c index 0b96dc9..4ffc150 100644 --- a/engine-c/src/engine.c +++ b/engine-c/src/engine.c @@ -204,6 +204,70 @@ static void place_showcase(Game *g, Faction human, Faction enemy) { t->terrain = T_ROAD; t->scrap = 0; } + + /* Evolved forward outpost NW of clash (visible in combat crop). + * Clear pad to wasteland BEFORE buildings; ROCK scars only after + * (T_ROCK is non-walkable and bld_can_place rejects it). */ + { + int erx = ctx - 10, ery = cty - 9; + for (int dy = -3; dy <= 5; dy++) { + for (int dx = -3; dx <= 6; dx++) { + int tx = erx + dx, ty = ery + dy; + if (!map_in_bounds(&g->map, tx, ty)) continue; + Tile *t = map_tile(&g->map, tx, ty); + if (!t) continue; + if (t->occupied) continue; + t->terrain = T_WASTELAND; + t->walkable = 1; + t->scrap = 0; + } + } + bld_spawn(g, BT_BASE, enemy, erx, ery); + bld_spawn(g, BT_BASE, enemy, erx + 3, ery); + bld_spawn(g, BT_POWER, enemy, erx - 1, ery + 2); + bld_spawn(g, BT_POWER, enemy, erx + 5, ery + 2); + bld_spawn(g, BT_WARFACTORY, enemy, erx, ery + 3); + bld_spawn(g, BT_WARFACTORY, enemy, erx + 3, ery + 3); + bld_spawn(g, BT_RESEARCH, enemy, erx - 2, ery); + bld_spawn(g, BT_REFINERY, enemy, erx + 5, ery + 3); + bld_spawn(g, BT_TURRET, enemy, erx + 2, ery - 2); + bld_spawn(g, BT_TURRET, enemy, erx - 2, ery + 3); + bld_spawn(g, BT_TURRET, enemy, erx + 6, ery + 1); + bld_spawn(g, BT_WALL, enemy, erx - 2, ery - 1); + bld_spawn(g, BT_WALL, enemy, erx - 1, ery - 1); + bld_spawn(g, BT_WALL, enemy, erx + 5, ery - 1); + bld_spawn(g, BT_WALL, enemy, erx + 6, ery - 1); + bld_force_complete(g); + + /* outer ROCK / crater flecks — skip occupied tiles */ + for (int dy = -5; dy <= 7; dy++) { + for (int dx = -5; dx <= 8; dx++) { + int tx = erx + dx, ty = ery + dy; + if (!map_in_bounds(&g->map, tx, ty)) continue; + Tile *t = map_tile(&g->map, tx, ty); + if (!t || t->occupied) continue; + int d2 = dx * dx + dy * dy; + if (d2 < 16 || d2 > 55) continue; + if (((dx * 7 + dy * 11) & 5) != 0) continue; + t->terrain = T_ROCK; + t->walkable = 0; + t->scrap = 0; + } + } + /* crater rubble between Evolved pad and clash core */ + for (int dy = -2; dy <= 4; dy++) { + for (int dx = 4; dx <= 11; dx++) { + int tx = erx + dx, ty = ery + dy + 4; + if (!map_in_bounds(&g->map, tx, ty)) continue; + Tile *t = map_tile(&g->map, tx, ty); + if (!t || t->occupied || !t->walkable) continue; + if (((dx + dy) & 1) == 0) { + t->terrain = T_RUBBLE; + t->scrap = 0; + } + } + } + } } int raid[40];