wmlindent workarounds for some micro_ai scenarios

This commit is contained in:
Alexander van Gessel 2013-08-05 00:11:04 +02:00
parent 0738a4e59c
commit 08d1c949f1
2 changed files with 10 additions and 2 deletions

View file

@ -348,9 +348,11 @@
{MESSAGE narrator "wesnoth-icon.png" "Important Note" _"<span color='#A00000'>Important:</span> The animal Micro AIs in this scenario are written for a number of animal unit types that do not exist in Wesnoth mainline, such as bears, sheep and sheep dogs, or deer. In this test scenario, theses units have been replaced by mainline units. If you want to get the ""full experience"" with the original animal unit types, check out the 'Animals' scenario in the 'AI Modification Demos' add-on."}
# wmlindent: start ignoring
{MESSAGE narrator "wesnoth-icon.png" "" _"This is a fun little scenario with a bunch of different animal AIs, mostly for watching only. The animal AIs behave as follows:
"+{ANIMAL_AI_DESCRIPTIONS1}}
# wmlindent: stop ignoring
{MESSAGE narrator "wesnoth-icon.png" "" {ANIMAL_AI_DESCRIPTIONS2}}
[message]
@ -358,11 +360,13 @@
caption= _ "Question for the Player"
image=wesnoth-icon.png
# wmllint: unbalanced-on
# wmlindent: start ignoring
message= _ "It is possible to include a human-controlled Side 1, so that the action stops once every turn for looking around (or to mess with things in debug mode).
Note that there is no end to this scenario. For demonstration purposes, any unit that is killed is replaced by another unit of the same type at the beginning of the next turn. In order to end the scenario, there's a right-click option - but that only works in human-controlled mode. In AI-only mode, you have to press 'Esc' or reload a previous savefile.
Also note: The Animal AIs are coded as Micro AIs. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."
# wmlindent: stop ignoring
# wmllint: unbalanced-off
[option]
message= _ "<span font='16'>I'll just watch the animals.</span>"
@ -411,8 +415,10 @@ Also note: The Animal AIs are coded as Micro AIs. A Micro AI can be added and ad
type=Wolf
[/filter_second]
# wmlindent: start ignoring
{MESSAGE $second_unit.id "" "" _"Yowl!
Translation: Those Ogres are mean! We better stay away from them and their young."}
# wmlindent: stop ignoring
[micro_ai]
side=6

View file

@ -65,8 +65,10 @@
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]
@ -147,7 +149,7 @@
[variables]
label=_"coward r=5
s=24 5"
[/variables]
[/variables]
[/unit]
[micro_ai]
side=2
@ -256,7 +258,7 @@
return_x,return_y=21,9
[/micro_ai]
# The home guards
# The home guards
[unit]
type=Troll Whelp
side=2