-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathunion.cfg
196 lines (171 loc) · 5.21 KB
/
union.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
#textdomain wesnoth-Invasion_from_the_Unknown
#define SOUND_LIST:UNION_HIT
union-[1~4].ogg #enddef
#define SOUND_LIST:UNION_MISS
union-[1~4].ogg #enddef
#define ABILITY_UNION
[dummy]
id=union
name= _ "union"
description= _ "This unit wields the ancient power of the Union of Light and Darkness."
[/dummy]
#enddef
#define ABILITY_UNION_ID
[dummy]
id=union
[/dummy]
#enddef
#
# General FIXME:
#
# Currently, it is possible for Elynia/Mal Keshar to use a non-Union attack
# first and let the other cast Union on an enemy before ending the current
# turn. This is because we can't currently filter on the assistant's
# attacks_left attribute, without using lua_function or [filter_wml] at least.
# Personally, I feel there's no need to fix this loophole, but I somehow
# suspect at least a dozen playtesters will report it as a bug anyway.
#
# Also, enemy Union casters (spoilers!) don't disable the player's ability to
# cast Union next turn. This is partly because the implementation would be too
# complicated (especially but not exclusively on 1.12.x without the 1.13.x
# [object] duration="turn end" attribute, but also because I'm not really sure
# it would make the gameplay more interesting as opposed to outright
# frustrating.
#
#define WEAPON_SPECIAL_UNION
[dummy]
id=union
name= _ "union"
description= _ "This attack is only available on offense, and requires an assistant unit with the same weapon special to be adjacent to both the target and the attacker. If this attack is used during a turn, the assistant will not be able to perform any additional actions for the current playing side’s turn."
[/dummy]
[disable]
# Not available on defense.
id=union_disable_on_defense
active_on=defense
[/disable]
[disable]
id=union_require_adjacent_casters
active_on=offense
[filter_self]
[not]
[filter_adjacent]
ability=union
[/filter_adjacent]
[/not]
[/filter_self]
[/disable]
#enddef
#define UNION_EFFECTS
[effect]
apply_to=new_ability
[abilities]
{ABILITY_UNION}
[/abilities]
[/effect]
[effect]
apply_to=hitpoints
increase_total=20%
heal_full=yes
[/effect]
[effect]
# NOTE: this must be the last [effect] for UNION_ATTACK_STATS to work
# as intended!
apply_to=new_attack
name=union
description=_"union"
type=arcane
[specials]
{WEAPON_SPECIAL_MAGICAL}
{WEAPON_SPECIAL_UNION}
[/specials]
damage=29
number=3
range=ranged
icon=attacks/union.png
[/effect]
#enddef
#define UNION_ATTACK_STATS _DMG _NUM
[+effect]
damage={_DMG}
number={_NUM}
[/effect]
#enddef
#
# Include the following in scenarios with Union users. Yes, I realize I could
# use ATTACH_EVENTS_TO_UNIT instead.
#
#define UNION_CAST_EVENTS
[event]
id=union_controller
name=attack
first_time_only=no
[filter_attack]
special=union
[/filter_attack]
# Kind of redundant, but we want the ability to toggle the union on and
# off as needed.
[filter]
ability=union
[/filter]
[store_unit]
[filter]
ability=union
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
# Optimization for enemy union casters
side=$side_number
[/filter]
variable=adjacent_union_units
kill=no
[/store_unit]
[foreach]
array=adjacent_union_units
variable=union_unit
[do]
{VARIABLE_DEC union_unit.attacks_left}
{VARIABLE union_unit.moves 0}
[unstore_unit]
find_vacant=no
variable=union_unit
[/unstore_unit]
[/do]
[/foreach]
{CLEAR_VARIABLE adjacent_union_units}
[/event]
#enddef
#define UNION_ANIM_MAL_KESHAR
[attack_anim]
[filter_attack]
name=union
[/filter_attack]
[if]
hits=yes
{UNION_FOG}
{UNION_BEAM}
sound1_start_time=-450
[sound1_frame]
sound={SOUND_LIST:HOLY}
[/sound1_frame]
sound2_start_time=-400
[sound2_frame]
sound={SOUND_LIST:UNION_HIT}
[/sound2_frame]
[/if]
start_time=-650
offset=0.0
blend_color=16,0,32
blend_ratio=0.0~0.6:500,0.6~0.0:200
[frame]
image="units/undead-necromancers/ancient-lich-magic-[1,2].png:100"
[/frame]
[frame]
image="units/undead-necromancers/ancient-lich-magic-3.png:450"
[/frame]
[frame]
image="units/undead-necromancers/ancient-lich-magic-[2,1].png:100"
[/frame]
{SOUND:HIT_AND_MISS magic-faeriefire.ogg magic-dark-miss.ogg -350}
[/attack_anim]
#enddef
# kate: indent-mode normal; encoding utf-8; space-indent on;