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

                 Summary: Different AI behavior for two identical syntax of
AI definition
                 Project: Battle for Wesnoth
            Submitted by: faabumc
            Submitted on: Thursday 05/06/2010 at 00:07
                Category: Bug
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: WML
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.9 rev 42477
        Operating System: gnu/linux

    _______________________________________________________

Details:

When using an in-line definition for the AI, the complex definition:

[ai]
    id=default_ai_cure_poison_with
    description= Cure poison formula with modify_ai
    version=10710
    [stage]
        id=main_loop
        name=testing_ai_default::candidate_action_evaluation_loop
    [/stage]
    [modify_ai]
        path=stage[main_loop].candidate_action
        action=add
        [candidate_action]
            [...]
        [/candidate_action]
    [/modify_ai]
[/ai]

is expected to be identical to the simplified form:

[ai]
    id=default_ai_cure_poison_with_no
    description= Cure poison formula with no modify_ai
    version=10710
    [stage]
        id=main_loop
        name=testing_ai_default::candidate_action_evaluation_loop
        [candidate_action]
            [...]
        [/candidate_action]
    [/stage]
[/ai]


However the testcase attached here under shows that the simplified syntax
leads to an inactive AI (the candidate action is never executed) while the
complex syntax just gives the expected behavior.

To run the test:
* apply the patch
* start AI arena
* load the "Retreat to cure" test scenario
** run it with "cure poison improvement with modify_ai" and see it is working
fine
** run it with "cure poison improvement with no modify_ai" and see it is
doing nothing



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thursday 05/06/2010 at 00:07  Name: no-modify-ai.diff  Size: 6kB   By:
faabumc

<http://gna.org/bugs/download.php?file_id=9126>

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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