
# 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

# well-known candidate actions

#define AI_CA_GOTO
    [candidate_action]
        id=goto
        engine=cpp
        name=testing_ai_default::goto_phase
        max_score={AI_CA_GOTO_SCORE}
        score={AI_CA_GOTO_SCORE}
    [/candidate_action]
#enddef

#define AI_CA_RECRUITMENT
    [candidate_action]
        id=recruitment
        engine=cpp
        name=testing_ai_default::aspect_recruitment_phase
        max_score={AI_CA_RECRUITMENT_SCORE}
        score={AI_CA_RECRUITMENT_SCORE}
    [/candidate_action]
#enddef

#define AI_CA_MOVE_LEADER_TO_GOALS
    [candidate_action]
        id=move_leader_to_goals
        engine=cpp
        name=testing_ai_default::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
    [candidate_action]
        id=move_leader_to_keep
        engine=cpp
        name=testing_ai_default::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
    [candidate_action]
        id=combat
        engine=cpp
        name=testing_ai_default::combat_phase
        max_score={AI_CA_COMBAT_SCORE}
        score={AI_CA_COMBAT_SCORE}
    [/candidate_action]
#enddef

#define AI_CA_HEALING
    [candidate_action]
        id=healing
        engine=cpp
        name=testing_ai_default::get_healing_phase
        max_score={AI_CA_HEALING_SCORE}
        score={AI_CA_HEALING_SCORE}
    [/candidate_action]
#enddef

#define AI_CA_VILLAGES
    [candidate_action]
        id=villages
        engine=cpp
        name=testing_ai_default::get_villages_phase
        max_score={AI_CA_VILLAGES_SCORE}
        score={AI_CA_VILLAGES_SCORE}
    [/candidate_action]
#enddef

#define AI_CA_RETREAT
    [candidate_action]
        id=retreat
        engine=cpp
        name=testing_ai_default::retreat_phase
        max_score={AI_CA_RETREAT_SCORE}
        score={AI_CA_RETREAT_SCORE}
    [/candidate_action]
#enddef

#define AI_CA_MOVE_TO_TARGETS
    [candidate_action]
        id=move_to_targets
        engine=cpp
        name=testing_ai_default::testing_move_to_targets_phase
        max_score={AI_CA_MOVE_TO_TARGETS_SCORE}
        score={AI_CA_MOVE_TO_TARGETS_SCORE}
    [/candidate_action]
#enddef

# extra candidate actions

#define AI_CA_SIMPLE_MOVE_TO_TARGETS
    [candidate_action]
        id=simple_move_to_targets
        engine=cpp
        name=testing_ai_default::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
    # candidate action 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
