Follow-up Comment #2, patch #3817 (project freeciv):
Not so concretely or specifically, but ruleset authors may model shore
bombardment by not allowing the unit to take over the city (set either
UTYF_CIVILIAN or fail to set UCF_CAN_OCCUPY_CITY). In all shipped rulesets,
unit classes identifed as "Sea" don't have UCF_CAN_OCCUPY_CITY, so this
doesn't require any changes to these rulesets to meet this requirement, but if
a ruleset author wanted to define a naval unit with an embedded marine
component, this is possible.
The code enforces this by having checks 5 and 6 part of the same conditional,
with 6 as an else clause only checked when 5 fails (any "Sea" unit in the
rulesets would be sending MR_BAD_TYPE_FOR_CITY_TAKE_OVER instead). I don't
expect any changes in behaviour with the current rulesets (and my testing
included failing to take over a city with a Battleship in the default
In the message production, the patch explicitly checks for both
can_attack_from_non_native() and utype_can_take_over() to cover this (an
earlier revision of the patch incorrectly reported that all
can_attack_from_non_native() units could conquer from non-native).
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list