-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy paththex_ammo_effects.json
305 lines (302 loc) · 10.2 KB
/
thex_ammo_effects.json
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
[
{
"id": "473x33_TEST",
"type": "ammo_effect",
"//spell_data": { "id": "473x33_TEST_spell" },
"//always_cast_spell": true,
"//": "This works as intended: bullet + spell dmg x2. Do not test this with the debug monster! It works properly with default zombies and deals the expected dmg",
"//0.H": "Fields spell_data and always_cast_spell "
},
{
"id": "473x33_TEST_spell",
"type": "SPELL",
"name": { "str": "" },
"description": "",
"spell_class": "NONE",
"valid_targets": [ "ally", "hostile" ],
"effect": "attack",
"extra_effects": [ { "id": "473x33_TEST_spell2" } ],
"shape": "blast",
"damage_type": "bullet",
"min_damage": 20,
"max_damage": 20,
"max_level": 1,
"difficulty": -50,
"message": "",
"flags": [ "NO_FAIL" ]
},
{
"id": "473x33_TEST_spell2",
"type": "SPELL",
"name": { "str": "" },
"description": "",
"spell_class": "NONE",
"valid_targets": [ "ally", "hostile" ],
"effect": "attack",
"shape": "blast",
"damage_type": "bullet",
"min_damage": 20,
"max_damage": 20,
"max_level": 1,
"difficulty": -50,
"message": "",
"flags": [ "NO_FAIL" ]
},
{
"id": "impurity_ammo_effect",
"type": "ammo_effect",
"//eoc": [ "impurity_ammo_eoc" ],
"//0.H": ""
},
{
"id": "impurity_ammo_eoc",
"type": "effect_on_condition",
"condition": "has_beta",
"effect": [
{
"run_eocs": [
{
"id": "impurity_ammo_character_eoc",
"condition": "npc_is_character",
"effect": [ { "math": [ "n_vitamin('impurity')", "+=", "25 + rand(25)" ] } ]
},
{
"id": "impurity_ammo_monster_eoc",
"condition": "npc_is_monster",
"effect": [
{
"if": { "math": [ "rand(2)", "==", "0" ] },
"then": [ { "math": [ "n_var_impurity", "+=", "1" ] } ]
}
]
}
]
}
],
"//": "When creatures are hit by ammo, they run this EOC as n_ , and add impurity to themselves",
"//2": "This was tested with a debug monster eating being shot until it had a nice amount of impurity, then spawning a mon_impurity_mine dealing x100 times its current dmg, and checking the debug monster's HP",
"//3": "The condition is required as the ammo procs the eoc even if hitting ground, which causes a warning"
},
{
"id": "lunar_bousan_eoc",
"type": "effect_on_condition",
"condition": { "math": [ "var_bousan_pump", "<", "3" ] },
"effect": [
{ "math": [ "var_bousan_pump", "+=", "1" ] },
{ "u_message": "You pump the Bousan." }
],
"false_effect": [
{ "math": [ "var_bousan_pump", "=", "0" ] },
{ "u_message": "The vacuum defaults to atmospheric pressure.", "type": "mixed" }
],
"//WIP": "This has to be item-specific",
"//0.H": "Removed turn_cost as it requires #70791 "
},
{
"id": "ammo_lunar_bousan_effect",
"type": "ammo_effect",
"aoe": {
"field_type": "fd_thex_dummy",
"intensity_min": 1,
"intensity_max": 1,
"radius": 0,
"radius_z": 0,
"chance": 100,
"size": 0,
"check_passable": false,
"check_sees": true,
"check_sees_radius": 0
},
"//eoc": [ "ammo_lunar_bousan_eoc" ],
"//0.H": ""
},
{
"id": "ammo_lunar_bousan_eoc",
"type": "effect_on_condition",
"effect": [
{ "math": [ "var_lunar_bousan_distance", "=", "( distance('u', ammo_lunar_bousan_loc) )"] }
],
"//": "This set ups the dummy field (to mark where the character shooted the weapon), the distance to the target (used in spells), and tries to remove the dummy field",
"//2": "If the field is removed, the checks below are done to do different effects, according to the shooting mode",
"//0.H": "Removed u_location_variable line as it relies on detecting field , which wasn't backported",
"//0.H2": "Removed the if-then chunk as it has relies on map_field_id , which wasn't backported"
},
{
"id": "ammo_lunar_bousan_check_1_eoc",
"type": "effect_on_condition",
"condition": { "u_has_wielded_with_flag": "BOUSAN_BLAST_FLAG" },
"effect": [
{ "math": [ "var_bousan_pump", "=", "0" ] },
{ "u_cast_spell": { "id": "ammo_lunar_bousan_blast" }, "loc": { "global_val": "ammo_lunar_bousan_loc" } }
],
"false_effect": [ { "run_eocs": [ "ammo_lunar_bousan_check_2_eoc" ] } ]
},
{
"id": "ammo_lunar_bousan_blast",
"type": "SPELL",
"name": { "str": "Bousan BLAST (dmg)" },
"description": "",
"spell_class": "NONE",
"teachable": false,
"valid_targets": [ "ally", "ground", "hostile" ],
"effect": "attack",
"extra_effects": [ { "id": "ammo_lunar_bousan_blast2" }, { "id": "ammo_lunar_bousan_blast_stun" } ],
"shape": "cone",
"damage_type": "bash",
"min_damage": { "math": [ "( 20 + ( var_bousan_pump * 15 ) )" ] },
"max_damage": { "math": [ "( 30 + ( var_bousan_pump * 25 ) )" ] },
"min_range": 7,
"max_range": 7,
"min_aoe": 45,
"max_aoe": 45,
"difficulty": -50,
"message": "",
"max_level": 1,
"flags": [ "NO_FAIL", "NO_HANDS", "NO_LEGS", "RANDOM_DAMAGE", "SILENT" ],
"//": "min dmg (20 - 65), max dmg (30 - 105)",
"//2": "+1 range as qol"
},
{
"id": "ammo_lunar_bousan_blast2",
"type": "SPELL",
"name": { "str": "Bousan BLAST (bash)" },
"description": "",
"spell_class": "NONE",
"valid_targets": [ "ground", "item" ],
"effect": "bash",
"shape": "cone",
"damage_type": "bash",
"min_damage": { "math": [ "( 120 + ( var_bousan_pump * 60 ) )" ] },
"max_damage": { "math": [ "( 180 + ( var_bousan_pump * 100 ) )" ] },
"min_range": 7,
"max_range": 7,
"min_aoe": 45,
"max_aoe": 45,
"max_level": 1,
"difficulty": -50,
"message": "",
"flags": [ "IGNORE_WALLS", "NO_EXPLOSION_SFX", "NO_LEGS", "RANDOM_DAMAGE", "SILENT" ],
"//": "min bash (120 - 300), max dmg (180 - 480)",
"//2": "+1 range as qol"
},
{
"id": "ammo_lunar_bousan_blast_stun",
"type": "SPELL",
"name": { "str": "Bousan BLAST (stun)" },
"description": "",
"spell_class": "NONE",
"valid_targets": [ "ally", "hostile", "ground", "item" ],
"effect": "mod_moves",
"extra_effects": [ { "id": "ammo_lunar_bousan_blast_knockback" } ],
"shape": "cone",
"damage_type": "pure",
"min_damage": -100,
"max_damage": -100,
"min_range": 7,
"max_range": 7,
"min_aoe": 45,
"max_aoe": 45,
"max_level": 1,
"difficulty": -50,
"message": "",
"flags": [ "NO_EXPLOSION_SFX", "NO_FAIL", "NO_HANDS", "NO_LEGS", "SILENT" ],
"//": "+1 range as qol"
},
{
"id": "ammo_lunar_bousan_blast_knockback",
"type": "SPELL",
"name": { "str": "Bousan BLAST (knockback)" },
"description": "",
"spell_class": "NONE",
"valid_targets": [ "ally", "hostile", "ground", "item" ],
"effect": "directed_push",
"shape": "blast",
"damage_type": "bash",
"min_damage": { "math": [ "( (-0.4) * var_lunar_bousan_distance ) + 4.4 " ] },
"max_damage": { "math": [ "( (-0.4) * var_lunar_bousan_distance ) + 4.4 " ] },
"min_range": 6,
"max_range": 6,
"max_level": 1,
"difficulty": -50,
"message": "",
"flags": [ "NO_EXPLOSION_SFX", "NO_FAIL", "NO_HANDS", "NO_LEGS", "NO_PROJECTILE", "SILENT" ],
"//": "Knockback goes from 4 - 2, decaying with distance"
},
{
"id": "ammo_lunar_bousan_check_2_eoc",
"type": "effect_on_condition",
"condition": { "u_has_wielded_with_flag": "BOUSAN_PROJ_FLAG" },
"effect": [
{ "math": [ "var_bousan_pump", "=", "0" ] },
{ "u_cast_spell": { "id": "ammo_lunar_bousan_proj" }, "loc": { "global_val": "ammo_lunar_bousan_loc" } }
]
},
{
"id": "ammo_lunar_bousan_proj",
"type": "SPELL",
"name": { "str": "Bousan shot (dmg)" },
"description": "",
"spell_class": "NONE",
"teachable": false,
"valid_targets": [ "ally", "ground", "hostile" ],
"effect": "attack",
"extra_effects": [ { "id": "ammo_lunar_bousan_proj_stun" } ],
"shape": "cone",
"damage_type": "bash",
"min_damage": { "math": [ "( (-14) * max( 5, var_lunar_bousan_distance ) + 300 ) * 0.95 " ] },
"max_damage": { "math": [ "( (-14) * max( 5, var_lunar_bousan_distance ) + 300 ) * 1.05 " ] },
"min_range": { "math": [ "( var_lunar_bousan_distance )" ] },
"max_range": { "math": [ "( var_lunar_bousan_distance )" ] },
"min_aoe": 20,
"max_aoe": 20,
"difficulty": -50,
"message": "",
"max_level": 1,
"flags": [ "NO_EXPLOSION_SFX", "NO_FAIL", "NO_HANDS", "NO_LEGS", "RANDOM_DAMAGE", "SILENT" ],
"//": "max dmg is calculated around the (intended) 20 dmg * 13 pellet = 230 at close enough distance",
"//2": "It decays with distance beyond 5 tiles away"
},
{
"id": "ammo_lunar_bousan_proj_stun",
"type": "SPELL",
"name": { "str": "Bousan shot (stun)" },
"description": "",
"spell_class": "NONE",
"valid_targets": [ "ally", "hostile", "ground", "item" ],
"effect": "mod_moves",
"extra_effects": [ { "id": "ammo_lunar_bousan_proj_knockback" } ],
"shape": "cone",
"damage_type": "pure",
"min_damage": -100,
"max_damage": -100,
"min_range": 5,
"max_range": 5,
"min_aoe": 20,
"max_aoe": 20,
"max_level": 1,
"difficulty": -50,
"message": "",
"flags": [ "NO_EXPLOSION_SFX", "NO_FAIL", "NO_HANDS", "NO_LEGS", "SILENT" ],
"//": "Reduced range relative to shooting it in blast mode"
},
{
"id": "ammo_lunar_bousan_proj_knockback",
"type": "SPELL",
"name": { "str": "Bousan shot (knockback)" },
"description": "",
"spell_class": "NONE",
"valid_targets": [ "ally", "hostile", "ground", "item" ],
"effect": "directed_push",
"shape": "blast",
"damage_type": "bash",
"min_damage": { "math": [ "( (-0.5) * var_lunar_bousan_distance ) + 3.5 " ] },
"max_damage": { "math": [ "( (-0.5) * var_lunar_bousan_distance ) + 3.5 " ] },
"min_range": 5,
"max_range": 5,
"max_level": 1,
"difficulty": -50,
"message": "",
"flags": [ "NO_EXPLOSION_SFX", "NO_FAIL", "NO_HANDS", "NO_LEGS", "NO_PROJECTILE", "SILENT" ],
"//": "Knockback goes from 4 - 2, decaying with distance. Reduced knockback relative to shooting it in blast mode"
}
]