URL:
  <http://gna.org/bugs/?18784>

                 Summary: AI ignoring [hides] ability
                 Project: Battle for Wesnoth
            Submitted by: mattsc
            Submitted on: Tue 04 Oct 2011 09:54:43 PM GMT
                Category: Bug
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Artificial Intelligence
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.9.9
        Operating System: Mac OS 10.6.8

    _______________________________________________________

Details:

In a scenario of my last campaign, it appears that the AI sees a unit that is
invisible due to a [hides] ability.  The unit is hidden from enemy view on all
terrain and all times of day for a few turns by using (in 1.9.x):


                [modify_unit]
                    [filter]
                        id=Gertburt
                        type=Outlaw
                    [/filter]

                    [abilities]
                        [hides]
                            id=hidden
                            name=_"hidden"
                            description=_"Hidden:

    Due to Wyssauba's magic, Gertburt cannot be seen by enemies, except if
they have units next to him."
                            affect_self=yes
                            [filter_self]
                            [/filter_self]
                        [/hides]
                    [/abilities]
                [/modify_unit]


The attached savefile shows the behavior. There are a lot of units there, but
you can ignore almost all of them as I have disabled (controller=null) all
sides except the players sides (Side 1, red) and the AI in question (Side 4,
green). The unit in question is at the right center of the map, at 63,23,
called Gertburt. If you load the file and simply end the current turn, you
will see that the AI side goes for him, even though he is translucent,
indicating invisibility. I've tried this in 1.9.5, 1.9.8 and 1.9.9 - the exact
moves are slightly different (sometimes they won't attack him until the next
turn), but they go for him in all versions.

As far as I can tell, he really is invisible. You can see that the ability is
in effect using :inspect. Also, when I switch the AI side to human control
(:droid 4), he disappears once I end the Side 1 turn and take control of Side
4.  Finally, killing the unit using the lua debug command results in different
behavior depending on whether the unit is there or not, showing that it
affects AI behavior even though being invisible.

In case it matters, some overall AI parameters are set for Side 4 with:

            [ai]
                aggression=1.0
                caution=0.0
                village_value=0.0
                scout_village_targeting=0.0
                villages_per_scout=0.0

                # Want Rutburt to go for Grnk et al., not Peasants
                [target]
                    side=1
                    value=100.0
                [/target]
                [target]
                    side=7
                    value=1.0
                [/target]
            [/ai]




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 04 Oct 2011 09:54:43 PM GMT  Name: Grnk-Wizards_Turn_16c-tst.gz 
Size: 155kB   By: mattsc
Savefile showing the described behavior
<http://gna.org/bugs/download.php?file_id=14197>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?18784>

_______________________________________________
  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