Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,172 changes: 0 additions & 1,172 deletions code/modules/antagonists/eldritch_cult/eldritch_magic.dm

This file was deleted.

340 changes: 340 additions & 0 deletions code/modules/antagonists/eldritch_cult/magic/ash_magic.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,340 @@
/*

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

exit_jaunt_sound = null
jaunt_duration = 1.1 SECONDS
jaunt_in_time = 1.3 SECONDS
jaunt_out_time = 0.6 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 = 1.3 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

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

/// 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

/// 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

/// 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

/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

Loading