Masters for a match: the four sides red, green, blue and yellow (side 4 gets its own owner), and start_masters gives every master his core and his starting area

This commit is contained in:
Richard Zink committed 2026-11-04 10:55:17 +01:00
1 parent 35ddfa134c
commit 87890adc53
10 files changed
+132 -9

No files matched your search

+7 -1
View File
@@ -145,9 +145,10 @@ pub enum Owner {
Hero,
Rival1, // AI dungeon masters (free play, campaign)
Rival2,
Rival3, // the fourth master side: a third rival, or a human master in a match
}
const OWNERS: [Owner; 5] = [Owner::None, Owner::Player, Owner::Hero, Owner::Rival1, Owner::Rival2];
const OWNERS: [Owner; 6] = [Owner::None, Owner::Player, Owner::Hero, Owner::Rival1, Owner::Rival2, Owner::Rival3];
impl Owner {
pub fn of_side(side: u8) -> Owner {
@@ -156,9 +157,14 @@ impl Owner {
1 => Owner::Hero,
2 => Owner::Rival1,
3 => Owner::Rival2,
4 => Owner::Rival3,
_ => Owner::None,
}
}
// the masters of a match: the four sides a dungeon master can play (1 is the heroes' side)
#[allow(dead_code)] // the sides of a match; the lobby (step C/D) uses them
pub const MASTER_SIDES: [u8; 4] = [0, 2, 3, 4];
}
// Short serde names (only used by version 1 savegames, newer ones use the packed codec)