#textdomain wesnoth-ei
[textdomain]
    name="wesnoth-ei"
[/textdomain]

#ifdef CAMPAIGN_EASTERN_INVASION
[lua]
    code="wesnoth.require 'campaigns/Eastern_Invasion/lua/bandits.lua'"
[/lua]
[lua]
    code="wesnoth.require 'campaigns/Eastern_Invasion/lua/items.lua'"
[/lua]
[lua]
    code = <<
            wesnoth.dofile('campaigns/Eastern_Invasion/lua/' .. 'skip_animations.lua')
        >>
[/lua]

{campaigns/Eastern_Invasion/utils}
[units]
    {campaigns/Eastern_Invasion/units}
[/units]
{campaigns/Eastern_Invasion/scenarios}

[binary_path]
    path=data/campaigns/Eastern_Invasion
[/binary_path]
{campaigns/Eastern_Invasion/terrain.cfg}
{campaigns/Eastern_Invasion/terrain-graphics.cfg}
#endif
#ifdef EDITOR
[binary_path]
    path=data/campaigns/Eastern_Invasion
[/binary_path]
[editor_group]
    id=eastern_invasion
    name= _ "Eastern Invasion"
    icon="group_mainline"
[/editor_group]
{campaigns/Eastern_Invasion/terrain.cfg}
{campaigns/Eastern_Invasion/terrain-graphics.cfg}
#endif

# wmlscope: set export=no
[campaign]
    id=Eastern_Invasion
    rank=108
    start_year="626 YW"
    end_year="627 YW"
    icon="units/human-loyalists/general.png~RC(magenta>red)"
    name= _ "Eastern Invasion"
    abbrev= _ "EI"
    define=CAMPAIGN_EASTERN_INVASION
    first_scenario=01_Eastern_Invasion

    {CAMPAIGN_DIFFICULTY EASY   "units/human-loyalists/sergeant.png~RC(magenta>red)"   ( _ "Skirmish") ( _ "1x enemies")}
    {CAMPAIGN_DIFFICULTY NORMAL "units/human-loyalists/lieutenant.png~RC(magenta>red)" ( _ "Incursion")( _ "3x enemies")} {DEFAULT_DIFFICULTY}
    {CAMPAIGN_DIFFICULTY HARD   "units/human-loyalists/general.png~RC(magenta>red)"    ( _ "Invasion") ( _ "5x enemies")}

    #
    # ----DIFFICULTY NOTES:
    # for most scenarios in this campaign, there is little player gold variation and enemy gold variation provides the variation between difficulties
    # this is for 2 main reasons:
    #    1) scenarios are easier to balance when there's fewer variables
    #    2) I want the campaign to feel as similar as possible despite varying difficulty
    #       e.g. Giving extra gold or increasing the turn limit can change a small skirmish (on hard) into a big-army battle (on easy)
    #       e.g. Reducing an ally's gold on high difficulty can make them feel useless, which is not my intention for any of the scenarios with allies
    #
    # my goal is for Easy/Normal/Hard difficulty to be 20%/60%/100%; that is to say Easy has 1/5 as many enemies as Hard, and Normal has 3/5 as many
    #    this many not always translate directly to 20/60/100 gold/income, since enemies with many villages effectively have a higher guranteed incoime
    #    also, remember that [side] {INCOME} doesn't include everyone's base +2 income
    #    and also, some optional "challenge" scenarios have reduced scaling (e.g. All-In), since they're intended as challenges and easily avoidable
    #

    #
    # ----STRUCTURE NOTES:
    # broadly speaking, this campaign can be divided into 3 sections
    #     I've tried to keep each section different both narratively and mechanically, so that the campaign doesn't feel stale (it's pretty long)
    #
    # S01-S07, Gweddry and Co are trying to keep their little band of soldiers alive through initial stages of the undead invasion
    #    regular battles, focused around building up a recall list while achieving bonus objectives (Hahid, Terraent, Yannic)
    # S08-S12, Gweddry and Co are in the northlands, dealing with the Chief Dra-Nak subplot and trying to get Dacyn's amulet
    #    cramped and/or small battles, focused around looting items and saving enough gold to keep your recalls alive in S12
    # S13-S18, Gweddry and Co are witnessing a dying Wesnoth, and finally fighting as part of a proper army in a full-fledged war
    #    big battles, where your performance in S01-S12 determine how successful you'll be
    #
    # the campaign is designed with lots of easy-or-hard branching decision points, where one option is easier but the other option has better rewards
    #    S12 "Evacuation" also functions as a decision point - you're guranteed a win even if you don't recruit any units, but the fewer recalls escape the more difficult the future will be
    #    players should be able to complete the campaign by taking only the easy, lower-reward options, culminating in the easier finale S17a "The Duel"
    #    but only players who've succeeded at some challenges will have a strong enough army to complete the more difficult finale S17b "All-In"
    #

    #
    # ----AI NOTES:
    # many scenarios have AI that's scripted to retreat during the daytime, and to regroup when low on unit count
    #     partially for balance, but also because it (IMO) makes for more interesting ebb-and-flow gameplay
    # some scenarios also have ally AI that's scripted to play defensively, with [avoid]s to keep it from being too aggressive
    #     partially for balance, but mostly so that you aren't silently cursing your allies every turn
    # therefore, before altering terrain, please check if it messes with AI behavior (e.g. AI tries to retreat to a village that's no longer there)
    #

    description= _ "There are rumors of undead attacks on the eastern border of Wesnoth. You, an officer in the Royal Army, have been sent to the eastern front to protect the villagers and find out what is happening.

" + _"(Intermediate level, 16 scenarios.)"
    image="data/campaigns/Eastern_Invasion/images/campaign_image.png~FL()"

    [about]
        title = _ "Newest Campaign Version Rewrite"
        [entry]
            name = "Dalas"
        [/entry]
    [/about]
    [about]
        title = _ "Original Campaign Design"
        [entry]
            name = "Joseph Simmons (turin)"
        [/entry]
    [/about]
    [about]
        title = _ "Prose and Story Editing, Code Preparation"
        [entry]
            name = "nemaara"
        [/entry]
    [/about]
    [about]
        title = _ "Artwork and Graphics Design"
        [entry]
            name = "Aaron Redfern (A-Red)"
            comment = "New Owaec sprites"
        [/entry]
        [entry]
            name = "Emilien Rotival (LordBob)"
            comment = "new portraits"
        [/entry]
        [entry]
            name = "James Woo (Pickslide)"
            comment = "old portraits"
        [/entry]
        [entry]
            name = "Neoriceisgood"
        [/entry]
    [/about]
    [about]
        title = _ "Campaign Redesign Playtesters"
        [entry]
            name = "Konrad2"
        [/entry]
        [entry]
            name = "Lord-Knightmare"
        [/entry]
        [entry]
            name = "Toranks"
        [/entry]
    [/about]
    [about]
        title = _ "Previous Campaign Maintenance"
        [entry]
            name = "Dimitar Ilccov (Mythological)"
        [/entry]
        [entry]
            name = "Lari Nieminen (zookeeper)"
        [/entry]
        [entry]
            name = "Astrid Halberkamp"
        [/entry]
    [/about]
    [about]
        title = _ "Others"
        [entry]
            name = "Eric S. Raymond (ESR)"
        [/entry]
        [entry]
            name = "Loci"
        [/entry]
    [/about]

#ifdef CAMPAIGN_EASTERN_INVASION
    {GLOBAL__ANIMATIONS_RECRUIT}
    {GLOBAL__UNIVERSAL_AMLAS}
    {GLOBAL__ABILITY_TERROR}
    {GLOBAL__TRAIT_DESERTER}
    {GLOBAL__IMPLMENTATION_SHIELD_OF_THE_SENTINEL}
    {GLOBAL__PLAGUE_STAFF_RECRUIT_VARIATIONS}
    {GLOBAL__PLAGUE_STAFF_USE_UPKEEP}

    # initialize right-click menus for the various items in the game.
    {GLOBAL__DROPPABLE_HOLY_AMULET {ID_HOLY_AMULET_1}}
    {GLOBAL__DROPPABLE_HOLY_AMULET {ID_HOLY_AMULET_2}}
    {GLOBAL__DROPPABLE_HOLY_AMULET {ID_HOLY_AMULET_3}}
    {GLOBAL__DROPPABLE_CRYSTAL_QUIVER}
    {GLOBAL__DROPPABLE_SHIELD_OF_THE_SENTINEL}
    {GLOBAL__DROPPABLE_BANEBLADE}
    {GLOBAL__DROPPABLE_INVISIBILITY}
    {GLOBAL__DROPPABLE_PLAGUE_STAFF}

    {ENABLE_PARAGON} # dunefolk are a challenge to get, so they may as well be powerful
    {DISABLE_GRAND_MARSHAL} # don't let S17/S18b's generals overshadow Gweddry
    [modify_unit_type]
        type=Ogre
        set_advances_to=Great Ogre
        set_experience=80
    [/modify_unit_type]
    [modify_unit_type]
        type=Dwarvish Miner
        set_cost=8
    [/modify_unit_type]
#endif
[/campaign]
