This patch (transitional state it produces) has some chicken-and-egg design problems with territory claiming bases. Though the version I finally submitted avoided (in a hackish way - code recurses more than it needs to, but changes between rounds make it to avoid infinite recursion) most obvious problems, I now think that it doesn't work correctly when tile has multiple bases. When the recursion causes other bases to change owner, tile is already owned by new owner and as tile owner is in this transtional phase used as base owner, new owner is considered old base owner -> base is not cleared from real old owner, and as it seems like base is not changing hands at all, some base capturing stuff is skipped too.

This sounds a lot like what I was thinking of in bug #16385 (but I never got further than design).

> - All bases in a tile have same owner (which can be "nobody")

That's clearly what I was thinking before, but I don't think I'd thought about what happens if B's Engineer builds a new ownable base on a tile which already has A's ownable base of a different kind.

> - Can bases have no owner even if tile has owner (in a
> scenario with preset unowned bases)
> - If both tile and bases have owner, can bases be owned by
> player other than tile owner (unit walking to base claims base
> even if not territory)

For the latter, I convinced myself that base and tile should have separate owners (after originally thinking the opposite) -- see ticket.
I think that implies that the answer to the first question is yes.

This is going to be first one in series of base ownership patches. Goal of the series is to separate base ownership from border ownership. Primary reason is fixing problems related to vision providing bases (buoy).

My current plan:
- All bases in a tile have same owner (which can be "nobody")
- Bases on a tile can be owned even when tile is not (buoy can work on unowned territory)

I'm not certain about other border ownership and base ownership interactions.
- Can bases have no owner even if tile has owner (in a scenario with preset unowned bases)
- If both tile and bases have owner, can bases be owned by player other than tile owner (unit walking to base claims base even if not territory)

Copyright (C) 2004-2006, the Gna! people. Posted items are owned by whoever posted them.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.