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

                 Summary: Fix for bug #18101 AI knows that an invisible unit
left a village
                 Project: Battle for Wesnoth
            Submitted by: thonsew
            Submitted on: Sat 30 Jul 2011 07:02:05 PM GMT
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

The bug is that the AI detects and reacts to invisible unit during the
village capture phase.  This happens because the AI uses the global
resources::units object instead of the correct find_visible_units in 3 places.
 

I've updated those three places in the included patch.  The AI also uses
resources::units in a fourth place to find its own units.  Since
find_visible_units has more overhead than resources::units I left this in
place.

The more general problem is that the AI has access to resouces::units and
units.find(loc) is easier to type than find_visible_units(loc, my_team).  A
possible fix is a per AI object AI_world_view to filter the global
information, so that the AI never knows what it can't know.  It would also
decouple the AIs from the global resources::objects.

Enjoy patch,
thonsew



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 30 Jul 2011 07:02:05 PM GMT  Name:
village_capture_invisibility.patch  Size: 2kB   By: thonsew

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

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to