#textdomain wesnoth-utbs
# by Asa Swain

[textdomain]
    name="wesnoth-utbs"
[/textdomain]

# wmlscope: set export=no
[campaign]
    id=Under_the_Burning_Suns
    name= _ "Under the Burning Suns"
    icon="data/campaigns/Under_the_Burning_Suns/images/units/quenoth/kaleh.png~RC(magenta>red)"
    image="data/campaigns/Under_the_Burning_Suns/images/campaign_image.png"
    abbrev= _ "UtBS"
    rank=205
    year="300 AF"
    define=CAMPAIGN_UNDER_THE_BURNING_SUNS
    first_scenario=01_The_Morning_After

    description= _ "In the distant future a small band of elves struggles to survive amidst the ruins of fallen empires. Lead your people out of the desert on an epic journey to find a new home.

" + _"(Expert level, 10 scenarios.)"

    # Old difficulty levels are not selectable anymore, but for now loading saves using them should still work.

    {CAMPAIGN_DIFFICULTY EASY   "data/campaigns/Under_the_Burning_Suns/images/units/quenoth/fighter.png~RC(magenta>red)" ( _ "Fighter") ( _ "Normal")}
    {CAMPAIGN_DIFFICULTY NORMAL "data/campaigns/Under_the_Burning_Suns/images/units/quenoth/warrior.png~RC(magenta>red)" ( _ "Warrior") ( _ "Challenging")} {DEFAULT_DIFFICULTY}
    {CAMPAIGN_DIFFICULTY HARD   "data/campaigns/Under_the_Burning_Suns/images/units/quenoth/champion.png~RC(magenta>red)" ( _ "Champion") ( _ "Nightmare")}

    # UTBS credits
    [about]
        title= _ "Campaign Design"
        [entry]
            name= "Asa Swain"
        [/entry]
        [entry]
            name= "Piotr Cychowski (Mist/cycholka)"
        [/entry]
    [/about]
    [about]
        title= _ "Campaign Maintenance"
        [entry]
            name= "Iris Morelle (shadowm/shikadiqueen)"
        [/entry]
        [entry]
            name= "Jan Rietema (Rhuvaen)"
        [/entry]
        [entry]
            name = "Lari Nieminen (zookeeper)"
        [/entry]
        [entry]
            name= "Piotr Cychowski (Mist/cycholka)"
        [/entry]
        [entry]
            name= "Simon Forsyth (Alarantalara)"
        [/entry]
        [entry]
            name= "Steven Panek (Espreon)"
        [/entry]
    [/about]
    [about]
        title= _ "Artwork and Graphics Design"
        [entry]
            name= "Dan Gerhards (beetlenaut)"
            comment= "new Flesh Golem sprites"
        [/entry]
        [entry]
            name = "Kwandulin"
            comment = "New Kaleh and Nym sprites"
        [/entry]
        [entry]
            name= "doofus-01"
            comment = "Monster Crab sprite"
        [/entry]
        [entry]
            name= "Hogne Haskjold (Frame)"
        [/entry]
        [entry]
            name= "Iris Morelle (shadowm/shikadiqueen)"
        [/entry]
        [entry]
            name= "J.W. Bjerk (Eleazar)"
        [/entry]
        [entry]
            name= "James Woo (Pickslide)"
        [/entry]
        [entry]
            name= "Javier Hoyos (Vendanna)"
        [/entry]
        [entry]
            name = "Marcus Rosén (sleepwalker)"
            comment = "Dark Assassin sprite and animations"
        [/entry]
        [entry]
            name= "Mark Goodenough (Ranger M)"
        [/entry]
        [entry]
            name= "Mikolaj Machowski (Emdot)"
        [/entry]
        [entry]
            name= "Murray Cook (Zhukov)"
        [/entry]
        [entry]
            name= "Peter Geinitz (Shadow)"
        [/entry]
        [entry]
            name= "Richard Kettering (Jetrel)"
        [/entry]
        [entry]
            name= "Sangel"
        [/entry]
        [entry]
            name= "Samuel Wilson (megane)"
        [/entry]
        [entry]
            name= "Scott Klempner"
        [/entry]
        [entry]
            name = "Vincent Langner (Vyncyn)"
            comment = "Spider Lich and Human Commander sprites"
        [/entry]
        [entry]
            name= "Zerovirus"
            comment = "Naga Hunter sprite"
        [/entry]
    [/about]
    [about]
        title= _ "Miscellaneous"
        [entry]
            name= "Fabian Müller (Fabi/Fendrin)"
        [/entry]
        [entry]
            name= "Mark Polo"
        [/entry]
        [entry]
            name="Matthias Schoeck (mattsc)"
            comment="Messenger AI"
        [/entry]
        [entry]
            name= "Isaac"
        [/entry]
        [entry]
            name= "Ringcaat (Thorin N. Tatge)"
        [/entry]
        [entry]
            name=_"And special thanks to everyone else who I forgot to mention."
        [/entry]
    [/about]
[/campaign]

#ifdef CAMPAIGN_UNDER_THE_BURNING_SUNS

[binary_path]
    path=data/campaigns/Under_the_Burning_Suns
[/binary_path]

# Define macro that expands into include paths for this campaign
#define UTBS_INCLUDE TARGET_VALUE
    {campaigns/Under_the_Burning_Suns/{TARGET_VALUE}}
#enddef

# Define macro that expands into map_data keys that include this campaign's path
#define UTBS_MAP TARGET_VALUE
    map_data="{campaigns/Under_the_Burning_Suns/maps/{TARGET_VALUE}}"
#enddef

#Append utils folder
{UTBS_INCLUDE utils}

# Add global events
[+campaign]
    {WEAPON_SPECIAL_DAZE_EVENTS}
    {ABILITY_FORMATION_EVENTS}
    {ABILITY_DISENGAGE_EVENTS}
    {ABILITY_SUPPORT_EVENTS}
    # On recruit, this switches the higher-recruit-cost units to the normal
    # types, so that the different cost variations don't need to be taken into
    # account for example in unit filters.
#define DISCARD_RECRUIT_COST_HELPER_UNITS TYPE
    [event]
        name=recruit
        first_time_only=no

        [filter]
            race=elf
        [/filter]

        [filter_condition]
            [variable]
                name=unit.type
                contains={TYPE}
            [/variable]

            [variable]
                name=unit.type
                not_equals={TYPE}
            [/variable]
        [/filter_condition]

        {VARIABLE unit.type {TYPE}}

        [unstore_unit]
            variable=unit
            find_vacant=no
        [/unstore_unit]
    [/event]
#enddef

    {DISCARD_RECRUIT_COST_HELPER_UNITS "Quenoth Fighter"}
    {DISCARD_RECRUIT_COST_HELPER_UNITS "Quenoth Scout"}
    {DISCARD_RECRUIT_COST_HELPER_UNITS "Quenoth Mystic"}
    {DISCARD_RECRUIT_COST_HELPER_UNITS "Tauroch Rider"}
[/campaign]

#Append Units
[units]
    {UTBS_INCLUDE units/units.cfg}
    {UTBS_INCLUDE units/quenoth}
    {UTBS_INCLUDE units/humans}
    {UTBS_INCLUDE units/monsters}
    {UTBS_INCLUDE units/nagas}
    {UTBS_INCLUDE units/orcs}
    {UTBS_INCLUDE units/undead}

    [hide_help]
        # wmllint: markcheck off
        type_adv_tree=Elvish Fighter,Elvish Shaman,Elvish Archer,Elvish Scout,Elvish Lord,Wose
        # wmllint: markcheck on
        type=Elvish Lady
    [/hide_help]
[/units]

{UTBS_INCLUDE scenarios}

[lua]
    code="wesnoth.require 'campaigns/Under_the_Burning_Suns/lua/theme.lua'"
[/lua]

#endif

#ifdef EDITOR
[binary_path]
    path=data/campaigns/Under_the_Burning_Suns
[/binary_path]

[editor_group]
    id=utbs
    name= _ "Under the Burning Suns"
    icon="group_mainline"
[/editor_group]

{campaigns/Under_the_Burning_Suns/utils/terrain.cfg}
{campaigns/Under_the_Burning_Suns/utils/terrain_graphics.cfg}
#endif

# wmllint: directory spellings Kaleh Nym Zhul Garak Quenoth Eloh Uria Tanuil
# wmllint: directory spellings Melusand Esanoo Zurg Grimnir Tanstafaal
# wmllint: directory spellings Yechnagoth Zocthanol Zhangor Sela Naia Keratur
# wmllint: directory spellings Jarl Rogrimir
