engine-c: denser Evolved WALL/ROAD/scrap between bases

This commit is contained in:
local-model/engine-L2-grok-4.5 2026-09-19 11:52:58 +02:00
parent a86a7caed9
commit 26afa8fb4a
No known key found for this signature in database

View file

@ -233,12 +233,63 @@ static void place_showcase(Game *g, Faction human, Faction enemy) {
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);
/* denser Evolved wall perimeter (N/W/E/S stubs + SE gate) */
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, ery - 2);
bld_spawn(g, BT_WALL, enemy, erx + 1, ery - 2);
bld_spawn(g, BT_WALL, enemy, erx + 4, ery - 2);
bld_spawn(g, BT_WALL, enemy, erx + 5, ery - 1);
bld_spawn(g, BT_WALL, enemy, erx + 6, ery - 1);
bld_spawn(g, BT_WALL, enemy, erx + 7, ery);
bld_spawn(g, BT_WALL, enemy, erx + 7, ery + 1);
bld_spawn(g, BT_WALL, enemy, erx + 7, ery + 2);
bld_spawn(g, BT_WALL, enemy, erx - 3, ery);
bld_spawn(g, BT_WALL, enemy, erx - 3, ery + 1);
bld_spawn(g, BT_WALL, enemy, erx - 3, ery + 2);
bld_spawn(g, BT_WALL, enemy, erx - 1, ery + 5);
bld_spawn(g, BT_WALL, enemy, erx, ery + 5);
bld_spawn(g, BT_WALL, enemy, erx + 2, ery + 5);
bld_spawn(g, BT_WALL, enemy, erx + 4, ery + 5);
bld_spawn(g, BT_WALL, enemy, erx + 6, ery + 4);
bld_spawn(g, BT_WALL, enemy, erx + 5, ery + 5);
/* SE approach gate toward clash */
bld_spawn(g, BT_WALL, enemy, erx + 8, ery + 3);
bld_spawn(g, BT_WALL, enemy, erx + 8, ery + 5);
bld_spawn(g, BT_TURRET, enemy, erx + 8, ery + 4);
bld_force_complete(g);
/* pad roads: internal lanes + corridor toward clash core */
for (int dy = 0; dy <= 4; dy++) {
for (int dx = -1; dx <= 5; 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 || !t->walkable) continue;
if (dy == 1 || dy == 3 || dx == 1 || dx == 4) {
t->terrain = T_ROAD;
t->scrap = 0;
}
}
}
{
int steps = abs(ctx - (erx + 6)) + abs(cty - (ery + 4));
if (steps < 1) steps = 1;
for (int s = 0; s <= steps; s++) {
int tx = (erx + 6) + (ctx - (erx + 6)) * s / steps;
int ty = (ery + 4) + (cty - (ery + 4)) * s / steps;
for (int o = -1; o <= 1; o++) {
int ox = tx + ((s & 1) ? 0 : o);
int oy = ty + ((s & 1) ? o : 0);
if (!map_in_bounds(&g->map, ox, oy)) continue;
Tile *t = map_tile(&g->map, ox, oy);
if (!t || t->occupied || !t->walkable) continue;
t->terrain = T_ROAD;
t->scrap = 0;
}
}
}
/* outer ROCK / crater flecks — skip occupied tiles */
for (int dy = -5; dy <= 7; dy++) {
for (int dx = -5; dx <= 8; dx++) {
@ -254,14 +305,19 @@ static void place_showcase(Game *g, Faction human, Faction enemy) {
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;
/* crater rubble + scrap flecks between Evolved pad and clash */
for (int dy = -3; dy <= 6; dy++) {
for (int dx = 3; dx <= 14; dx++) {
int tx = erx + dx, ty = ery + dy + 3;
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) {
if (t->terrain == T_ROAD) continue;
int h = (dx * 13 + dy * 7) & 7;
if (h == 0) {
t->terrain = T_SCRAP;
t->scrap = (uint8_t)(70 + ((dx * 11 + dy * 5) & 127));
} else if (h <= 3) {
t->terrain = T_RUBBLE;
t->scrap = 0;
}