Skip to content

Commit

Permalink
remove last two cases of extra_defines
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gfgtdf committed Mar 12, 2020
1 parent 240ca58 commit c207eeb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion data/campaigns/The_Rise_Of_Wesnoth/_main.cfg
Expand Up @@ -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")}
Expand Down
15 changes: 15 additions & 0 deletions 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]
Expand Down
5 changes: 0 additions & 5 deletions data/core/units/dunefolk/Blademaster.cfg
Expand Up @@ -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.
Expand Down
7 changes: 1 addition & 6 deletions data/core/units/humans/Loyalist_General.cfg
Expand Up @@ -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."
Expand Down

0 comments on commit c207eeb

Please sign in to comment.