-
-
Notifications
You must be signed in to change notification settings - Fork 990
/
utils.cfg
234 lines (206 loc) · 5.67 KB
/
utils.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
#textdomain wesnoth-sotbe
#define OLD_ORCISH_SHAMAN SIDE X Y ID_STRING NAME_STRING
[unit]
id={ID_STRING}
name={NAME_STRING}
type=Old Orcish Shaman
profile=portraits/old_orcish_shaman.png
side={SIDE}
x={X}
y={Y}
random_traits=no
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
[/modifications]
[/unit]
#enddef
#define NOVICE_ORCISH_SHAMAN SIDE X Y ID_STRING NAME_STRING
[unit]
id={ID_STRING}
name={NAME_STRING}
type=Novice Orcish Shaman
profile=portraits/young_orcish_shaman.png
side={SIDE}
x={X}
y={Y}
random_traits=no
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
[/modifications]
[/unit]
#enddef
#define ORCISH_SHAMAN SIDE X Y ID_STRING NAME_STRING
[unit]
id={ID_STRING}
name={NAME_STRING}
type=Orcish Shaman
profile=portraits/orcish_shaman.png
side={SIDE}
x={X}
y={Y}
random_traits=no
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
[/modifications]
[/unit]
#enddef
#define BLACK_FLAG
flag=flags/black-flag-[1,2,1,3].png:[100,300,100,300]
flag_icon=flags/black-flag-icon.png
#enddef
#define RENAME_IF_DEAD VAR NAME STRING
[if]
[variable]
name={VAR}
equals=yes
[/variable]
[then]
{MODIFY_UNIT id={NAME} name {STRING}}
[/then]
[/if]
#enddef
#define ALBROCK_SIDE
type=Orcish Warlord
id="Al'Brock"
name= _ "Al’Brock"
side=2
canrecruit=yes
profile=portraits/albrock.png
recruit=Wolf Rider, Orcish Grunt, Troll Whelp, Orcish Archer, Orcish Crossbowman, Orcish Warrior
team_name=Kapoue
user_team_name=_ "Kapou’e"
persistent=yes
#enddef
#define FLARTAR_SIDE
type=Orcish Warlord
id="Flar'Tar"
name= _ "Flar’Tar"
side=3
canrecruit=yes
profile=portraits/flartar.png
recruit=Wolf Rider, Orcish Grunt, Troll Whelp, Orcish Archer, Orcish Crossbowman, Orcish Warrior
team_name=Kapoue
user_team_name=_ "Kapou’e"
persistent=yes
#enddef
#define GREAT_HORDE_NOTE
[note]
description= _ "The Great Horde: upkeep cost of every unit decreased by one."
[/note]
#enddef
#define GOT_THE_GREAT_HORDE SIDES
[event]
name=prerecruit
first_time_only=no
[filter]
side={SIDES}
[/filter]
{VARIABLE unit.upkeep $unit.level}
{VARIABLE_OP unit.upkeep sub 1}
{VARIABLE unit.variables.great_horde_upkeep_mod_applied yes}
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
[/event]
[event]
name=start
[store_unit]
[filter]
side={SIDES}
[not]
[filter_wml]
[modifications]
[trait]
id=loyal
[/trait]
[/modifications]
[/filter_wml]
[/not]
[not]
[filter_wml]
[variables]
great_horde_upkeep_mod_applied=yes
[/variables]
[/filter_wml]
[/not]
[/filter]
kill=yes
variable=horde_units
[/store_unit]
{FOREACH horde_units i}
{VARIABLE horde_units[$i].upkeep $horde_units[$i].level}
{VARIABLE_OP horde_units[$i].upkeep sub 1}
{VARIABLE horde_units[$i].variables.great_horde_upkeep_mod_applied yes}
[unstore_unit]
variable=horde_units[$i]
find_vacant=no
[/unstore_unit]
{NEXT i}
{CLEAR_VARIABLE horde_units}
[/event]
[event]
name=post_advance
first_time_only=no
[filter]
side={SIDES}
[not]
[filter_wml]
[modifications]
[trait]
id=loyal
[/trait]
[/modifications]
[/filter_wml]
[/not]
[/filter]
{VARIABLE unit.upkeep $unit.level}
{VARIABLE_OP unit.upkeep sub 1}
{VARIABLE unit.variables.great_horde_upkeep_mod_applied yes}
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
[/event]
#enddef
#define AI_FORCE_ATTACK_HIGH_XP_UNITS_SETUP
# Function needed for Micro AI which forces attacks on units 1 XP from leveling
# Goes directly into scenario toplevel, but only once per scenario
[event]
name=preload
first_time_only=no
[lua]
code=<<
function close_to_advancing(unit)
if (unit.experience >= unit.max_experience-1) then
return true
else
return false
end
end
>>
[/lua]
[/event]
#enddef
#define AI_FORCE_ATTACK_HIGH_XP_UNITS SIDE
# Micro AI which forces attacks on units 1 XP from leveling
# Goes directly into scenario toplevel, one macro per side
[event]
name=prestart
[micro_ai]
side={SIDE}
ai_type=simple_attack
action=add
ca_score=100001
[filter]
canrecruit=no
[/filter]
[filter_second]
lua_function = "close_to_advancing"
[/filter_second]
[/micro_ai]
[/event]
#enddef