-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathera.cfg
340 lines (305 loc) · 12.2 KB
/
era.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
#textdomain wesnoth-ANLEra
[era]
id=ANLEra
name="A New Land Era"
# wmllint: local spellings »A Land«
# wmllint: local spellings Undeads Saurians defence
description= _ "This era will turn any map into a similar game as the mainline scenario »A New Land«. One can play:
Humans
Outlaws
Orcs
Dunefolk (rely on hills instead of forests)
Dwarves (difficult to play due to 30% defence)
Elves (weaker, but bonus in forest)
Drakes (and Saurians)
Undeads (plague-bonus)
The Merfolk faction can be obtained by negotiation.
Every faction can recruit workers and researchers. Workers can terraform the map and earn additional income. Researchers unlock new units or improve income."
require_era=yes
# Disallowed on maps which add ANL events by themselves, as they would happen twice.
disallow_scenario=multiplayer_A_New_Land,undead_empire_easy,undead_empire_normal,undead_empire_hard
# Can't use both at the same time.
disallow_modification=Anewlandsp
# the typical MP stuff
{RANDOM_SIDE}
{QUICK_4MP_LEADERS}
{TURNS_OVER_ADVANTAGE}
# Include every faction
{./factions/}
# Unlock some advancements.
#ifver WESNOTH_VERSION >= 1.15.4
{ENABLE_DWARVISH_ARCANISTER}
{ENABLE_ARMAGEDDON_DRAKE}
{ENABLE_WOSE_SHAMAN}
#ifver WESNOTH_VERSION < 1.17.10
[modify_unit_type]
type=Orcish Slayer
set_advances_to=Orcish Nightblade
set_experience=64
[/modify_unit_type]
#endif
#endif
#ifver WESNOTH_VERSION >= 1.17.10
{ENABLE_SAURIAN_SPEARTHROWER}
#endif
#ifver WESNOTH_VERSION >= 1.17.13
[modify_unit_type]
type=Dwarvish Miner
set_advances_to=Dwarvish Fighter,Dwarvish Guardsman,Dwarvish Thunderer,Dwarvish Scout
set_experience=25
set_cost=9
[/modify_unit_type]
[event]
name=prerecruit
first_time_only=no
[filter]
type=Dwarvish Miner
level=1
[/filter]
[set_variables]
name=unit.modifications.trait[0]
mode=replace
[value]
id=loyal
#textdomain wesnoth-help
male_name= _ "loyal"
female_name= _ "female^loyal"
description= _ "Zero upkeep"
help_text= _ "<italic>text='Loyal'</italic> units don’t incur upkeep. Most units incur an upkeep cost at the end of every turn, which is equal to their level. Loyal units do not incur this cost." + _ "
During campaigns, certain units may opt to join the player’s forces of their own volition. These units are marked with the loyal trait. Although they may require payment to be recalled, they never incur any upkeep costs. This can make them invaluable during a long campaign, when gold is in short supply. This trait is never given to recruited units, so it may be unwise to dismiss such units or to send them to a foolish death."
#textdomain wesnoth-ANLEra
[effect]
apply_to=loyal
[/effect]
[effect]
[filter]
[not]
type=Dwarvish Miner
[/not]
[/filter]
apply_to=overlay
add="misc/loyal-icon.png"
[/effect]
[effect]
[filter]
type=Dwarvish Miner
[/filter]
apply_to=profile
portrait="portraits/dwarves/scout.webp"
small_portrait="portraits/dwarves/scout.webp~CROP(0,0,328,400)"
description= _ "Dwarves are on flat terrain and in forest as weak as merfolk units. Take care!"
[/effect]
[/value]
[/set_variables]
[unstore_unit]
variable=unit
[/unstore_unit]
[transform_unit]
id=$unit.id
transform_to=Dwarvish Miner
[/transform_unit]
[heal_unit]
[filter]
id=$unit.id
[/filter]
amount=full
restore_statuses=no
[/heal_unit]
[/event]
#endif
# Nice addition to dwarves: their leader gets the healthy trait, this should
# be really useful. Though it's a bit unfair towards the other factions.
[event]
name=prestart
[modify_unit]
[filter]
canrecruit=yes
race=dwarf
[not]
[filter_wml]
[variables]
dont_make_me_quick=yes
[/variables]
[/filter_wml]
[/not]
[/filter]
{TRAIT_HEALTHY}
[/modify_unit]
[heal_unit]
[filter]
canrecruit=yes
race=dwarf
[not]
[filter_wml]
[variables]
dont_make_me_quick=yes
[/variables]
[/filter_wml]
[/not]
[/filter]
amount=full
restore_statuses=no
[/heal_unit]
[gold]
amount=-5
[has_unit]
canrecruit=yes
race=dwarf
[not]
[filter_wml]
[variables]
dont_make_me_quick=yes
[/variables]
[/filter_wml]
[/not]
[/has_unit]
[/gold]
[/event]
#define ELVISH_PLAYER_TURN
name=recruit
[filter]
type=Elvish Shaman,ANLEra Elvish Civilian,Wose Sapling
[/filter]
[filter_second]
race=elf,wose
[/filter_second]
#enddef
#ifver WESNOTH_VERSION >= 1.15.1
[event]
{ELVISH_PLAYER_TURN}
# Allow recruit of one such unit in the game.
# In case of multiple players with elves, the 2nd gets the chance first.
[event]
name=side turn end
[set_extra_recruit]
canrecruit=yes
race=elf,wose
extra_recruit=Wose Sapling
[/set_extra_recruit]
[event]
name=recruit
[filter]
type=Wose Sapling
[/filter]
[filter_second]
race=elf,wose
[/filter_second]
[disallow_extra_recruit]
canrecruit=yes
race=elf,wose
extra_recruit=Wose Sapling
[/disallow_extra_recruit]
# In case of multiple elvish players, add a 2nd chance to get a Wose.
# It's aiming for the 7th.
# On a map with 2-4 elvish players and every of them recruiting in their turn,
# the 7th time will not happen to the same player as the 2th one happened to.
[if]
[not]
[have_unit]
canrecruit=yes
race=elf,wose
count=1
[/have_unit]
[/not]
[then]
[event] #2nd
name=side turn end
[event] #3rd
{ELVISH_PLAYER_TURN}
[event]
name=side turn end
[event] #4th
{ELVISH_PLAYER_TURN}
[event]
name=side turn end
[event] #5th
{ELVISH_PLAYER_TURN}
[event]
name=side turn end
[event] #6th, add recruitment at end
{ELVISH_PLAYER_TURN}
[event]
name=side turn end
[set_extra_recruit]
canrecruit=yes
race=elf,wose
extra_recruit=Wose Sapling
[/set_extra_recruit]
[event] #7th can recruit, remove again
name=recruit
[filter]
type=Wose Sapling
[/filter]
[filter_second]
race=elf,wose
[/filter_second]
[disallow_extra_recruit]
canrecruit=yes
race=elf,wose
extra_recruit=Wose Sapling
[/disallow_extra_recruit]
[/event]
[/event]
[/event]
[/event]
[/event]
[/event]
[/event]
[/event]
[/event]
[/event]
[/then]
[/if]
[/event]
[/event]
[/event]
#endif
# Destroying buildings by the ai players is optional.
# The events for it are added here if the option is enabled.
[event]
name=prestart
[if]
{VARIABLE_CONDITIONAL ai_destroyers boolean_equals yes}
[then]
{AI_DESTROYERS}
[/then]
[/if]
[/event]
# This is specific to the era:
# - it checks against the faction ID
# - it is intended for maps, where the scenario designer didn't prepare for ANL
{./utils/ai/extra_ai_units.cfg}
[options]
# Note: when starting wesnoth purely from commandline with -m,
# these variables will be unset, so testing stuff should be available when
# the option is disabled.
[checkbox]
id=ai_destroyers
default=yes
name= _ "Scorched Earth" + _ " (AI-bonus)"
description= _ "AI controlled units destroy villages and castles and farmland upon moving onto it."
[/checkbox]
#ifdef DEBUG_MODE
[checkbox]
id=anl_debug
default=no
name= _ "ANL no cheating"
description= _ "Adds some debug utilities over forest terrain. Only available if Wesnoth is started with --debug (or -d) as command line parameter. Using ingame :debug doesn't count. This option can also be toggled ingame by using :set_var anl_debug=no" # wmllint: no spellcheck
[/checkbox]
#ifver WESNOTH_VERSION >= 1.16.0
[checkbox]
id=duplicate_team_colors
default=no
name= _ "Allow duplicate team colors"
description= _ "If two sides have the same team color, a new color will be assigned to the side with the higher number.
Compatible with Color Changer mod."
[/checkbox]
#endif
#endif
[/options]
# Including the main chunck of code.
[load_resource]
id=anl_mechanism
[/load_resource]
[/era]
#undef ELVISH_PLAYER_TURN