Follow-up Comment #7, patch #3830 (project freeciv):

Not so far as I can tell: the function was originally put in combat.c in
largely the current form (using !is_ocean_tile() is new, but the old
implementation was essentially the same check) in SVN revision 3369 (at which
point HELI_MOVING and is_heli_unit() were still present in common/unit.c)
applying specifically to sailing units attacking ground units: everyone else
keeps their firepower.  If a mistake was made in the conflation of AIR_MOVING
and HELI_MOVING, it doesn't appear to have happened for this specific
conditional ("land bombardment").

The logic described in my last comment would penalise sailing units and not
penalise helicopters for units with classical nativity, rather than not
penalising either (as in the implementation as of SVN revision 3369 or the
most recently attached patch).

The argument for changing the logic is that the Battleship cannot enter the
tile in which the Helicopter resides (so should be penalised), but the
Helicopter is under no such restriction (so should not be penalised).  The
argument for not changing the logic is that as long as the two units are both
native to *either* the attacking or defending square, they will meet there to
fight, and do so without penalty.  I still prefer the first argument, but I've
also still not reached absolute confidence.  The original logic may also have
included assumptions about the AttackNonNative status of the defender: perhaps
the idea is that the defender can't respond because there is no expectation of
a means to attack the attacker: in such a case, perhaps the nested conditional
should be about whether the defender can attack the attacker, rather than just
whether it could exist on the attacker's tile.

That said, re-reading comment #4, was that a suggestion that the condition

if (!is_native_tile(unit_type(attacker), unit_tile(defender)
    && is_native_tile(unit_type(defender), unit_tile(defender)) {
    att_fp = 1;
    def_fp =1;


    If so, I don't like this at all because of the disadvantages this causes
for air units as compared to the is_ground_unit() test.  Testing that the
defender is non-native to attacking tile gives a discriminator that happens to
have the same result for classical nativity and can perhaps be explained in
terms of unit capabilities, although I don't have any objection to a test that
checks to ensure the defender is both non-native to the attacking tile and
native to the defending tile, if that seems like it might have a better


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to