Author: crab
Date: Mon Apr 13 17:45:22 2009
New Revision: 34874

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34874&view=rev
Log:
Modified user interface of AI Arena to use right-click menu.

Added:
    trunk/data/ai/scenarios/ai_arena_small/
    trunk/data/ai/scenarios/ai_arena_small/test_0001.cfg   (with props)
    trunk/data/ai/scenarios/ai_arena_small/test_0002.cfg   (with props)
Modified:
    trunk/data/ai/scenarios/scenario-AI_Arena_small.cfg

Added: trunk/data/ai/scenarios/ai_arena_small/test_0001.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/ai/scenarios/ai_arena_small/test_0001.cfg?rev=34874&view=auto
==============================================================================
--- trunk/data/ai/scenarios/ai_arena_small/test_0001.cfg (added)
+++ trunk/data/ai/scenarios/ai_arena_small/test_0001.cfg Mon Apr 13 17:45:22 
2009
@@ -1,0 +1,74 @@
+[event]
+    name=test_0001
+    first_time_only=no
+
+    [message]
+        speaker=narrator
+        image=wesnoth-icon.png
+        message= "This situation should test the ability of AI to heal 
efficiently..."
+    [/message]
+    {UNIT 2 Peasant 10 11 hitpoints=1}
+    {NOTRAIT_UNIT 2 "Mage of Light" 16 16}
+    {UNIT 2 "Heavy Infantryman" 19 13 hitpoints=1}
+    {UNIT 2 "General" 21 13 hitpoints=1}
+    {UNIT 2 "Grand Knight" 21 14 hitpoints=1}
+    {UNIT 2 "Halberdier" 10 12 hitpoints=1}
+    {UNIT 2 "Pikeman" 9 17 hitpoints=1}
+    {UNIT 2 "Master at Arms" 20 12 hitpoints=1}
+    {UNIT 2 Peasant 21 9 hitpoints=1}
+    {UNIT 2 Peasant 16 17 hitpoints=1}
+    {UNIT 2 Peasant 9 17 hitpoints=1}
+
+    [capture_village]
+        side=2
+        x,y=5,9
+    [/capture_village]
+    [capture_village]
+        side=2
+        x,y=6,19
+    [/capture_village]
+    [capture_village]
+        side=2
+        x,y=9,17
+    [/capture_village]
+    [capture_village]
+        side=2
+        x,y=10,20
+    [/capture_village]
+    [capture_village]
+        side=2
+        x,y=11,4
+    [/capture_village]
+    [capture_village]
+        side=2
+        x,y=14,8
+    [/capture_village]
+    [capture_village]
+        side=2
+        x,y=16,17
+    [/capture_village]
+    [capture_village]
+        x,y=19,22
+        side=2
+    [/capture_village]
+    [capture_village]
+        side=2
+        x,y=20,5
+    [/capture_village]
+    [capture_village]
+        side=2
+        x,y=21,9
+    [/capture_village]
+    [capture_village]
+        side=2
+        x,y=24,6
+    [/capture_village]
+    [capture_village]
+        side=2
+        x,y=25,17
+    [/capture_village]
+    [modify_side]
+        side=2
+        gold=10000
+    [/modify_side]
+[/event]

Propchange: trunk/data/ai/scenarios/ai_arena_small/test_0001.cfg
------------------------------------------------------------------------------
    svn:eol-style = native

Added: trunk/data/ai/scenarios/ai_arena_small/test_0002.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/ai/scenarios/ai_arena_small/test_0002.cfg?rev=34874&view=auto
==============================================================================
--- trunk/data/ai/scenarios/ai_arena_small/test_0002.cfg (added)
+++ trunk/data/ai/scenarios/ai_arena_small/test_0002.cfg Mon Apr 13 17:45:22 
2009
@@ -1,0 +1,133 @@
+[event]
+    name=test_0002
+    first_time_only=no
+
+    [message]
+        speaker=narrator
+        image=wesnoth-icon.png
+        message=_ "This situation should test the ability of AI to spread 
poison around..."
+    [/message]
+    [unit]
+        side=2
+        x,y=23,14
+        type="Orcish Assassin"
+    [/unit]
+    [unit]
+        side=2
+        x,y=25,17
+        type="Orcish Assassin"
+    [/unit]
+    [unit]
+        side=2
+        x,y=19,7
+        type="Orcish Assassin"
+    [/unit]
+    [unit]
+        side=2
+        x,y=10,14
+        type="Orcish Assassin"
+    [/unit]
+    [unit]
+        side=2
+        x,y=20,7
+        type="Orcish Assassin"
+    [/unit]
+    [unit]
+        side=3
+        x,y=20,5
+        type="Drake Warden"
+        random_traits="no"
+        [modifications]
+            {TRAIT_RESILIENT}
+        [/modifications]
+    [/unit]
+    [unit]
+        side=3
+        x,y=21,7
+        type="Drake Warden"
+        random_traits=0
+    [/unit]
+    [unit]
+        side=3
+        x,y=23,16
+        type="Drake Warden"
+        random_traits=0
+        [modifications]
+            {TRAIT_RESILIENT}
+        [/modifications]
+    [/unit]
+    [unit]
+        side=3
+        x,y=17,5
+        type="Drake Warden"
+        random_traits=0
+    [/unit]
+    [unit]
+        side=3
+        x,y=15,7
+        type="Drake Warden"
+        random_traits=0
+    [/unit]
+    [unit]
+        side=3
+        x,y=17,8
+        type="Drake Warden"
+        random_traits=0
+    [/unit]
+    [unit]
+        side=3
+        x,y=19,9
+        type="Drake Warden"
+        random_traits=0
+    [/unit]
+    [unit]
+        side=3
+        x,y=26,18
+        type="Ancient Wose"
+        random_traits=0
+    [/unit]
+    [unit]
+        side=3
+        hitpoints=3
+        x,y=26,14
+        type="Drake Warden"
+        random_traits=0
+    [/unit]
+    [unit]
+        side=3
+        x,y=9,17
+        type="Skeleton"
+    [/unit]
+    [label]
+        colour="255,0,0,0"
+        text="Undead target test"
+        visible_in_fog="yes"
+        x="9"
+        y="17"
+    [/label]
+    [label]
+        colour="255,0,0,0"
+        text="Target choose test"
+        visible_in_fog="yes"
+        x="19"
+        y="6"
+    [/label]
+    [label]
+        colour="255,0,0,0"
+        text="Regeneration attack test"
+        visible_in_fog="yes"
+        x="25"
+        y="19"
+    [/label]
+    [label]
+        colour="255,0,0,0"
+        text="Weapon test with low hp target"
+        visible_in_fog="yes"
+        x="26"
+        y="14"
+    [/label]
+    [modify_side]
+        side=3
+        switch_ai=$test_path_to_idle_ai
+    [/modify_side]
+[/event]

Propchange: trunk/data/ai/scenarios/ai_arena_small/test_0002.cfg
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: trunk/data/ai/scenarios/scenario-AI_Arena_small.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/ai/scenarios/scenario-AI_Arena_small.cfg?rev=34874&r1=34873&r2=34874&view=diff
==============================================================================
--- trunk/data/ai/scenarios/scenario-AI_Arena_small.cfg (original)
+++ trunk/data/ai/scenarios/scenario-AI_Arena_small.cfg Mon Apr 13 17:45:22 2009
@@ -15,6 +15,7 @@
     {PLACE_IMAGE items/burial.png 15 13}
     {PLACE_IMAGE items/burial.png 26 16}
     {PLACE_IMAGE items/burial.png 4 9}
+    {ai/scenarios/ai_arena_small/}
 
     [event]
         name=preload
@@ -38,6 +39,39 @@
             name=test_id
             value=2
         [/set_variable]
+
+        [set_menu_item]
+            id=repeat_test
+            description="Repeat last test"
+            [command]
+                [fire_event]
+                    name="_clean_arena"
+                [/fire_event]
+                [fire_event]
+                    name="_setup_test"
+                [/fire_event]
+            [/command]
+        [/set_menu_item]
+
+        [set_menu_item]
+            id=select_another_ai
+            description="Select another ai"
+            [command]
+                [fire_event]
+                    name=_select_challenger_ai
+                [/fire_event]
+            [/command]
+        [/set_menu_item]
+
+        [set_menu_item]
+            id=select_test
+            description="Select another test"
+            [command]
+                [fire_event]
+                    name=_select_test
+                [/fire_event]
+            [/command]
+        [/set_menu_item]
     [/event]
 
     [side]
@@ -76,19 +110,11 @@
         fog=yes
     [/side]
 
-    [label]
-        x,y=6,21
-        text=_ "test!"
-    [/label]
-
-    [event]
-        name=moveto
-        first_time_only=no
-        [filter]
-            x,y,side=6,21,1
-        [/filter]
+    [event]
+        name=_select_test
+        first_time_only=no
         [message]
-            speaker=unit
+            speaker=narrator
             message=_ "Which test do you want to run, oh Mightly AI Developer 
?"
             [option]
                 message=_ "Repeat last test [$test_id]"
@@ -121,8 +147,24 @@
                 [/command]
             [/option]
         [/message]
+        [command]
+            [fire_event]
+                name="_clean_arena"
+            [/fire_event]
+        [/command]
+        [command]
+            [fire_event]
+                name="_setup_test"
+            [/fire_event]
+        [/command]
+    [/event]
+
+    [event]
+        name=_select_challenger_ai
+        first_time_only=no
+
         [message]
-            speaker=unit
+            speaker=narrator
             message=_ "Which AI do you want to use, oh Mightly AI Developer ?"
             [option]
                 message=_ "I am happy with the current AI of team 2, 
[$test_path_to_ai]"
@@ -170,27 +212,16 @@
         [/message]
         [command]
             [fire_event]
-                name="do_clean_arena"
+                name="_replace_ai_2"
             [/fire_event]
         [/command]
         [command]
-            [fire_event]
-                name="do_setup_test"
-            [/fire_event]
+            {TELEPORT_TILE 6 21 5 22}
         [/command]
-        [command]
-            [fire_event]
-                name="do_replace_ai_2"
-            [/fire_event]
-        [/command]
-        [command]
-             {TELEPORT_TILE 6 21 5 22}
-        [/command]
-
-    [/event]
-
-    [event]
-        name=do_clean_arena
+    [/event]
+
+    [event]
+        name=_clean_arena
         first_time_only=no
         [kill]
             animate=no
@@ -249,10 +280,22 @@
             x="26"
             y="14"
         [/label]
-    [/event]
-
-    [event]
-        name=do_setup_test
+        [modify_side]
+            side=1
+            gold=10000
+        [/modify_side]
+        [modify_side]
+            side=2
+            gold=10000
+        [/modify_side]
+        [modify_side]
+            side=3
+            gold=10000
+        [/modify_side]
+    [/event]
+
+    [event]
+        name=_setup_test
         first_time_only=no
         [switch]
             variable=test_id
@@ -266,270 +309,15 @@
             [/case]
             [case]
                 value="1"
-                [message]
-                    speaker=narrator
-                    image=wesnoth-icon.png
-                    message=_ "This situation should test the ability of AI to 
heal efficiently..."
-                [/message]
-                [unit]
-                    side=2
-                    x,y=10,11
-                    type=Peasant
-                    hitpoints=1
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=16,16
-                    type="Mage of Light"
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=19,13
-                    type="Heavy Infantryman"
-                    hitpoints=1
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=21,13
-                    type="General"
-                    hitpoints=1
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=21,14
-                    type="Grand Knight"
-                    hitpoints=1
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=10,12
-                    type="Halberdier"
-                    hitpoints=1
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=9,17
-                    type=Pikeman
-                    hitpoints=1
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=20,12
-                    type="Master at Arms"
-                    hitpoints=1
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=10,13
-                    type=Peasant
-                    hitpoints=1
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=21,9
-                    type=Peasant
-                    hitpoints=1
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=16,17
-                    type=Peasant
-                    hitpoints=1
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=9,17
-                    type=Peasant
-                    hitpoints=1
-                [/unit]
-                [capture_village]
-                    side=2
-                    x,y=5,9
-                [/capture_village]
-                [capture_village]
-                    side=2
-                    x,y=6,19
-                [/capture_village]
-                [capture_village]
-                    side=2
-                    x,y=9,17
-                [/capture_village]
-                [capture_village]
-                    side=2
-                    x,y=10,20
-                [/capture_village]
-                [capture_village]
-                    side=2
-                    x,y=11,4
-                [/capture_village]
-                [capture_village]
-                    side=2
-                    x,y=14,8
-                [/capture_village]
-                [capture_village]
-                    side=2
-                    x,y=16,17
-                [/capture_village]
-                [capture_village]
-                    x,y=19,22
-                    side=2
-                [/capture_village]
-                [capture_village]
-                    side=2
-                    x,y=20,5
-                [/capture_village]
-                [capture_village]
-                    side=2
-                    x,y=21,9
-                [/capture_village]
-                [capture_village]
-                    side=2
-                    x,y=24,6
-                [/capture_village]
-                [capture_village]
-                    side=2
-                    x,y=25,17
-                [/capture_village]
-                [modify_side]
-                    side=2
-                    gold=10000
-                [/modify_side]
+                [fire_event]
+                    name=test_0001
+                [/fire_event]
             [/case]
             [case]
                 value="2"
-                [message]
-                    speaker=narrator
-                    image=wesnoth-icon.png
-                    message=_ "This situation should test the ability of AI to 
spread poison around..."
-                [/message]
-                [unit]
-                    side=2
-                    x,y=23,14
-                    type="Orcish Assassin"
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=25,17
-                    type="Orcish Assassin"
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=19,7
-                    type="Orcish Assassin"
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=10,14
-                    type="Orcish Assassin"
-                [/unit]
-                [unit]
-                    side=2
-                    x,y=20,7
-                    type="Orcish Assassin"
-                [/unit]
-                [unit]
-                    side=3
-                    x,y=20,5
-                    type="Drake Warden"
-                    random_traits="no"
-                    [modifications]
-                        {TRAIT_RESILIENT}
-                    [/modifications]
-                [/unit]
-                [unit]
-                    side=3
-                    x,y=21,7
-                    type="Drake Warden"
-                    random_traits=0
-                [/unit]
-                [unit]
-                    side=3
-                    x,y=23,16
-                    type="Drake Warden"
-                    random_traits=0
-                    [modifications]
-                        {TRAIT_RESILIENT}
-                    [/modifications]
-                [/unit]
-                [unit]
-                    side=3
-                    x,y=17,5
-                    type="Drake Warden"
-                    random_traits=0
-                [/unit]
-                [unit]
-                    side=3
-                    x,y=15,7
-                    type="Drake Warden"
-                    random_traits=0
-                [/unit]
-                [unit]
-                    side=3
-                    x,y=17,8
-                    type="Drake Warden"
-                    random_traits=0
-                [/unit]
-                [unit]
-                    side=3
-                    x,y=19,9
-                    type="Drake Warden"
-                    random_traits=0
-                [/unit]
-                [unit]
-                    side=3
-                    x,y=26,18
-                    type="Ancient Wose"
-                    random_traits=0
-                [/unit]
-                [unit]
-                    side=3
-                    hitpoints=3
-                    x,y=26,14
-                    type="Drake Warden"
-                    random_traits=0
-                [/unit]
-                [unit]
-                    side=3
-                    x,y=9,17
-                    type="Skeleton"
-                [/unit]
-                [label]
-                    colour="255,0,0,0"
-                    text="Undead target test"
-                    visible_in_fog="yes"
-                    x="9"
-                    y="17"
-                [/label]
-                [label]
-                    colour="255,0,0,0"
-                    text="Target choose test"
-                    visible_in_fog="yes"
-                    x="19"
-                    y="6"
-                [/label]
-                [label]
-                    colour="255,0,0,0"
-                    text="Regeneration attack test"
-                    visible_in_fog="yes"
-                    x="25"
-                    y="19"
-                [/label]
-                [label]
-                    colour="255,0,0,0"
-                    text="Weapon test with low hp target"
-                    visible_in_fog="yes"
-                    x="26"
-                    y="14"
-                [/label]
-                [modify_side]
-                    side=2
-                    gold=10000
-                [/modify_side]
-                [modify_side]
-                    side=3
-                    gold=10000
-                    switch_ai=$test_path_to_idle_ai
-                [/modify_side]
+                [fire_event]
+                    name=test_0002
+                [/fire_event]
             [/case]
             [else]
                 [message]
@@ -539,10 +327,13 @@
                 [/message]
             [/else]
         [/switch]
-    [/event]
-
-    [event]
-        name=do_replace_ai_2
+        [fire_event]
+            name="_replace_ai_2"
+        [/fire_event]
+    [/event]
+
+    [event]
+        name=_replace_ai_2
         first_time_only=no
         [modify_side]
             side=2


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

Reply via email to