diff --git a/data/ai/micro_ais/scenarios/guardians.cfg b/data/ai/micro_ais/scenarios/guardians.cfg index e573016b22e6..bdb0b4af2340 100644 --- a/data/ai/micro_ais/scenarios/guardians.cfg +++ b/data/ai/micro_ais/scenarios/guardians.cfg @@ -1,17 +1,5 @@ #textdomain wesnoth-ai -#define HOME_GUARDIAN X Y - # Meant to be used as a suffix to a unit-generating macro call. - # The previously-generated unit will treat (X,Y) as its home. - [+unit] - [ai] - [vars] - home_loc="loc({X},{Y})" - [/vars] - [/ai] - [/unit] -#enddef - [test] id=guardians name= _ "Guardians" @@ -54,26 +42,6 @@ recruit=Orcish Archer,Orcish Grunt persistent=no gold=30 - - [ai] - [modify_ai] - side=1 - action=add - # wmllint: unbalanced-on - path=stage[main_loop].candidate_action[] - # wmllint: unbalanced-off - [candidate_action] - engine=fai - name=go_home - id=go_home - type=movement - # wmlindent: start ignoring - evaluation="if( (null != me.vars.home_loc), {AI_CA_MOVE_TO_TARGETS_SCORE}+10, 0)" - action="if( (me.loc != me.vars.home_loc), move(me.loc, next_hop(me.loc, me.vars.home_loc)), move(me.loc, me.loc)#do not move this turn#)" - # wmlindent: stop ignoring - [/candidate_action] - [/modify_ai] - [/ai] [/side] # Put all the units and markers out there @@ -264,31 +232,6 @@ return_x,return_y=21,9 [/micro_ai] - # The home guards - [unit] - type=Troll Whelp - side=2 - id=home1 - name= _ "Home Guard 1" - x,y=19,2 - [variables] - label="home 19,2" - [/variables] - [/unit] - {HOME_GUARDIAN 19 2} - - [unit] - type=Troll - side=2 - id=home 2 - name= _ "Home Guard 2" - x,y=21,10 - [variables] - label="home 21,10" - [/variables] - [/unit] - {HOME_GUARDIAN 21 10} - # The stationed guardians [unit] type=Skeleton Archer @@ -480,23 +423,6 @@ separate attack Zone" [/message] [/command] [/set_menu_item] - [set_menu_item] - id=m03_home - description= _ "Home Guard" - image=units/trolls/grunt.png~CROP(31,7,24,24) - [show_if] - {VARIABLE_CONDITIONAL scenario_name equals guardians} - [/show_if] - [command] - [message] - speaker=narrator - image=portraits/trolls/troll.png - caption= _ "Home Guard" - message= _ "A 'home guard' is a variant on the 'guardian' AI special. With this variant, the unit has an assigned 'home' location, and will return there if not involved in combat and if not going to a village, whether for healing or to capture it this turn. (By contrast, the standard guardian AI will cause the unit to stay where it last attacked.) This differs from 'return guardian' in that a home guard will press the attack, possibly getting drawn quite far from 'home', rather than returning after each attack. (It can also be lured away by a string of closely-placed villages, but that is something a map builder can control.) -This also demonstrates how to combine candidate actions from Formula AI and Lua AI in one side. The home guard is written in Formula AI, while the return and stationed guardians and the cowards are written in Lua AI. In addition the non-guardian units of the side follow the default AI behavior." - [/message] - [/command] - [/set_menu_item] [set_menu_item] id=m04_stationed description= _ "Stationed Guardian"