Summary: Prefer ruleset advice to MOVE_TYPE in AI
                 Project: Freeciv
            Submitted by: persia
            Submitted on: Sat 21 Jun 2014 09:13:25 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



Another step towards removing use of UMT_LAND and UMT_SEA in the AI.  This
patch uses adv.land_move and adv.sea_move to address a few more cases in the
code.  I'm happy to break this up if anyone has concerns about parts of it,
but my autogame testing shows expected behaviour with the classic ruleset.

Included adjustments:

process_defender_want(): use land_move != MOVE_NONE rather than
move_type==UMT_LAND to identify suitable units.

dai_hunter_try_launch(): fear any unit with sea_move != MOVE_NONE, rather than
fearing UMT_SEA and UMT_BOTH units.

update_simple_ai_types(): Only apply the requirement to be able to attack
non-native tiles to units that cannot move on land.

dai_is_unit_tired_waiting_boat(): use sea_move != MOVE_NONE rather than
move_type != UMT_LAND to check if a unit might be able to move on the ocean
without a boat.


File Attachments:

Date: Sat 21 Jun 2014 09:13:25 AM JST  Name:
prefer-ruleset-advice-to-MOVE_TYPE-in-AI.patch  Size: 5kB   By: persia



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to