Currently, it is not available as a normal game feature; I have tried to work on it but I am currently mostly out of the project. Well, you will need to write in Lua some pathfinder to detect what city is connected to what, there are such algorithms on the web. Then you can place some special extras on center tiles of cities that are connected to a resource, and then you can make reqs based on that extra:
[pre]
[unit_chariot]
name = _("Chariot")
class = "Big Land"
reqs= {
"type","name","range"
"Tech","The Wheel","Player"
"Extra", "HorseConnected", "City"
}
[/pre]
Then you revise these extras placing on "turn_begin", "city_change_hands", "city_built" and "city_destroyed" signals. Surely, you can place the original "Horse" extras instead, but then you have to remember where the extras are native and where you have placed them, that requires some knowing of "_freeciv_state_dump()" builtin function quirks. AI won't understand what to do but probably we can grant it the extras for free as a handicap.
[pre]
[unit_chariot]
name = _("Chariot")
class = "Big Land"
reqs= {
"type","name","range"
"Tech","The Wheel","Player"
"Extra", "HorseConnected", "City"
}
[/pre]
Then you revise these extras placing on "turn_begin", "city_change_hands", "city_built" and "city_destroyed" signals. Surely, you can place the original "Horse" extras instead, but then you have to remember where the extras are native and where you have placed them, that requires some knowing of "_freeciv_state_dump()" builtin function quirks. AI won't understand what to do but probably we can grant it the extras for free as a handicap.
Statistics: Posted by Ignatus — Mon Dec 30, 2024 3:21 pm