From 95286cb49f0cdd2b329e57a5ee76f6357e43bfc8 Mon Sep 17 00:00:00 2001 From: Pentarctagon Date: Fri, 12 Jul 2019 09:07:12 -0500 Subject: [PATCH] Command line --preprocess missing some macros. Command line --preprocess doesn't process macros in data/core/units.cfg. Fixes #4152. --- data/core/macros/movetypes.cfg | 129 +++++++++++++++++++++++++++++++++ data/core/units.cfg | 120 ------------------------------ 2 files changed, 129 insertions(+), 120 deletions(-) create mode 100644 data/core/macros/movetypes.cfg diff --git a/data/core/macros/movetypes.cfg b/data/core/macros/movetypes.cfg new file mode 100644 index 000000000000..2309e9caf424 --- /dev/null +++ b/data/core/macros/movetypes.cfg @@ -0,0 +1,129 @@ +# a special macro to define slightly less nimble elves such +# as fighters, who don't do quite so well in forest +#define LESS_NIMBLE_ELF + [defense] + forest=40 + [/defense] +#enddef + +#define WOODLAND_RESISTANCE + [resistance] + blade=100 + pierce=100 + impact=100 + fire=100 + cold=100 + arcane=110 + [/resistance] +#enddef + +#define FLY_MOVE + deep_water=1 + shallow_water=1 + reef=1 + swamp_water=1 + flat=1 + sand=1 + forest=1 + hills=1 + mountains=1 + village=1 + castle=1 + frozen=1 + unwalkable=1 +#enddef + +#define FLY_DEFENSE DEFENSE_NUMBER + deep_water={DEFENSE_NUMBER} + shallow_water={DEFENSE_NUMBER} + reef={DEFENSE_NUMBER} + swamp_water={DEFENSE_NUMBER} + flat={DEFENSE_NUMBER} + sand={DEFENSE_NUMBER} + forest={DEFENSE_NUMBER} + hills={DEFENSE_NUMBER} + mountains={DEFENSE_NUMBER} + village={DEFENSE_NUMBER} + castle={DEFENSE_NUMBER} + frozen={DEFENSE_NUMBER} + unwalkable={DEFENSE_NUMBER} +#enddef + +#define FLY_RESISTANCE + [resistance] + blade=100 + pierce=100 + impact=120 + fire=100 + cold=100 + arcane=80 + [/resistance] +#enddef + +#define MOUNTAIN_MOVE + [movement_costs] + shallow_water=3 + reef=2 + swamp_water=3 + flat=1 + sand=1 + forest=1 + hills=1 + mountains=1 + village=1 + castle=1 + cave=1 + frozen=2 + fungus=1 + [/movement_costs] +#enddef + +#define MOUNTAIN_DEFENSE + [defense] + shallow_water=80 + reef=70 + swamp_water=80 + flat=70 + sand=70 + forest=70 + hills=40 + mountains=30 + village=50 + castle=40 + cave=50 + frozen=70 + fungus=60 + [/defense] +#enddef + +#define DRAKEFLY_MOVE + [movement_costs] + deep_water=2 + shallow_water=1 + reef=1 + swamp_water=1 + flat=1 + sand=1 + forest=1 + hills=1 + mountains=1 + village=1 + castle=1 + cave=3 + fungus=2 + frozen=2 + unwalkable=1 + [/movement_costs] +#enddef + +#define DRAKEFLY_RESISTANCE + [resistance] + blade=90 + pierce=110 + impact=80 + fire=50 + cold=150 + arcane=130 + [/resistance] +#enddef + diff --git a/data/core/units.cfg b/data/core/units.cfg index fce8520dcba8..7abbb57c908f 100644 --- a/data/core/units.cfg +++ b/data/core/units.cfg @@ -1,11 +1,4 @@ #textdomain wesnoth-help -# a special macro to define slightly less nimble elves such -# as fighters, who don't do quite so well in forest -#define LESS_NIMBLE_ELF - [defense] - forest=40 - [/defense] -#enddef #define RACIAL_NOTES_ORCS_AND_GOBLINS _ "Despite orcs’ reliance on raw strength, few of their children are destined to grow to possess any. Goblins are, despite their appearance, born as siblings to the orcs and members of the same race. While other races usually bear children singly or in pairs, orcs will have large litters of children all at once, causing their populations to explode. Within any litter, there will be only one or two who grow to the strength of a “true orc”, a few who are born slightly smaller and weaker, and the rest, often a full half of any litter, are much weaker and destined to be goblins. Almost as newborns the class system of orcish society is visible, with the weak put in their place by their stronger siblings. The stronger ones will routinely grab most of the food and thus grow stronger still, while their weaker siblings do not."#enddef @@ -675,16 +668,6 @@ The life span of the wose is unknown, although the most ancient members of this [/resistance] [/movetype] -#define WOODLAND_RESISTANCE - [resistance] - blade=100 - pierce=100 - impact=100 - fire=100 - cold=100 - arcane=110 - [/resistance] -#enddef [movetype] name=woodland [movement_costs] @@ -802,46 +785,6 @@ The life span of the wose is unknown, although the most ancient members of this [/resistance] [/movetype] -#define FLY_MOVE - deep_water=1 - shallow_water=1 - reef=1 - swamp_water=1 - flat=1 - sand=1 - forest=1 - hills=1 - mountains=1 - village=1 - castle=1 - frozen=1 - unwalkable=1 -#enddef -#define FLY_DEFENSE DEFENSE_NUMBER - deep_water={DEFENSE_NUMBER} - shallow_water={DEFENSE_NUMBER} - reef={DEFENSE_NUMBER} - swamp_water={DEFENSE_NUMBER} - flat={DEFENSE_NUMBER} - sand={DEFENSE_NUMBER} - forest={DEFENSE_NUMBER} - hills={DEFENSE_NUMBER} - mountains={DEFENSE_NUMBER} - village={DEFENSE_NUMBER} - castle={DEFENSE_NUMBER} - frozen={DEFENSE_NUMBER} - unwalkable={DEFENSE_NUMBER} -#enddef -#define FLY_RESISTANCE - [resistance] - blade=100 - pierce=100 - impact=120 - fire=100 - cold=100 - arcane=80 - [/resistance] -#enddef [movetype] name=fly flies=yes @@ -1058,40 +1001,6 @@ The life span of the wose is unknown, although the most ancient members of this [/resistance] [/movetype] -#define MOUNTAIN_MOVE - [movement_costs] - shallow_water=3 - reef=2 - swamp_water=3 - flat=1 - sand=1 - forest=1 - hills=1 - mountains=1 - village=1 - castle=1 - cave=1 - frozen=2 - fungus=1 - [/movement_costs] -#enddef -#define MOUNTAIN_DEFENSE - [defense] - shallow_water=80 - reef=70 - swamp_water=80 - flat=70 - sand=70 - forest=70 - hills=40 - mountains=30 - village=50 - castle=40 - cave=50 - frozen=70 - fungus=60 - [/defense] -#enddef [movetype] name=mountainfoot {MOUNTAIN_MOVE} @@ -1450,35 +1359,6 @@ The life span of the wose is unknown, although the most ancient members of this [/resistance] [/movetype] -#define DRAKEFLY_MOVE - [movement_costs] - deep_water=2 - shallow_water=1 - reef=1 - swamp_water=1 - flat=1 - sand=1 - forest=1 - hills=1 - mountains=1 - village=1 - castle=1 - cave=3 - fungus=2 - frozen=2 - unwalkable=1 - [/movement_costs] -#enddef -#define DRAKEFLY_RESISTANCE - [resistance] - blade=90 - pierce=110 - impact=80 - fire=50 - cold=150 - arcane=130 - [/resistance] -#enddef [movetype] name=drakefly # this has been commented out because it interferes with the standard