Summary: Ignore nativity-providing extras for simple types
                 Project: Freeciv
            Submitted by: persia
            Submitted on: Mon 23 Jun 2014 09:27:10 AM JST
                Category: ai
                Priority: 5 - Normal
                  Status: Ready For Test
                 Privacy: Public
             Assigned to: persia
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.6.0



The patch fixing bug #21022 had the side effect of making any boat that could
either travel on a river or for which there was a native base/road a UMT_BOTH
unit, rather than a UMT_SEA unit.  This had the interesting effect of
exercising the ferry code for UMT_BOTH units (Triremes in experimental), but
also means that if anyone has a ruleset with a base providing nativity for
submarines, the guard logic for selecting simple_ai_types would no longer
block submarines.

While the attached patch might look like a nativity-based descendant of patch
#4832 (and indeed the code comes from that patch), my research into the
semantics of this test indicate that it is specifically intended to exclude
submarines (see the change to is_ai_simple_military() in r996), for reasons I
don't entirely understand, but which I think the fix to bug #21022 was not
intended to revert.

If anyone understands why or how the AI code can't handle submarines properly,
please indicate this and I'll happily withdraw this patch (or if someone has
time to explain, but not time to implement, I'd gladly implement replacing
this patch).  If not, then I'll apply, and we can fix it properly when we


File Attachments:

Date: Mon 23 Jun 2014 09:27:10 AM JST  Name:
ignore-nativity-providing-extras-for-simple-types.patch  Size: 2kB   By:



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to