-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmisc.cfg
135 lines (123 loc) · 2.92 KB
/
misc.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
# Utilities to simplify the campaign creation
#define STORE ID
#arg KILL
yes
#endarg
[store_unit]
[filter]
id={ID}
[/filter]
variable={ID}
kill={KILL}
[/store_unit]
#enddef
#define UNSTORE ID X Y
[if]
[lua]
[args]
id={ID}
[/args]
code = <<
local t = ...
return wml.variables[t.id] ~= nil
>>
[/lua]
[then]
[unstore_unit]
variable={ID}
x,y={X},{Y}
find_vacant=yes
[/unstore_unit]
[/then]
[/if]
#enddef
#define UNSTORE_SAME ID
[unstore_unit]
variable={ID}
find_vacant=yes
[/unstore_unit]
#enddef
#define HEAL ID
[heal_unit]
[filter]
id={ID}
[/filter]
moves=full
restore_attacks=yes
restore_statuses=no
[/heal_unit]
#enddef
#define MSG ID MESSAGE
[message]
speaker={ID}
message={MESSAGE}
[/message]
#enddef
# Abilities
#define ABILITY_OBSCURES
# Canned definition of the Illuminates ability to be included in an
# [abilities] clause.
[illuminates]
id=obscure
value=-25
max_value=25
cumulative=no
name= _ "obscures"
female_name= _ "female^obscures"
description= _ "This unit darkens the surrounding area, making chaotic units fight better, and lawful units fight worse.
Any units adjacent to this unit will fight as if it were night when it is dusk, and as if it were dusk when it is day."
special_note= _ "Darkens the nearby areas."
affect_self=yes
[/illuminates]
#enddef
### FIXME:Incomplete macro
#define REMOVE_ABILITY ID ABILITY_ID
{VARIABLE i 0}
[foreach]
array={ID}.abilities.illuminates
variable=this_ability
[do]
{VARIABLE_OP i add 1}
[if]
[variable]
name=this_ability.id
equals={ABILITY_ID}
[/variable]
[then]
#{CLEAR_VARIABLE {ID}.abilities.illuminates[i]}
{MSG narrator "removing ability $this_ability.id"}
[set_variables]
name={ID}.abilities.illuminates
mode=merge
[value]
__remove=yes
[/value]
[/set_variables]
[/then]
[/if]
[/do]
[/foreach]
{CLEAR_VARIABLE i}
#enddef
# Events
#define TIMEOUT_EVENT
[event]
name=time over
[endlevel]
result=defeat
[/endlevel]
[/event]
#enddef
#define DEATH_EVENT IDS
# Death event
[event]
name=die
first_time_only=yes
[filter]
id={IDS}
[/filter]
[endlevel]
result=defeat
[/endlevel]
[/event]
#enddef