Hut mercenaries not owned by nearby city
When a hut generates mercenaries, they should be owned by a city nearby. (distance?)
Ditto for units converted by diplomat
- Need to establish what rule to use when establishing "ownership". It has been suggested that being closer to an enemy city instead of your own means no ownership; I think there is a distance to one of your own cities which determines if the unit is "owned" by said city.
- Use that rule in hut results
- Use that rule in unit conversion
The hut code is in BaseUnitLand.cs, TribalHut(). The first switch statement, case HutResult.FriendlyTribe. The unit is created but is not assigned a city.
The code further down in the routine (case 3:) suggests that the "owning" city would be the closest player city that is nearer than 4 distance.
Diplomat unit bribe logic is in DiplomatBribe.cs, Bribe().
To set a unit's "owning" city, invoke the unit's SetHome method with the city.