Campaign mission system: 20 mission definitions, goals, unlocks, carry-over
- campaign.rs: missions as key data (size, rivers, fortresses, goals, waves, time limit, gifts); start_mission builds the map with the generator; tools unlock step by step; the strongest 5 creatures and 20% of the gold are carried into the next mission; campaign progress type - Map generator options (portals, treasure caves, hero gate) and meandering rivers with knight bridges - Mission goals: shards, gate of the order, all knights, vault loot, knight towers, waves; time limits; waves and gate defenders only where the mission wants them - Locked tools are shown dark and cannot be chosen; HUD shows gate/waves/time only when used - Fix: patrol routes no longer start on tower spots - Tests: every mission builds, its goals are possible, wave heroes reach the core Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e15b16cc60
commit
46755d68ac
8 files changed
+758
-85
No files matched your search
+2
-1
@@ -157,7 +157,8 @@ impl Game {
|
||||
e.home = Some((hx, hy));
|
||||
}
|
||||
// patrols: round through the courtyard along the inside of the walls
|
||||
let route = vec![(x0 + 2, cy), (cx, y0 + 2), (x1 - 2, cy), (cx, y1 - 2)];
|
||||
// (next to the tower spots in the middle of the walls)
|
||||
let route = vec![(x0 + 3, cy + 2), (cx + 2, y0 + 3), (x1 - 3, cy - 2), (cx - 2, y1 - 3)];
|
||||
let route: Vec<(i32, i32)> = route.into_iter().filter(|&(x, y)| self.map.walk(x, y)).collect();
|
||||
for (g, group) in f.patrols.iter().enumerate() {
|
||||
if route.is_empty() {
|
||||
|
||||
Reference in new issue
Block a user