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
a5ea579329
commit
e5eb2cc11e
1 changed files with 10 additions and 0 deletions
|
@ -16,6 +16,16 @@ function wesnoth.micro_ais.fast_ai(cfg)
|
||||||
if (cfg.action == 'delete') then
|
if (cfg.action == 'delete') then
|
||||||
-- This can be done independently of whether these were removed earlier
|
-- This can be done independently of whether these were removed earlier
|
||||||
wesnoth.add_ai_component(cfg.side, "stage[main_loop].candidate_action",
|
wesnoth.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",
|
id="combat",
|
||||||
engine="cpp",
|
engine="cpp",
|
||||||
|
|
Loading…
Add table
Reference in a new issue