#textdomain wesnoth-multiplayer
#define RANDOM_SIDE
    [multiplayer_side]
        id=Random
        name= _"Random"
        image="units/random-dice.png"
        {MAGENTA_IS_THE_TEAM_COLOR}
        random_faction=yes
    [/multiplayer_side]
#enddef

#define QUICK_4MP_LEADERS
    # This makes all leaders with 4 MP receive the quick trait.

    [event]
        name=prestart

        [store_unit]
            [filter]
                canrecruit=yes

                [filter_wml]
                    max_moves=4
                [/filter_wml]
            [/filter]

            kill=yes
            variable=leaders_to_make_quick
        [/store_unit]

        {FOREACH leaders_to_make_quick i}
            [set_variables]
                name=leaders_to_make_quick[$i].modifications
                mode=merge

                [literal]
                    {TRAIT_QUICK}
                [/literal]
            [/set_variables]

            {CLEAR_VARIABLE leaders_to_make_quick[$i].max_moves,leaders_to_make_quick[$i].moves,leaders_to_make_quick[$i].max_hitpoints,leaders_to_make_quick[$i].hitpoints}

            [unstore_unit]
                variable=leaders_to_make_quick[$i]
            [/unstore_unit]
        {NEXT i}

        {CLEAR_VARIABLE leaders_to_make_quick}
    [/event]
#enddef

[era]
    id=era_default
    name= _ "Default"

    {RANDOM_SIDE}
    {multiplayer/factions/loyalists-default.cfg}
    {multiplayer/factions/rebels-default.cfg}
    {multiplayer/factions/northerners-default.cfg}
    {multiplayer/factions/undead-default.cfg}
    {multiplayer/factions/knalgans-default.cfg}
    {multiplayer/factions/drakes-default.cfg}

    {QUICK_4MP_LEADERS}
[/era]

[era]
    id=era_heroes
    name= _ "Age of Heroes"

    {RANDOM_SIDE}
    {multiplayer/factions/loyalists-aoh.cfg}
    {multiplayer/factions/rebels-aoh.cfg}
    {multiplayer/factions/northerners-aoh.cfg}
    {multiplayer/factions/undead-aoh.cfg}
    {multiplayer/factions/knalgans-aoh.cfg}
    {multiplayer/factions/drakes-aoh.cfg}

    {QUICK_4MP_LEADERS}
[/era]
