Guardian MAIs: add individual engine macros for each AI

... so that only the code for the guardian AI used is loaded.
This commit is contained in:
mattsc 2013-10-22 12:43:54 -07:00
parent 23e4dda2e8
commit 7e06b3cf35

View file

@ -293,6 +293,86 @@
[/ai]
#enddef
#define MICRO_AI_COWARD
# Sets up the coward Micro AI for a side
# Include this macro in the side definition
# Needs to be in [side], does not work in [modify_side]
[ai]
id=coward
description=_"Coward Micro AI"
version=10710
[engine]
name="lua"
code= <<
local ai = ...
return wesnoth.require("ai/micro_ais/ais/mai_coward_engine.lua").init(ai)
>>
[/engine]
{RCA_STAGE}
[/ai]
#enddef
#define MICRO_AI_RETURN_GUARDIAN
# Sets up the return guardian Micro AI for a side
# Include this macro in the side definition
# Needs to be in [side], does not work in [modify_side]
[ai]
id=return_guardian
description=_"Return Guardian Micro AI"
version=10710
[engine]
name="lua"
code= <<
local ai = ...
return wesnoth.require("ai/micro_ais/ais/mai_return_guardian_engine.lua").init(ai)
>>
[/engine]
{RCA_STAGE}
[/ai]
#enddef
#define MICRO_AI_STATIONED_GUARDIAN
# Sets up the stationed guardian Micro AI for a side
# Include this macro in the side definition
# Needs to be in [side], does not work in [modify_side]
[ai]
id=stationed_guardian
description=_"Stationed Guardian Micro AI"
version=10710
[engine]
name="lua"
code= <<
local ai = ...
return wesnoth.require("ai/micro_ais/ais/mai_stationed_guardian_engine.lua").init(ai)
>>
[/engine]
{RCA_STAGE}
[/ai]
#enddef
#define MICRO_AI_ZONE_GUARDIAN
# Sets up the zone guardian Micro AI for a side
# Include this macro in the side definition
# Needs to be in [side], does not work in [modify_side]
[ai]
id=zone_guardian
description=_"Zone Guardian Micro AI"
version=10710
[engine]
name="lua"
code= <<
local ai = ...
return wesnoth.require("ai/micro_ais/ais/mai_zone_guardian_engine.lua").init(ai)
>>
[/engine]
{RCA_STAGE}
[/ai]
#enddef
#define MICRO_AI_PROTECT_UNIT
# Sets up the protect unit Micro AI for a side
# Include this macro in the side definition