Commit ebea21b
committed
added modifier collections
in the general config, you can define a set of modifiers like this
general:
modifiers:
modifier_name:
checks:
- condition condition_var action action_var
- condition condition_var action action_var
pass-condition: a string value that can be one of the following ANY, ALL
You can also define some in the spell*.yml files as follows
modifiers:
modifier_name:
checks:
- condition condition_var action action_var
- condition condition_var action action_var
pass-condition: a string value that can be one of the following ANY, ALL
to reference the modifier collection, you just slip this into your modifiers listed on a spell
- collection <modifier_name> action action_var
where <modifier_name> is the name that you assigned to the modifier collection as shown above
Just a heads up that for the modifier actions inside this, I recommend that you use stop rather than denied most of the time, because the denied action will actually cancel the event being processed whereas the stop action will just say that this specific check counts as a fail.1 parent ea931e0 commit ebea21b
File tree
6 files changed
+326
-7
lines changed- src/com/nisovin/magicspells
- castmodifiers
- conditions
- util
6 files changed
+326
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| |||
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
200 | | - | |
| 202 | + | |
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
| |||
1233 | 1235 | | |
1234 | 1236 | | |
1235 | 1237 | | |
| 1238 | + | |
| 1239 | + | |
1236 | 1240 | | |
1237 | 1241 | | |
1238 | 1242 | | |
| |||
1259 | 1263 | | |
1260 | 1264 | | |
1261 | 1265 | | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
1262 | 1270 | | |
1263 | 1271 | | |
1264 | 1272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
81 | 89 | | |
| 90 | + | |
82 | 91 | | |
83 | 92 | | |
84 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
85 | 99 | | |
86 | 100 | | |
87 | 101 | | |
| |||
120 | 134 | | |
121 | 135 | | |
122 | 136 | | |
| 137 | + | |
123 | 138 | | |
124 | 139 | | |
125 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
126 | 146 | | |
127 | 147 | | |
128 | 148 | | |
| |||
154 | 174 | | |
155 | 175 | | |
156 | 176 | | |
| 177 | + | |
157 | 178 | | |
158 | 179 | | |
159 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
160 | 188 | | |
161 | 189 | | |
162 | 190 | | |
| |||
190 | 218 | | |
191 | 219 | | |
192 | 220 | | |
| 221 | + | |
193 | 222 | | |
194 | 223 | | |
195 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
196 | 230 | | |
197 | 231 | | |
198 | 232 | | |
| |||
216 | 250 | | |
217 | 251 | | |
218 | 252 | | |
| 253 | + | |
219 | 254 | | |
220 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
221 | 261 | | |
222 | 262 | | |
223 | 263 | | |
| |||
243 | 283 | | |
244 | 284 | | |
245 | 285 | | |
| 286 | + | |
246 | 287 | | |
247 | 288 | | |
248 | 289 | | |
| |||
0 commit comments