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:
parent
ec1420fae7
commit
ecca2c43ba
1 changed files with 10 additions and 0 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue