Hero waves break in where the warning shows: they round the realm to the marked entry; the entry tile glows red

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-06 16:08:28 +01:00
1 parent dab31579df
commit bd3f42b8b8
3 files changed
+73 -4

No files matched your search

+10 -1
View File
@@ -3377,12 +3377,21 @@ fn draw_entry_warnings(g: &Game, t: f32, n: usize) {
let line = [255, 90, 60, (120.0 + 120.0 * p) as u8];
let mut mb = MB::new();
for &(ex, ey) in &g.planned_entries {
let realm = g.map.get(ex, ey).map_or(Owner::Player, |t| t.owner);
// the entry tile itself: a pulsing red plate (also where an open corridor leads in)
let c = vec3(ex as f32 + 0.5, 0.03, ey as f32 + 0.5);
mb.quad(
[c + vec3(-0.5, 0.0, -0.5), c + vec3(0.5, 0.0, -0.5), c + vec3(0.5, 0.0, 0.5), c + vec3(-0.5, 0.0, 0.5)],
[Vec2::ZERO; 4],
[col(vec3(1.0, 0.16, 0.12) * (0.6 + 0.6 * p), 0.45 + 0.35 * p); 4],
[Vec3::Y; 4],
);
for dy in -2..=2 {
for dx in -2..=2 {
let (x, y) = (ex + dx, ey + dy);
let Some(tile) = g.map.get(x, y) else { continue };
// walls of the realm's border near the entry point (not rock)
let border = DIR4.iter().any(|&(ax, ay)| g.map.get(x + ax, y + ay).map_or(false, |o| o.owner == Owner::Player && !o.solid()));
let border = DIR4.iter().any(|&(ax, ay)| g.map.get(x + ax, y + ay).map_or(false, |o| o.owner == realm && !o.solid()));
if tile.diggable() && border && dx.abs() + dy.abs() <= 3 && mb.v.len() < 30000 {
block_shell(&mut mb, &g.map, x, y, n, fill, line, 1.0, 0.04);
}