Related forum thread: https://wildfiregames.com/forum/index.php?/topic/20803-victory-conditions-ideas/&page=1
This diff adds a type of Capture the Flag victory condition. Players (or teams) have to capture and keep all of the flags that spawn on the map for a certain amount of time (currently hardcoded to 10 minutes).
The number of "flags" that spawn corresponds to the number of players (for example,
4 players, 4 flag units spawn). Currently, the flags use a packed siege engine actor, and they will spawn randomly in neutral territory (they have an always visible selection overlay, like heroes, to try to make them look distinct). In this diff, the flags do not necessarily have to be brought back to the territory of the captured player; s0600204 does this in the "Capture the Sheep" game here https://github.com/s0600204/0ad/tree/cts, but it also requires a new component (this diff also takes inspiration from s0600204's "Capture the Sheep" game).
Also, the flags would have to be garrisonable for a territory requirement, and this would add the extra issue of dealing with ships that are destroyed with flags on board.