Skip to content

Commit

Permalink
Command line --preprocess missing some macros.
Browse files Browse the repository at this point in the history
Command line --preprocess doesn't process macros in data/core/units.cfg.

Fixes wesnoth#4152.
  • Loading branch information
Pentarctagon committed Jul 17, 2019
1 parent ae2d89b commit 95286cb
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 120 deletions.
129 changes: 129 additions & 0 deletions data/core/macros/movetypes.cfg
Original file line number Diff line number Diff line change
@@ -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

120 changes: 0 additions & 120 deletions data/core/units.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 95286cb

Please sign in to comment.