Real AI masters: rivals, AI seats and the co-op partner play by the player's rules (imps dig, mine and claim, rooms, towers, tunnels and the attack flag); other masters are saved; portals belong to whoever claims them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-06 08:18:09 +01:00
1 parent b940a959f1
commit a00ae6a06b
11 files changed
+456 -223

No files matched your search

+2
View File
@@ -663,6 +663,8 @@ fn remove_rivals(g: &mut Game) {
return;
}
g.rivals.clear();
// their masters go too (the seats belong to the players)
g.masters.retain(|m| !sides.contains(&m.side));
g.ents.retain(|e| e.hero || !sides.contains(&e.side));
let owners: Vec<Owner> = sides.iter().map(|&s| Owner::of_side(s)).collect();
for t in g.map.t.iter_mut() {