engine-c: denser melee roster + building damage FX at clash

Raid packs grow (raid[96]); Evolved MUTANT/BEAST wedges + Survivor INFANTRY screens; stronger battle-wear + scorch/crack/ember draw in snapshot/live.
This commit is contained in:
local-model/engine-L2-grok-4.5 2026-09-19 16:58:51 +02:00
parent 125dcf837a
commit c551b85912
No known key found for this signature in database
3 changed files with 76 additions and 12 deletions

View file

@ -67,12 +67,13 @@ static void bld_force_complete(Game *g) {
}
/* After force-complete: leave a few incomplete yards + battle-worn
* fortifications near the raid locus so scaffold/damage FX show in KKND_SHOT. */
* fortifications near both raid loci so scaffold/damage FX show in KKND_SHOT. */
static void showcase_bld_battle_wear(Game *g) {
int incomplete_n = 0, damaged_n = 0;
float wx, wy;
map_tile_to_world(g->map.spawn_x[g->human], g->map.spawn_y[g->human], &wx, &wy);
float rx = wx + 88.0f, ry = wy - 48.0f;
float rx2 = wx + 140.0f, ry2 = wy + 96.0f;
for (int i = 0; i < g->bld_count; i++) {
Building *b = &g->buildings[i];
if (b->dead) continue;
@ -80,6 +81,9 @@ static void showcase_bld_battle_wear(Game *g) {
float cy = (b->ty + b->h * 0.5f) * (float)TILE;
float dx = cx - rx, dy = cy - ry;
float d2 = dx * dx + dy * dy;
float dx2 = cx - rx2, dy2 = cy - ry2;
float d2b = dx2 * dx2 + dy2 * dy2;
float dmin = d2 < d2b ? d2 : d2b;
/* mid-base construction yards (away from clash) */
if (incomplete_n < 2 && b->faction == g->human && d2 > 180.0f * 180.0f &&
(b->type == BT_REPAIR || b->type == BT_RESEARCH || b->type == BT_WARFACTORY)) {
@ -88,11 +92,13 @@ static void showcase_bld_battle_wear(Game *g) {
incomplete_n++;
continue;
}
/* clash fortifications: turrets / walls / power take hits */
if (damaged_n < 6 && d2 < 160.0f * 160.0f &&
(b->type == BT_TURRET || b->type == BT_WALL || b->type == BT_POWER)) {
float frac = (damaged_n % 3 == 0) ? 0.35f
: (damaged_n % 3 == 1) ? 0.55f : 0.72f;
/* clash fortifications + economy pads take hits at both fronts */
if (damaged_n < 16 && dmin < 220.0f * 220.0f &&
(b->type == BT_TURRET || b->type == BT_WALL || b->type == BT_POWER ||
b->type == BT_REFINERY || b->type == BT_BASE || b->type == BT_WARFACTORY)) {
float frac = (damaged_n % 4 == 0) ? 0.22f
: (damaged_n % 4 == 1) ? 0.40f
: (damaged_n % 4 == 2) ? 0.58f : 0.74f;
b->hp = b->max_hp * frac;
damaged_n++;
}
@ -216,6 +222,10 @@ static void place_showcase(Game *g, Faction human, Faction enemy) {
unit_spawn(g, UT_MEDIC, human, wx + 20, wy + 28);
for (int i = 0; i < 10; i++)
unit_spawn(g, UT_INFANTRY, human, wx + 88 + (i % 5) * 14, wy + 8 + (i / 5) * 16);
/* dense melee screen at primary clash (riflemen packed for KKND2 crop) */
for (int i = 0; i < 12; i++)
unit_spawn(g, UT_INFANTRY, human,
wx + 72 + (i % 6) * 11, wy - 28 + (i / 6) * 12);
/* Evolved raid pack — close NE, overlapping Survivor line */
float rx = wx + 88.0f, ry = wy - 48.0f;
@ -602,8 +612,12 @@ static void place_showcase(Game *g, Faction human, Faction enemy) {
for (int i = 0; i < 5; i++)
unit_spawn(g, UT_INFANTRY, human,
rx2 - 12 + (i % 3) * 12, ry2 - 16 + (i / 3) * 14);
/* denser Survivor melee at SE clash */
for (int i = 0; i < 8; i++)
unit_spawn(g, UT_INFANTRY, human,
rx2 - 22 + (i % 4) * 10, ry2 - 6 + (i / 4) * 11);
int raid[56];
int raid[96];
int rn = 0;
for (int i = 0; i < 8; i++)
raid[rn++] = unit_spawn(g, UT_MUTANT, enemy,
@ -632,8 +646,18 @@ static void place_showcase(Game *g, Faction human, Faction enemy) {
for (int i = 0; i < 8; i++)
raid[rn++] = unit_spawn(g, UT_INFANTRY, enemy,
rx - 28 + (i % 4) * 14, ry - 8 + (i / 4) * 14);
/* dense Evolved melee wedge into Survivor rifle screen */
for (int i = 0; i < 6; i++)
raid[rn++] = unit_spawn(g, UT_MUTANT, enemy,
rx - 8 + (i % 3) * 12, ry + 6 + (i / 3) * 11);
for (int i = 0; i < 4; i++)
raid[rn++] = unit_spawn(g, UT_BEAST, enemy,
rx + 4 + i * 13, ry + 18 + (i & 1) * 8);
for (int i = 0; i < 8; i++)
raid[rn++] = unit_spawn(g, UT_INFANTRY, enemy,
rx - 18 + (i % 4) * 10, ry + 10 + (i / 4) * 9);
/* secondary Evolved pack at SE clash (room left in raid[56]) */
/* secondary Evolved pack at SE clash — melee-heavy */
int rn_pri = rn;
for (int i = 0; i < 4; i++)
raid[rn++] = unit_spawn(g, UT_MUTANT, enemy,
@ -651,6 +675,15 @@ static void place_showcase(Game *g, Faction human, Faction enemy) {
for (int i = 0; i < 2; i++)
raid[rn++] = unit_spawn(g, UT_INFANTRY, enemy,
rx2 + 6 + i * 12, ry2 + 20 + i * 6);
for (int i = 0; i < 4; i++)
raid[rn++] = unit_spawn(g, UT_MUTANT, enemy,
rx2 - 4 + (i % 2) * 14, ry2 + 14 + (i / 2) * 12);
for (int i = 0; i < 2; i++)
raid[rn++] = unit_spawn(g, UT_BEAST, enemy,
rx2 + 12 + i * 16, ry2 + 28 + i * 6);
for (int i = 0; i < 6; i++)
raid[rn++] = unit_spawn(g, UT_INFANTRY, enemy,
rx2 - 10 + (i % 3) * 11, ry2 + 8 + (i / 3) * 10);
/* seed Survivor harvester beds so cargo silhouette is visible in shot */
{