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

@ -717,20 +717,37 @@ static void draw_bld(Building *b, int sx, int sy) {
fill_rect(sx, sy - 7, W, 4, 55, 50, 40);
fill_rect(sx, sy - 7, (int)(W * b->build + 0.5f), 4, 120, 220, 120);
}
/* battle damage: scorch patches + crack lines + rubble chips */
/* battle damage: scorch + cracks + rubble + ember (reads in KKND_SHOT) */
if (b->max_hp > 0 && b->hp < b->max_hp * 0.95f) {
float dmg = 1.0f - (b->hp / b->max_hp);
int pw = W / 4; if (pw < 3) pw = 3;
int ph = H / 5; if (ph < 2) ph = 2;
fill_rect(sx + W / 4, sy + H / 3, pw, ph, 45, 35, 25);
if (dmg > 0.3f)
disc(sx + W / 3, sy + H / 2, pw / 2 + 1, 38, 30, 22);
if (dmg > 0.25f) {
fill_rect(sx + W / 2, sy + H / 2, pw, ph, 55, 40, 28);
disc(sx + (W * 2) / 3, sy + H / 3, pw / 3 + 1, 48, 36, 24);
}
if (dmg > 0.45f) {
fill_rect(sx + W / 6, sy + (H * 2) / 3, pw - 1, ph - 1, 50, 38, 26);
disc(sx + W / 5, sy + H / 4, 2, 60, 42, 28);
}
line(sx + 3, sy + H / 4, sx + W / 2, sy + (H * 2) / 3, 28, 24, 18);
line(sx + W / 2, sy + (H * 2) / 3, sx + W - 3, sy + H / 3, 28, 24, 18);
line(sx + W / 5, sy + 4, sx + (W * 3) / 5, sy + H / 2, 32, 26, 20);
if (dmg > 0.5f) {
line(sx + W / 3, sy + 2, sx + W / 3 + 3, sy + H - 2, 22, 18, 14);
line(sx + (W * 2) / 3, sy + H / 5, sx + W / 4, sy + H - 3, 24, 20, 16);
fill_rect(sx + 2, sy + H - 4, 5, 3, 95, 78, 55);
fill_rect(sx + W - 9, sy + H - 5, 7, 4, 85, 70, 50);
fill_rect(sx + W / 2 - 2, sy + H - 3, 6, 3, 90, 72, 48);
}
if (dmg > 0.65f) {
/* ember glow in heavy breaches */
disc(sx + W / 2, sy + H / 2, 2, 220, 110, 40);
disc(sx + W / 3 + 2, sy + (H * 2) / 3, 1, 255, 160, 60);
fill_rect(sx + 4, sy + 3, 3, 2, 40, 32, 24);
fill_rect(sx + W - 8, sy + 4, 4, 3, 35, 28, 20);
}
/* thin HP bar so damage reads in KKND_SHOT */
{