#textdomain wesnoth-httt

#define ABILITY_INITIATIVE
    [firststrike]
        id=initiative
        name= _ "initiative"
        description= _ "All adjacent friendly units will strike first in melee combat, even when defending."
        special_note=_"This unit’s grasp of melee tactics allows adjacent allies to strike the first blow even when defending."
        affect_self=no
        affect_allies=yes
        halo_image_self="misc/firststrike-1.png:100,misc/firststrike-2.png:100,misc/firststrike-3.png:100"
        [filter_opponent]
            [filter_weapon]
                range=melee
            [/filter_weapon]
        [/filter_opponent]
        [affect_adjacent]
        [/affect_adjacent]
    [/firststrike]
    [firststrike]
        id=initiative_anim
        affect_self=no
        affect_allies=yes
        active_on=defense
        [filter_student]
            [filter_weapon]
                special_id_active=initiative
            [/filter_weapon]
        [/filter_student]
        [affect_adjacent]
        [/affect_adjacent]
    [/firststrike]
#enddef

#define INITIATIVE_ANIM FULL_IMAGE HALFWAYS_IMAGE
    [teaching_anim]
        [filter_attack]
            special_id_active=initiative_anim
            [not]
                special_id_active=firststrike
            [/not]
        [/filter_attack]
        start_time=-126
        [frame]
            image={HALFWAYS_IMAGE}:1,{FULL_IMAGE}:250,{HALFWAYS_IMAGE}:1
        [/frame]
    [/teaching_anim]
#enddef
