Fast Micro AI: delete/add the new default AI CAs
This commit is contained in:
parent
ecca2c43ba
commit
d8b25ab149
1 changed files with 48 additions and 6 deletions
|
@ -17,10 +17,40 @@ function wesnoth.micro_ais.fast_ai(cfg)
|
|||
-- 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"
|
||||
id="castle_switch",
|
||||
engine="lua",
|
||||
name="ai_default_rca::castle_switch",
|
||||
max_score=195000,
|
||||
location="ai/lua/ca_castle_switch.lua"
|
||||
}
|
||||
)
|
||||
|
||||
wesnoth.sides.add_ai_component(cfg.side, "stage[main_loop].candidate_action",
|
||||
{
|
||||
id="retreat_injured",
|
||||
engine="lua",
|
||||
name="ai_default_rca::retreat_injured",
|
||||
max_score=192000,
|
||||
location="ai/lua/ca_retreat_injured.lua"
|
||||
}
|
||||
)
|
||||
|
||||
wesnoth.sides.add_ai_component(cfg.side, "stage[main_loop].candidate_action",
|
||||
{
|
||||
id="spread_poison",
|
||||
engine="lua",
|
||||
name="ai_default_rca::spread_poison",
|
||||
max_score=190000,
|
||||
location="ai/lua/ca_spread_poison.lua"
|
||||
}
|
||||
)
|
||||
|
||||
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
|
||||
}
|
||||
)
|
||||
|
@ -35,6 +65,16 @@ function wesnoth.micro_ais.fast_ai(cfg)
|
|||
}
|
||||
)
|
||||
|
||||
wesnoth.sides.add_ai_component(cfg.side, "stage[main_loop].candidate_action",
|
||||
{
|
||||
id="place_healers",
|
||||
engine="lua",
|
||||
name="ai_default_rca::place_healers",
|
||||
max_score=96000,
|
||||
location="ai/lua/ca_place_healers.lua"
|
||||
}
|
||||
)
|
||||
|
||||
wesnoth.sides.add_ai_component(cfg.side, "stage[main_loop].candidate_action",
|
||||
{
|
||||
id="villages",
|
||||
|
@ -66,6 +106,7 @@ function wesnoth.micro_ais.fast_ai(cfg)
|
|||
)
|
||||
else
|
||||
if (not cfg.skip_combat_ca) then
|
||||
wesnoth.sides.delete_ai_component(cfg.side, "stage[main_loop].candidate_action[spread_poison]")
|
||||
wesnoth.sides.delete_ai_component(cfg.side, "stage[main_loop].candidate_action[high_xp_attack]")
|
||||
wesnoth.sides.delete_ai_component(cfg.side, "stage[main_loop].candidate_action[combat]")
|
||||
else
|
||||
|
@ -77,10 +118,11 @@ function wesnoth.micro_ais.fast_ai(cfg)
|
|||
end
|
||||
|
||||
if (not cfg.skip_move_ca) then
|
||||
wesnoth.sides.delete_ai_component(cfg.side, "stage[main_loop].candidate_action[castle_switch]")
|
||||
wesnoth.sides.delete_ai_component(cfg.side, "stage[main_loop].candidate_action[retreat_injured]")
|
||||
wesnoth.sides.delete_ai_component(cfg.side, "stage[main_loop].candidate_action[place_healers]")
|
||||
wesnoth.sides.delete_ai_component(cfg.side, "stage[main_loop].candidate_action[villages]")
|
||||
|
||||
wesnoth.sides.delete_ai_component(cfg.side, "stage[main_loop].candidate_action[retreat]")
|
||||
|
||||
wesnoth.sides.delete_ai_component(cfg.side, "stage[main_loop].candidate_action[move_to_targets]")
|
||||
else
|
||||
for i,parm in ipairs(CA_parms) do
|
||||
|
|
Loading…
Add table
Reference in a new issue