Fast Micro AI: fix re-adding default CAs when deleting the MAI

The high_xp_attack CA is deleted when adding the Fast MAI, but not added back in when deleting the MAI.
This commit is contained in:
mattsc 2019-12-10 06:42:08 -08:00
parent ec1420fae7
commit ecca2c43ba

View file

@ -15,6 +15,16 @@ function wesnoth.micro_ais.fast_ai(cfg)
-- Also need to delete/add some default CAs
if (cfg.action == 'delete') then
-- This can be done independently of whether these were removed earlier
wesnoth.sides.add_ai_component(cfg.side, "stage[main_loop].candidate_action",
{
id="high_xp_attack"
engine="lua"
name="ai_default_rca::high_xp_attack"
location="ai/lua/ca_high_xp_attack.lua"
max_score=100010
}
)
wesnoth.sides.add_ai_component(cfg.side, "stage[main_loop].candidate_action",
{
id="combat",