#textdomain wesnoth-ei

#define LIMIT_RECRUITS_PER_TURN SIDES AMOUNT
    [event]
        name=side turn
        first_time_only=no
        [filter_condition]
            [have_unit]
                side=$side_number

                [and]
                    side={SIDES}
                [/and]
            [/have_unit]
        [/filter_condition]

        {VARIABLE recruits_this_turn 0}

        [event]
            name=turn end

            {CLEAR_VARIABLE recruits_this_turn}
        [/event]
    [/event]

    [event]
        name=recruit
        first_time_only=no
        [filter]
            side={SIDES}
        [/filter]

        {VARIABLE_OP recruits_this_turn add 1}

        [if]
            {VARIABLE_CONDITIONAL recruits_this_turn equals {AMOUNT}}
            [then]
                [store_side]
                    side=$side_number
                [/store_side]

                [disallow_recruit]
                    side=$side_number
                [/disallow_recruit]
                [event]
                    name=turn end

                    [allow_recruit]
                        side=$side.side
                        type=$side.recruit
                    [/allow_recruit]

                    {CLEAR_VARIABLE side}
                [/event]
            [/then]
        [/if]
    [/event]
#enddef

#define HOLY_AMULET X Y
    {PICKUPPABLE_ITEM holy_amulet {X} {Y} side=1 items/ankh-necklace.png
    _"Wearing this amulet will cause every blow you deal to inflict <i>arcane</i> damage!"
    _"holy amulet^Take it"
    _"holy amulet^Leave it"
    _"I am not suited to using this item! Let another take it." (
        [object]
            name= _ "Holy Amulet"
            image=items/ankh-necklace.png
            duration=forever

            [effect]
                apply_to=attack
                range=melee
                set_type=arcane
            [/effect]
            [effect]
                apply_to=attack
                range=ranged
                set_type=arcane
            [/effect]
            [effect]
                apply_to=overlay
                add="misc/arcane-icon.png"
            [/effect]
        [/object]
    )}
#enddef
