Open fire-eggs opened 5 years ago
Ditto for units converted by diplomat
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.
When a hut generates mercenaries, they should be owned by a city nearby. (distance?)