URL:
  <http://gna.org/patch/?4855>

                 Summary: Allow amphibious unit for kill_something_with()
                 Project: Freeciv
            Submitted by: persia
            Submitted on: Thu 26 Jun 2014 07:48:22 PM 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

    _______________________________________________________

Details:

kill_something_with() (and the embedded process_attacker_want) restricted
itself to units that were UMT_LAND or UMT_SEA.  The attached patch generalises
this, although not completely.

Entirely gen-move compliant fixes are using unit nativity rather than
move_type and a "shore" boolean to determine if one can reach a target, and
using the potential_charges cache from gen-move bodyguards to determine if one
can chase a target (rather than a matching move_type).

A reasonably future-safe change was using dai_is_ferry_type() to determine if
the unit in question was a ferry, rather than checking UMT_SEA: the underlying
function still uses adv.sea_move and adv.land_move, but this change
centralises that logic.

In other cases, I defaulted to adv.sea_move and adv_land_move temporarily, as
this data is more reliable for UMT_BOTH units than the assumptions usually
carried by that move_type.  While this does introduce more use of this data,
the results using these values are more accurate than with move_type for
scenarios with complex nativity.  I hope to remove these entirely over time,
but understanding that enough to do it properly doesn't fit in this patch.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 26 Jun 2014 07:48:22 PM JST  Name:
allow-amphibious-unit-for-kill_something_with.patch  Size: 9kB   By: persia

<http://gna.org/patch/download.php?file_id=21160>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?4855>

_______________________________________________
  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