From 7e06b3cf35bfcb7eca2112c3cd3e8e928e120d1a Mon Sep 17 00:00:00 2001 From: mattsc Date: Tue, 22 Oct 2013 12:43:54 -0700 Subject: [PATCH] Guardian MAIs: add individual engine macros for each AI ... so that only the code for the guardian AI used is loaded. --- data/core/macros/ai_micro_ais.cfg | 80 +++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/data/core/macros/ai_micro_ais.cfg b/data/core/macros/ai_micro_ais.cfg index 6051c23a965..e13e414f050 100644 --- a/data/core/macros/ai_micro_ais.cfg +++ b/data/core/macros/ai_micro_ais.cfg @@ -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