-
-
Notifications
You must be signed in to change notification settings - Fork 988
/
abilities.cfg
127 lines (104 loc) · 2.79 KB
/
abilities.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
#textdomain wesnoth-httt
# NOTE: This code is tailored for Li'sar in this campaign specifically, and will
# not work correctly elsewhere without modification.
#define ABILITY_INITIATIVE
[dummy]
id=initiative
name= _ "initiative"
description= _ "All adjacent friendly units will strike first in melee combat, even when defending."
[/dummy]
#enddef
#define SPECIAL_NOTES_INITIATIVE
_"This unit's grasp of melee tactics allows adjacent allies to strike the first blow even when defending."#enddef
#define INITIATIVE_OBJECT FILTER
[object]
silent=yes
[filter]
{FILTER}
[/filter]
[effect]
apply_to=attack
range=melee
[set_specials]
mode=append
[firststrike]
id=initiative
name=""
description=""
[filter_self]
[filter_adjacent]
id="Li'sar"
[/filter_adjacent]
[/filter_self]
[/firststrike]
[/set_specials]
[/effect]
[/object]
#enddef
#define LACKS_INITIATIVE_FILTER
side=1,2
[filter_side]
[allied_with]
[has_unit]
id="Li'sar"
[/has_unit]
[/allied_with]
[/filter_side]
[filter_wml]
[attack]
range=melee
[/attack]
[/filter_wml]
[not]
[filter_wml]
[attack]
range=melee
[specials]
[firststrike]
[/firststrike]
[/specials]
[/attack]
[/filter_wml]
[/not]
#enddef
#define WEAPON_SPECIAL_INITIATIVE_EVENTS
[event]
id=initiative_1
name=prerecruit,prerecall
first_time_only=no
[filter]
{LACKS_INITIATIVE_FILTER}
[/filter]
[allow_undo]
[/allow_undo]
{INITIATIVE_OBJECT x,y=$x1,$y1}
[/event]
[event]
id=initiative_2
name=side 1 turn, side 2 turn
first_time_only=no
[store_unit]
[filter]
{LACKS_INITIATIVE_FILTER}
[/filter]
kill=no
variable=units_lacking_initiative
[/store_unit]
[foreach]
array=units_lacking_initiative
[do]
{INITIATIVE_OBJECT x,y=$this_item.x,$this_item.y}
[/do]
[/foreach]
{CLEAR_VARIABLE units_lacking_initiative}
[/event]
[event]
id=initiative_3
name=attack
first_time_only=no
[filter_second]
{LACKS_INITIATIVE_FILTER}
[/filter_second]
{INITIATIVE_OBJECT x,y=$x2,$y2}
[/event]
#enddef