Summary: dai_find_source_building() to consider all unit
related requirement types
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Fri 13 Jun 2014 05:02:55 AM EEST
                Category: ai
                Priority: 5 - Normal
                  Status: Ready For Test
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.6.0



Currently dai_find_source_building() checks only VUT_UCLASS requirements for
match of the potential attacker (or other unit affected) by the effect.

Attached patch makes it to consider any unit related requirement types (class,
type, type flag, class flag) by using is_req_active(). All the callers
previously passing unit class were already actually interested about unit
type, so now passing unit type as parameter (and thus getting also that type
and type flag cases covered). Alternative "move type" -parameter dropped - the
only remaining user have to live without it (may affect rulesets where defense
building against sea or amphibious units is available before one against land


File Attachments:

Date: Fri 13 Jun 2014 05:02:55 AM EEST  Name: FindSrcBuildingReqTypes.patch 
Size: 5kB   By: cazfi



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to