mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-24 20:59:29 +00:00
324 lines
7.9 KiB
INI
324 lines
7.9 KiB
INI
#textdomain wesnoth-ai
|
|
|
|
# scores of well-known candidate actions
|
|
|
|
#define AI_CA_GOTO_SCORE
|
|
200000
|
|
#enddef
|
|
|
|
#define AI_CA_RECRUIT_RUSHERS_SCORE
|
|
196000
|
|
#enddef
|
|
|
|
#define AI_CA_CASTLE_SWITCH_SCORE
|
|
195000
|
|
#enddef
|
|
|
|
#define AI_CA_RETREAT_INJURED_SCORE
|
|
192000
|
|
#enddef
|
|
|
|
#define AI_CA_GRAB_VILLAGES_SCORE
|
|
191000
|
|
#enddef
|
|
|
|
#define AI_CA_SPREAD_POISON_SCORE
|
|
190000
|
|
#enddef
|
|
|
|
#define AI_CA_RECRUITMENT_SCORE
|
|
180000
|
|
#enddef
|
|
|
|
#define AI_CA_MOVE_LEADER_TO_GOALS_SCORE
|
|
140000
|
|
#enddef
|
|
|
|
#define AI_CA_MOVE_LEADER_TO_KEEP_SCORE
|
|
120000
|
|
#enddef
|
|
|
|
#define AI_CA_HIGH_XP_ATTACK_MAX_SCORE
|
|
100010
|
|
#enddef
|
|
|
|
#define AI_CA_COMBAT_SCORE
|
|
100000
|
|
#enddef
|
|
|
|
#define AI_CA_PLACE_HEALERS_SCORE
|
|
96000
|
|
#enddef
|
|
|
|
#define AI_CA_HEALING_SCORE
|
|
80000
|
|
#enddef
|
|
|
|
#define AI_CA_VILLAGES_SCORE
|
|
60000
|
|
#enddef
|
|
|
|
#define AI_CA_RETREAT_SCORE
|
|
40000
|
|
#enddef
|
|
|
|
#define AI_CA_VILLAGE_HUNT_SCORE
|
|
30000
|
|
#enddef
|
|
|
|
#define AI_CA_MOVE_TO_TARGETS_SCORE
|
|
20000
|
|
#enddef
|
|
|
|
#define AI_CA_LEADER_SHARES_KEEP_SCORE
|
|
10000
|
|
#enddef
|
|
|
|
#define AI_CA_MOVE_TO_ANY_ENEMY_SCORE
|
|
1000
|
|
#enddef
|
|
|
|
# Keep for backward compatibility
|
|
#define AI_CA_PASSIVE_LEADER_SHARES_KEEP_SCORE
|
|
{AI_CA_LEADER_SHARES_KEEP_SCORE}
|
|
#enddef
|
|
|
|
# well-known candidate actions
|
|
|
|
#define AI_CA_GOTO
|
|
# RCA AI candidate action: goto
|
|
[candidate_action]
|
|
id=goto
|
|
engine=cpp
|
|
name=ai_default_rca::goto_phase
|
|
max_score={AI_CA_GOTO_SCORE}
|
|
score={AI_CA_GOTO_SCORE}
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_RECRUIT_RUSHERS
|
|
# RCA AI candidate action: recruit_rushers
|
|
[candidate_action]
|
|
id=recruit_rushers
|
|
engine=lua
|
|
name=recruit_rushers
|
|
max_score={AI_CA_RECRUIT_RUSHERS_SCORE}
|
|
location="ai/lua/ca_recruit_rushers.lua"
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_CASTLE_SWITCH
|
|
# RCA AI candidate action: castle_switch
|
|
[candidate_action]
|
|
id=castle_switch
|
|
engine=lua
|
|
name=ai_default_rca::castle_switch
|
|
max_score={AI_CA_CASTLE_SWITCH_SCORE}
|
|
location="ai/lua/ca_castle_switch.lua"
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_RETREAT_INJURED
|
|
# RCA AI candidate action: retreat_injured
|
|
[candidate_action]
|
|
id=retreat_injured
|
|
engine=lua
|
|
name=ai_default_rca::retreat_injured
|
|
max_score={AI_CA_RETREAT_INJURED_SCORE}
|
|
location="ai/lua/ca_retreat_injured.lua"
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_GRAB_VILLAGES
|
|
# RCA AI candidate action: grab_villages
|
|
[candidate_action]
|
|
id=grab_villages
|
|
engine=lua
|
|
name=grab_villages
|
|
max_score={AI_CA_GRAB_VILLAGES_SCORE}
|
|
location="ai/lua/ca_grab_villages.lua"
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_SPREAD_POISON
|
|
# RCA AI candidate action: spread_poison
|
|
[candidate_action]
|
|
id=spread_poison
|
|
engine=lua
|
|
name=ai_default_rca::spread_poison
|
|
max_score={AI_CA_SPREAD_POISON_SCORE}
|
|
location="ai/lua/ca_spread_poison.lua"
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_RECRUITMENT
|
|
# RCA AI candidate action: recruitment
|
|
[candidate_action]
|
|
id=recruitment
|
|
engine=cpp
|
|
name=default_recruitment::recruitment
|
|
max_score={AI_CA_RECRUITMENT_SCORE}
|
|
score={AI_CA_RECRUITMENT_SCORE}
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_MOVE_LEADER_TO_GOALS
|
|
# RCA AI candidate action: move_leader_to_goals
|
|
[candidate_action]
|
|
id=move_leader_to_goals
|
|
engine=cpp
|
|
name=ai_default_rca::move_leader_to_goals_phase
|
|
max_score={AI_CA_MOVE_LEADER_TO_GOALS_SCORE}
|
|
score={AI_CA_MOVE_LEADER_TO_GOALS_SCORE}
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_MOVE_LEADER_TO_KEEP
|
|
# RCA AI candidate action: move_leader_to_keep
|
|
[candidate_action]
|
|
id=move_leader_to_keep
|
|
engine=cpp
|
|
name=ai_default_rca::move_leader_to_keep_phase
|
|
max_score={AI_CA_MOVE_LEADER_TO_KEEP_SCORE}
|
|
score={AI_CA_MOVE_LEADER_TO_KEEP_SCORE}
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_HIGH_XP_ATTACK
|
|
[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={AI_CA_HIGH_XP_ATTACK_MAX_SCORE}
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_COMBAT
|
|
# RCA AI candidate action: combat
|
|
[candidate_action]
|
|
id=combat
|
|
engine=cpp
|
|
name=ai_default_rca::combat_phase
|
|
max_score={AI_CA_COMBAT_SCORE}
|
|
score={AI_CA_COMBAT_SCORE}
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_PLACE_HEALERS
|
|
# RCA AI candidate action: place_healers
|
|
[candidate_action]
|
|
id=place_healers
|
|
engine=lua
|
|
name=ai_default_rca::place_healers
|
|
max_score={AI_CA_PLACE_HEALERS_SCORE}
|
|
location="ai/lua/ca_place_healers.lua"
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_HEALING
|
|
# RCA AI candidate action: healing
|
|
[candidate_action]
|
|
id=healing
|
|
engine=cpp
|
|
name=ai_default_rca::get_healing_phase
|
|
max_score={AI_CA_HEALING_SCORE}
|
|
score={AI_CA_HEALING_SCORE}
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_VILLAGES
|
|
# RCA AI candidate action: villages
|
|
[candidate_action]
|
|
id=villages
|
|
engine=cpp
|
|
name=ai_default_rca::get_villages_phase
|
|
max_score={AI_CA_VILLAGES_SCORE}
|
|
score={AI_CA_VILLAGES_SCORE}
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_RETREAT
|
|
# RCA AI candidate action: retreat
|
|
[candidate_action]
|
|
id=retreat
|
|
engine=cpp
|
|
name=ai_default_rca::retreat_phase
|
|
max_score={AI_CA_RETREAT_SCORE}
|
|
score={AI_CA_RETREAT_SCORE}
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_VILLAGE_HUNT
|
|
# RCA AI candidate action: village_hunt
|
|
[candidate_action]
|
|
id=village_hunt
|
|
engine=lua
|
|
name=village_hunt
|
|
max_score={AI_CA_VILLAGE_HUNT_SCORE}
|
|
location="ai/lua/ca_village_hunt.lua"
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_MOVE_TO_TARGETS
|
|
# RCA AI candidate action: move_to_targets
|
|
[candidate_action]
|
|
id=move_to_targets
|
|
engine=cpp
|
|
name=ai_default_rca::move_to_targets_phase
|
|
max_score={AI_CA_MOVE_TO_TARGETS_SCORE}
|
|
score={AI_CA_MOVE_TO_TARGETS_SCORE}
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_LEADER_SHARES_KEEP
|
|
# RCA AI candidate action: leader_shares_keep
|
|
[candidate_action]
|
|
id=leader_shares_keep
|
|
engine=cpp
|
|
name=ai_default_rca::leader_shares_keep_phase
|
|
max_score={AI_CA_LEADER_SHARES_KEEP_SCORE}
|
|
score={AI_CA_LEADER_SHARES_KEEP_SCORE}
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
#define AI_CA_MOVE_TO_ANY_ENEMY
|
|
# RCA AI candidate action: move_to_any_enemy
|
|
[candidate_action]
|
|
id=move_to_any_enemy
|
|
engine=lua
|
|
name=ai_default_rca::move_to_any_enemy
|
|
max_score={AI_CA_MOVE_TO_ANY_ENEMY_SCORE}
|
|
location="ai/lua/ca_move_to_any_enemy.lua"
|
|
[/candidate_action]
|
|
#enddef
|
|
|
|
# Keep for backward compatibility
|
|
#define AI_CA_PASSIVE_LEADER_SHARES_KEEP
|
|
{AI_CA_LEADER_SHARES_KEEP}
|
|
#enddef
|
|
|
|
# Keep for backward compatibility, but redirect it
|
|
#define AI_CA_SIMPLE_MOVE_TO_TARGETS
|
|
{AI_CA_MOVE_TO_TARGETS}
|
|
#enddef
|
|
|
|
# extra candidate actions
|
|
|
|
#define AI_CA_POISONING
|
|
#deprecated 3 1.17 A poisoning CA is now included in the default AI. If you're building a custom main_loop stage it can also be included with {AI_CA_SPREAD_POISON}.
|
|
# Extra candidate action: Formula AI CA for poisoners to spread poison around
|
|
[candidate_action]
|
|
engine=fai
|
|
id=poisoning
|
|
name=poisoning
|
|
type=attack
|
|
[filter]
|
|
me="filter( input, 'me', filter(me.attacks,'att',filter(att.special,'spe',contains_string(spe,'poison'))))"
|
|
target="filter( input, 'target', target.undead = 0 and target.hitpoints > 5 and index_of('poisoned',keys(target.states)) = -1)"
|
|
[/filter]
|
|
evaluation="{ai/formula/poisoner_eval.fai}"
|
|
action="{ai/formula/poisoner_attack.fai}"
|
|
[/candidate_action]
|
|
#enddef
|