URL:
  <http://gna.org/bugs/?20483>

                 Summary: get_virtual_defense_power() misdetecting which units
can defend
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Wed 06 Feb 2013 04:32:22 AM EET
                Category: general
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: Ready For Test
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: None
         Planned Release: 2.3.4, 2.4.0, 2.5.0

    _______________________________________________________

Details:

get_virtual_defense_power() checks if unit is land moving unit on ocean tile,
and if it is, deducts that it cannot defend since it's transported.

This is broken as:
- This assumes that other transported units can defend on non-native terrain
- As a very special case of above, unit with "Trireme" flag (restricted next
to coast) transported in high seas is considered able to defend
- Land unit might be "BuildAnywhere" defending unit in Ocean City
- Move type should not be used for anything outside default ai code

Attached patch makes the check with can_exist_at_tile() which takes both
terrain nativity and possible city in to account.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 06 Feb 2013 04:32:23 AM EET  Name: VirtDefPwNativity.patch  Size:
462B   By: cazfi

<http://gna.org/bugs/download.php?file_id=17137>
-------------------------------------------------------
Date: Wed 06 Feb 2013 04:32:23 AM EET  Name: VirtDefPwNativity-S2_3.patch 
Size: 481B   By: cazfi

<http://gna.org/bugs/download.php?file_id=17138>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?20483>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to