From c207eeb89913c4ca5cc5bf5b409754f4b341e2ae Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Tue, 10 Mar 2020 23:01:19 +0100 Subject: [PATCH] remove last two cases of extra_defines this converts the optional grand marsal advancement to the [modify_unit_type] syntax. Also with this the core cfg files no longer depend on other macros except EDITOR and the difficulty macros so we could (if we wanted) optmize it to not load this part of the cfg again for each campaign. --- data/campaigns/The_Rise_Of_Wesnoth/_main.cfg | 2 +- data/core/macros/optional_unit_advancements.cfg | 15 +++++++++++++++ data/core/units/dunefolk/Blademaster.cfg | 5 ----- data/core/units/humans/Loyalist_General.cfg | 7 +------ 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/data/campaigns/The_Rise_Of_Wesnoth/_main.cfg b/data/campaigns/The_Rise_Of_Wesnoth/_main.cfg index dd1a05475fb8..a0f40e5624e6 100644 --- a/data/campaigns/The_Rise_Of_Wesnoth/_main.cfg +++ b/data/campaigns/The_Rise_Of_Wesnoth/_main.cfg @@ -14,9 +14,9 @@ image="data/campaigns/The_Rise_Of_Wesnoth/images/campaign_image.png" abbrev= _ "TRoW" define=CAMPAIGN_THE_RISE_OF_WESNOTH - extra_defines=DISABLE_GRAND_MARSHAL first_scenario=01_A_Summer_of_Storms + {DISABLE_GRAND_MARSHAL} {CAMPAIGN_DIFFICULTY EASY "data/campaigns/The_Rise_Of_Wesnoth/images/units/noble-fighter.png" ( _ "Fighter") ( _ "Easy")} {CAMPAIGN_DIFFICULTY NORMAL "data/campaigns/The_Rise_Of_Wesnoth/images/units/noble-commander.png" ( _ "Commander") ( _ "Normal")} {DEFAULT_DIFFICULTY} {CAMPAIGN_DIFFICULTY HARD "data/campaigns/The_Rise_Of_Wesnoth/images/units/noble-lord.png" ( _ "Lord") ( _ "Challenging")} diff --git a/data/core/macros/optional_unit_advancements.cfg b/data/core/macros/optional_unit_advancements.cfg index bd75d7f35f3b..3100c1598dc4 100644 --- a/data/core/macros/optional_unit_advancements.cfg +++ b/data/core/macros/optional_unit_advancements.cfg @@ -1,3 +1,18 @@ +#define ENABLE_PARAGON + [modify_unit_type] + id="Dune Blademaster" + add_advancement="Dune Paragon" + set_experience=220 + [/modify_unit_type] +#enddef + +#define DISABLE_GRAND_MARSHAL + [modify_unit_type] + id="General" + remove_advancement="Grand Marshal" + set_experience=150 + [/modify_unit_type] +#enddef #define ENABLE_ARMAGEDDON_DRAKE [modify_unit_type] diff --git a/data/core/units/dunefolk/Blademaster.cfg b/data/core/units/dunefolk/Blademaster.cfg index 2d33fbfc6c87..d483a13e73e0 100644 --- a/data/core/units/dunefolk/Blademaster.cfg +++ b/data/core/units/dunefolk/Blademaster.cfg @@ -13,14 +13,9 @@ units/dunefolk/soldier/#enddef movement=5 level=3 alignment=lawful -#ifdef ENABLE_PARAGON - experience=220 - advances_to=Dune Paragon -#else experience=150 advances_to=null {AMLA_DEFAULT} -#endif cost=52 usage=fighter description= _ "Dunefolk swordsmen are known for playing a game called the ‘Laeqad Challenge’, in which Laeqads—thick, sturdy reeds that are several sword-lengths in height—are hurled at them like javelins and they attempt to split the reed length-wise in midair. The trick to the game is that the reed is not circularly symmetric: most of the stalk is quite hard, but there is a thin line across the cross section that is softer and easier to cut. For even an experienced swordsman, splitting an entire Laeqad down its length would be an extraordinary achievement; most would be hard-pressed to cut even a single sword length, given the precise aim required to line up the blade with the reed’s soft spot. For a Blademaster, however, splitting several Laeqads in quick succession is quite ordinary, and some are even able to cut through two or three reeds simultaneously with a single sword swish. diff --git a/data/core/units/humans/Loyalist_General.cfg b/data/core/units/humans/Loyalist_General.cfg index 003d12cecf78..5b600f67e830 100644 --- a/data/core/units/humans/Loyalist_General.cfg +++ b/data/core/units/humans/Loyalist_General.cfg @@ -16,14 +16,9 @@ movement=6 level=3 alignment=lawful -#ifdef DISABLE_GRAND_MARSHAL - experience=150 - advances_to=null - {AMLA_DEFAULT} -#else experience=180 advances_to=Grand Marshal -#endif + {AMLA_DEFAULT} cost=54 usage=fighter description= _ "As the leaders of their armies, Generals are responsible for the protection of large or important areas in the kingdoms to which they have sworn fealty. Well seasoned in the art of war, Generals can direct even the freshest recruits to strike strategically against imposing odds and emerge victorious. Recognized by nobility and citizenry alike, they are outfitted in ornate plate armor and granted some of the finest weaponry that human craftsmen can offer."