#textdomain wesnoth-ai # scores of well-known candidate actions #define AI_CA_GOTO_SCORE 200000 #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_COMBAT_SCORE 100000 #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_MOVE_TO_TARGETS_SCORE 20000 #enddef #define AI_CA_LEADER_SHARES_KEEP_SCORE 10000 #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_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_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_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_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 # Keep for backward compatibility #define AI_CA_PASSIVE_LEADER_SHARES_KEEP {AI_CA_LEADER_SHARES_KEEP} #enddef # extra candidate actions #define AI_CA_SIMPLE_MOVE_TO_TARGETS # Extra candidate action: simple_move_to_targets [candidate_action] id=simple_move_to_targets engine=cpp name=ai_default_rca::simple_move_and_targeting_phase max_score={AI_CA_MOVE_TO_TARGETS_SCORE} score={AI_CA_MOVE_TO_TARGETS_SCORE} [/candidate_action] #enddef #define AI_CA_POISONING # 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