Defending cities

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
Ignatus
Veteran
Posts: 131
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Defending cities

Postby Ignatus » Thu Jan 03, 2019 10:27 pm

Don't know if the idea was raised before, but let your loyal cities have any defense against invasion even if there are no units inside. In CivV, cities can defend and even attack with only a bonus for having any guarrison, that is not damaged in process unless it attacks itself; the city has health that is 200 if full. In CivIII, you can't produce a unit between your phases for emergency defense of an empty city, but you can conscript a citizen or two (getting available defense infantry unit of reduced health).

My idea is making a special building like Coinage but producing defense. Its strength will be equal to city production (with all bonuses for land units), and its nominal health will be proportional to city population with the factor of morale, that can depend on happiness , corruption and nationality (from 0.0 to 1.0). After a won battle with an invader, the population is reduced on the lost hitpoints (but mostly on the current owner's nationality, unlike other cases) and the morale goes down (i.e. the happiness reduces for the mourning of the killed, but if you can compensate it, your city will stand to the last defender). The city nominal health (but not strength) is recalculated after each unsuccessful attack; after a successful attack, the city falls (maybe we should preserve the last citizen in most cases for the ability to conquer anything). The defending city is stacked with other defending units by normal "get defender" rules. If you have two or more building slots, you can produce something while defending, otherwise all your workforces are on the walls.