-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathash_magic.dm
340 lines (272 loc) · 11.3 KB
/
ash_magic.dm
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
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
/*
ASH PATH SPELLS GO HERE
*/
/datum/action/cooldown/spell/jaunt/ethereal_jaunt/ash
name = "Ashen Passage"
desc = "A short range spell that allows you to pass unimpeded through walls."
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
button_icon = 'icons/mob/actions/actions_ecult.dmi'
button_icon_state = "ash_shift"
sound = null
school = SCHOOL_FORBIDDEN
cooldown_time = 15 SECONDS
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC
exit_jaunt_sound = null
jaunt_duration = 1.5 SECONDS
jaunt_in_time = 0.5 SECONDS
jaunt_out_time = 0.5 SECONDS
jaunt_in_type = /obj/effect/temp_visual/dir_setting/ash_shift
jaunt_out_type = /obj/effect/temp_visual/dir_setting/ash_shift/out
/datum/action/cooldown/spell/jaunt/ethereal_jaunt/ash/do_steam_effects()
return
/datum/action/cooldown/spell/jaunt/ethereal_jaunt/ash/long
name = "Ashen Walk"
desc = "A long range spell that allows you pass unimpeded through multiple walls."
jaunt_duration = 5 SECONDS
/obj/effect/temp_visual/dir_setting/ash_shift
name = "ash_shift"
icon = 'icons/mob/mob.dmi'
icon_state = "ash_shift2"
duration = 0.5 SECONDS
/obj/effect/temp_visual/dir_setting/ash_shift/out
icon_state = "ash_shift"
/datum/action/cooldown/spell/pointed/cleave
name = "Cleave"
desc = "Causes severe bleeding on a target and people around them"
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
button_icon = 'icons/mob/actions/actions_ecult.dmi'
button_icon_state = "cleave"
ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi'
school = SCHOOL_FORBIDDEN
cooldown_time = 35 SECONDS
invocation = "CL'VE"
invocation_type = INVOCATION_WHISPER
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC
cast_range = 4
/// The radius of the cleave effect
var/cleave_radius = 1
/// What type of wound we apply
var/wound_type = /datum/wound/slash/critical/cleave
/datum/action/cooldown/spell/pointed/cleave/is_valid_target(atom/cast_on)
return ..() && ishuman(cast_on)
/datum/action/cooldown/spell/pointed/cleave/cast(mob/living/carbon/human/cast_on)
. = ..()
for(var/mob/living/carbon/human/victim in range(cleave_radius, cast_on))
if(victim == owner || IS_HERETIC(victim) || IS_HERETIC_MONSTER(victim))
continue
if(victim.can_block_magic(antimagic_flags))
victim.visible_message(
span_danger("[victim]'s flashes in a firey glow, but repels the blaze!"),
span_danger("Your body begins to flash a firey glow, but you are protected!!")
)
continue
if(!victim.blood_volume)
continue
victim.visible_message(
span_danger("[victim]'s veins are shredded from within as an unholy blaze erupts from [victim.p_their()] blood!"),
span_danger("Your veins burst from within and unholy flame erupts from your blood!")
)
var/obj/item/bodypart/bodypart = pick(victim.bodyparts)
var/datum/wound/slash/crit_wound = new wound_type()
crit_wound.apply_wound(bodypart)
victim.apply_damage(20, BURN, wound_bonus = CANT_WOUND)
new /obj/effect/temp_visual/cleave(get_turf(victim))
return TRUE
/datum/action/cooldown/spell/pointed/cleave/long
name = "Deeper Cleave"
cooldown_time = 65 SECONDS
// Currently unused - releases streams of fire around the caster.
/datum/action/cooldown/spell/pointed/ash_beams
name = "Nightwatcher's Rite"
desc = "A powerful spell that releases five streams of eldritch fire towards the target."
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
button_icon = 'icons/mob/actions/actions_ecult.dmi'
button_icon_state = "flames"
ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi'
school = SCHOOL_FORBIDDEN
invocation = "F'RE"
invocation_type = INVOCATION_WHISPER
cooldown_time = 30 SECONDS
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC
/// The length of the flame line spit out.
var/flame_line_length = 15
/datum/action/cooldown/spell/pointed/ash_beams/is_valid_target(atom/cast_on)
return TRUE
/datum/action/cooldown/spell/pointed/ash_beams/cast(atom/target)
. = ..()
var/static/list/offsets = list(-25, -10, 0, 10, 25)
for(var/offset in offsets)
INVOKE_ASYNC(src, PROC_REF(fire_line), owner, line_target(offset, flame_line_length, target, owner))
/datum/action/cooldown/spell/pointed/ash_beams/proc/line_target(offset, range, atom/at, atom/user)
if(!at)
return
var/angle = ATAN2(at.x - user.x, at.y - user.y) + offset
var/turf/T = get_turf(user)
for(var/i in 1 to range)
var/turf/check = locate(user.x + cos(angle) * i, user.y + sin(angle) * i, user.z)
if(!check)
break
T = check
return (getline(user, T) - get_turf(user))
/datum/action/cooldown/spell/pointed/ash_beams/proc/fire_line(atom/source, list/turfs)
var/list/hit_list = list()
for(var/turf/T in turfs)
if(istype(T, /turf/closed))
break
for(var/mob/living/L in T.contents)
if(L.can_block_magic())
L.visible_message(span_danger("The fire parts in front of [L]!"),span_danger("As the fire approaches it splits off to avoid contact with you!"))
continue
if(L in hit_list || L == source)
continue
hit_list += L
L.adjustFireLoss(20)
to_chat(L, span_userdanger("You're hit by [source]'s fire blast!"))
new /obj/effect/hotspot(T)
T.hotspot_expose(700,50,1)
// deals damage to mechs
for(var/obj/mecha/M in T.contents)
if(M in hit_list)
continue
hit_list += M
M.take_damage(45, BURN, MELEE, 1)
sleep(0.15 SECONDS)
/// Creates one, large, expanding ring of fire around the caster, which does not follow them.
/datum/action/cooldown/spell/fire_cascade
name = "Lesser Fire Cascade"
desc = "Heats the air around you."
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
button_icon = 'icons/mob/actions/actions_ecult.dmi'
button_icon_state = "fire_ring"
sound = 'sound/items/welder.ogg'
school = SCHOOL_FORBIDDEN
invocation = "C'SC'DE"
invocation_type = INVOCATION_WHISPER
cooldown_time = 30 SECONDS
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC
/// The radius the flames will go around the caster.
var/flame_radius = 4
/datum/action/cooldown/spell/fire_cascade/cast(atom/cast_on)
. = ..()
INVOKE_ASYNC(src, PROC_REF(fire_cascade), get_turf(cast_on), flame_radius)
/// Spreads a huge wave of fire in a radius around us, staggered between levels
/datum/action/cooldown/spell/fire_cascade/proc/fire_cascade(atom/centre, flame_radius = 1)
for(var/i in 0 to flame_radius)
for(var/turf/nearby_turf as anything in spiral_range_turfs(i + 1, centre))
new /obj/effect/hotspot(nearby_turf)
nearby_turf.hotspot_expose(750, 50, 1)
for(var/mob/living/fried_living in nearby_turf.contents - centre)
fried_living.apply_damage(5, BURN)
stoplag(0.3 SECONDS)
/datum/action/cooldown/spell/fire_cascade/big
name = "Greater Fire Cascade"
flame_radius = 6
/// Creates a constant Ring of Fire around the caster for a set duration of time, which follows them.
/datum/action/cooldown/spell/fire_sworn
name = "Oath of Fire"
desc = "Engulf yourself in a cloak of flames for a minute. The flames are harmless to you, but dangerous to anyone else."
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
button_icon = 'icons/mob/actions/actions_ecult.dmi'
button_icon_state = "fire_ring"
school = SCHOOL_FORBIDDEN
cooldown_time = 70 SECONDS
invocation = "FL'MS"
invocation_type = INVOCATION_WHISPER
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC
/// The radius of the fire ring
var/fire_radius = 1
/// How long it the ring lasts
var/duration = 1 MINUTES
/datum/action/cooldown/spell/fire_sworn/Remove(mob/living/remove_from)
remove_from.remove_status_effect(/datum/status_effect/fire_ring)
return ..()
/datum/action/cooldown/spell/fire_sworn/is_valid_target(atom/cast_on)
return isliving(cast_on)
/datum/action/cooldown/spell/fire_sworn/cast(mob/living/cast_on)
. = ..()
cast_on.apply_status_effect(/datum/status_effect/fire_ring, duration, fire_radius)
/// Simple status effect for adding a ring of fire around a mob.
/datum/status_effect/fire_ring
id = "fire_ring"
tick_interval = 0.1 SECONDS
status_type = STATUS_EFFECT_REFRESH
alert_type = null
/// The radius of the ring around us.
var/ring_radius = 1
/datum/status_effect/fire_ring/on_creation(mob/living/new_owner, duration = 1 MINUTES, radius = 1)
src.duration = duration
src.ring_radius = radius
return ..()
/datum/status_effect/fire_ring/tick(delta_time, times_fired)
if(QDELETED(owner) || owner.stat == DEAD)
qdel(src)
return
if(!isturf(owner.loc))
return
for(var/turf/nearby_turf as anything in RANGE_TURFS(1, owner))
new /obj/effect/hotspot(nearby_turf)
nearby_turf.hotspot_expose(750, 25 * delta_time, 1)
for(var/mob/living/fried_living in nearby_turf.contents - owner)
fried_living.apply_damage(2.5 * delta_time, BURN)
/datum/action/cooldown/spell/aoe/fiery_rebirth
name = "Nightwatcher's Rebirth"
desc = "A spell that extinguishes you drains nearby heathens engulfed in flames of their life force, \
healing you for each victim drained. Those in critical condition \
will have the last of their vitality drained, killing them."
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
button_icon = 'icons/mob/actions/actions_ecult.dmi'
button_icon_state = "smoke"
school = SCHOOL_FORBIDDEN
cooldown_time = 1 MINUTES
invocation = "GL'RY T' TH' N'GHT'W'TCH'ER"
invocation_type = INVOCATION_WHISPER
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC
/datum/action/cooldown/spell/aoe/fiery_rebirth/cast(mob/living/carbon/human/cast_on)
cast_on.extinguish_mob()
return ..()
/datum/action/cooldown/spell/aoe/fiery_rebirth/get_things_to_cast_on(atom/center)
var/list/things = list()
for(var/mob/living/carbon/nearby_mob in range(aoe_radius, center))
if(nearby_mob == owner || nearby_mob == center)
continue
if(!nearby_mob.mind || !nearby_mob.client)
continue
if(IS_HERETIC(nearby_mob) || IS_HERETIC_MONSTER(nearby_mob))
continue
if(nearby_mob.stat == DEAD || !nearby_mob.on_fire)
continue
things += nearby_mob
return things
/datum/action/cooldown/spell/aoe/fiery_rebirth/cast_on_thing_in_aoe(mob/living/carbon/victim, mob/living/carbon/human/caster)
new /obj/effect/temp_visual/eldritch_smoke(victim.drop_location())
//This is essentially a death mark, use this to finish your opponent quicker.
if(victim.stat == UNCONSCIOUS && !HAS_TRAIT(victim, TRAIT_NODEATH))
victim.death()
victim.apply_damage(20, BURN)
// Heal the caster for every victim damaged
caster.adjustBruteLoss(-10, FALSE)
caster.adjustFireLoss(-10, FALSE)
caster.adjustToxLoss(-10, FALSE)
caster.adjustOxyLoss(-10, FALSE)
caster.adjustStaminaLoss(-10)
/datum/action/cooldown/spell/pointed/projectile/fireball/eldritch
name = "Volcano Blast"
desc = "Fire a ball of raw volcanic magma at a target."
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
sound = 'sound/magic/fireball.ogg'
active_msg = "You prepare to cast your fireball spell!"
deactive_msg = "You extinguish your fireball... for now."
cast_range = 8
projectile_type = /obj/projectile/magic/fireball/eldritch
school = SCHOOL_FORBIDDEN
cooldown_time = 25 SECONDS
invocation = "FIR'AGA!"
invocation_type = INVOCATION_SHOUT
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC