#textdomain wesnoth

#note: as fai engine is temporary disabled, this example will not work atm, it will work again soon
[ai]
    id=default_ai_poisoning
    description= Default AI with poisoning formula
    version=10703
    [stage]
        engine=cpp
        name=testing_ai_default::candidate_action_evaluation_loop #this is candidate action evaluation loop stage
        [candidate_action] #it consists of several candidate actions
            engine=fai # fai engine is temporary disabled, it will be enabled real soon. Note that the rest of parameters are parsed by formula ai engine
            name=poisoner #this paramerer (and the rest of them), are specific to fai engine
            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]
    [/stage]
    [stage] #as candidate action evaluation loop ends when all actions score <=0, this stage is needed to play the rest of the turn
        engine=cpp
        name=testing_ai_default::fallback
        [ai] # this is fallback stage specific parameter - it holds parameters of the AI to which we fall back in this fallback stage
            ai_algorithm = default_ai # that means 'fall back to default c++-based AI'
        [/ai]
    [/stage]
[/ai]
