[Freeciv-Dev] [patch #3837] Unify UCF_ATT*NON_NATIVE and relevant type flags
Update of patch #3837 (project freeciv): Status: Ready For Test = Done Open/Closed:Open = Closed ___ 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
[Freeciv-Dev] [patch #3837] Unify UCF_ATT*NON_NATIVE and relevant type flags
Update of patch #3837 (project freeciv): Status:None = Ready For Test Assigned to:None = cazfi Planned Release: = 2.3.5, 2.4.0, 2.5.0, 2.6.0 ___ 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
[Freeciv-Dev] [patch #3837] Unify UCF_ATT*NON_NATIVE and relevant type flags
Follow-up Comment #6, patch #3837 (project freeciv): S2_4: Umh, but before 2.5 city tile always had road, no matter the terrain. ___ 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
[Freeciv-Dev] [patch #3837] Unify UCF_ATT*NON_NATIVE and relevant type flags
Follow-up Comment #7, patch #3837 (project freeciv): Then I'm just confused, and this should work for S2_4. (file #17769) ___ Additional Item Attachment: File name: S2_4-use-can_attack-foo-functions-more.patch Size:2 KB ___ 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
[Freeciv-Dev] [patch #3837] Unify UCF_ATT*NON_NATIVE and relevant type flags
Follow-up Comment #5, patch #3837 (project freeciv): Patch attached for S2_3. The pf_tools functions are not adjusted, as the nature of the flags in question don't have much meaning for UMT_LAND units (which restriction is imposed by pft_fill_parameter()). For S2_4, I'm much less certain of the correct solution. It seems to be possible to build a Big Land unit on non-native terrain (e.g. forest/river), which unit then cannot move until the Bridge Building technology is known (at which point the city gets a road, which makes it native, so that the check is irrelevant). In the absence of UCF_ATT_FROM_NON_NATIVE, I'm unsure of the correct logic to use for the pf_tools checks to allow an e.g. Catapult to attack an adjacent square when there is yet no road available in the city to make the tile native, even if the adjacent square is native to Catapults. Suggestions welcome. (file #17767) ___ Additional Item Attachment: File name: S2_3-use-can_attack-foo-functions-more.patch Size:2 KB ___ 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
[Freeciv-Dev] [patch #3837] Unify UCF_ATT*NON_NATIVE and relevant type flags
Follow-up Comment #4, patch #3837 (project freeciv): Makes sense. I'll prepare some similar branches for S2_4 and S2_3, with less focus on nativity, but rather focusing on ensuring that there aren't too many assumptions preventing defining e.g. ships with embedded marine components or similar on the part of ruleset authors. ___ 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
[Freeciv-Dev] [patch #3837] Unify UCF_ATT*NON_NATIVE and relevant type flags
Follow-up Comment #3, patch #3837 (project freeciv): I think lack of some of the checks you add here are actually bugs in stable brances too. Where you now check for UCF_ATTACK_FROM_NON_NATIVE, old versions should check for sea moving units (attack out from harbour city) etc. ___ 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
[Freeciv-Dev] [patch #3837] Unify UCF_ATT*NON_NATIVE and relevant type flags
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
[Freeciv-Dev] [patch #3837] Unify UCF_ATT*NON_NATIVE and relevant type flags
Follow-up Comment #1, patch #3837 (project freeciv): Just a note that if you expect there to be no changes in autogames for some ruleset with some patch, check just that. Run autogame with same gameseed and mapseed before and after the patch and compare md5sums of their final savegames. With current versions you need to set also ec_turns to 0 to avoid savegames having message caches with different timestamps. ___ 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
[Freeciv-Dev] [patch #3837] Unify UCF_ATT*NON_NATIVE and relevant type flags
Follow-up Comment #2, patch #3837 (project freeciv): And excitingly, the files matched precisely before and after the patch. I'll be sure to also check this way when I do not expect a behavioural difference. ___ 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