Follow-up Comment #2, bug #20747 (project freeciv): >From code inspection, it appears that the same patch could also be applied to S2_4 (I'll test when my current autogames are complete), and that it would provide a similar benefit.
About combat.c: get_virtual_defense_power() uses can_unit_exist_at_tile as a proxy for being able to defend, but in this function we don't know the actual unit (and it may not even currently exist for calls from advmilitary.c), so can't check to see if it happens to be transported when under attack. The specific unit certainly doesn't exist in unittools.c:find_a_good_partisan_spot(), although these aren't likely to be placed in transport, so it matters less. can_unit_attack_all_at_tile() and can_unit_attack_any_at_tile() are potentially open to gameplay irregularities from players choosing when to load/unload unreachable units if unreachable protects/doesn't protect, and depending on the targets vectors of potential attackers. It would take a lot more than this type of check to work around that. It may be that can_unit_attack_unit_at_tile() should check to see if the potential defender is capable of defense, but I suspect it is better not to do this, as units that can't defend just die, which is likely the desired behaviour, rather than anything that might prevent the attack. Am I missing something else that might be related to this? _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?20747> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev