URL: <http://gna.org/patch/?3837>
Summary: Unify UCF_ATT*NON_NATIVE and relevant type flags Project: Freeciv Submitted by: persia Submitted on: Sun 07 Apr 2013 09:27:23 PM JST Category: general Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: _______________________________________________________ Details: There were a few places in the code that the logic in can_attack_non_native() and can_attack_from_non_native() were duplicated. There were a couple cases in helpdata.c where the helper functions would be wrong (need to differentiate the class flag from the unit flag). Also, the AI seemed to assume that no unit capable of being on land would ever have UCF_ATTACK_FROM_NON_NATIVE, so relied exclusively on UTYF_MARINES. Unfortunately, in pf_tools.c it proved impossible to fix these without major surgery, so I just reviewed the usage, and ensured that both the class flags and type flags were checked in every case. In watching autogames, I didn't see any pronounced increase in the AI's usage of boats when it ought to have selected Marines, so I don't believe this has a negative impact for rulesets with classical nativity. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Sun 07 Apr 2013 09:27:23 PM JST Name: unify-ATT*NON_NATIVE.patch Size: 6kB By: persia <http://gna.org/patch/download.php?file_id=17702> _______________________________________________________ Reply to this item at: <http://gna.org/patch/?3837> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev