#textdomain wesnoth-ai [test] id=healer_support name= _ "Healer Support" next_scenario=micro_ai_test map_data="{multiplayer/maps/2p_The_Freelands.map}" {DEFAULT_SCHEDULE} turns=-1 victory_when_enemies_defeated=yes [side] side=1 controller=ai id=Rebels1 type=Elvish Ranger team_name=Rebels1 user_team_name= _ "Rebels 1" recruit=Elvish Archer,Elvish Fighter,Elvish Scout,Elvish Shaman,Mage,Merman Hunter,Wose persistent=no gold=400 [/side] [side] side=2 controller=ai id=Rebels2 type=Elvish Marksman team_name=Rebels2 user_team_name= _ "Rebels 2" recruit=Elvish Archer,Elvish Fighter,Elvish Scout,Elvish Shaman,Mage,Merman Hunter,Wose persistent=no gold=400 [/side] [side] # This side is only here because we need one persistent side for the game to go on side=3 controller=null persistent=yes save_id=Grnk hidden=yes [/side] # Prestart actions [event] name=prestart {VARIABLE scenario_name healer_support} # Set up the healer support micro AIs [micro_ai] side=1 ai_type=healer_support action=add injured_units_only=yes max_threats = 0 [/micro_ai] [micro_ai] side=2 ai_type=healer_support action=add aggression=0 # wmllint: ignore [/micro_ai] [/event] [event] name=start # wmllint: unbalanced-on {MESSAGE Rebels1 "" "" _"In this scenario, we demonstrate the use of the Healer Support Micro AI. This AI configures the healers of a side to stay behind the battle lines and heal injured and/or threatened units rather than participate in the attacks under all circumstances. It includes several configurable options (which are set differently for the two sides in this scenario) that determine how aggressive/careful the healers are, whether they also attack, how much risk they are willing to take, etc. For clarity, each healer announces her upcoming support move. If you don't want to see that each time, just hit 'esc' when it happens the first time. Note: The Healer Support AI is coded as a Micro AI. 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 Micro AI wiki page at http://wiki.wesnoth.org/Micro_AIs for more information."} # wmllint: unbalanced-off [/event] # Stop if the leader of one side died [event] name=last breath first_time_only=no [filter] canrecruit=yes [/filter] {MESSAGE $unit.id "" "" _"Argh! They got us..."} # So that game goes on to next scenario [modify_side] side=3 controller=human [/modify_side] [endlevel] result=victory bonus=no carryover_percentage=0 carryover_report=no linger_mode=no [/endlevel] [/event] [/test]