Files
Paradise/code/modules/mob/dead/observer/spells.dm
Charlie ded049a902 Spell cooldown refactor (#18327)
* Squashed commit of the following:

commit 979fe5287c3dd33cd5d69bdd968beae245984f2e
Author: hal9000PR <charliesteeples@outlook.com>
Date:   Sat Jul 9 23:40:53 2022 +0100

    guts the old system

* refactors spell cooldowns into a handler

* charge datum

* garbage collection

* cleanup, renames cooldown var

* review changes

* boo cooldown fix

* styling

Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>

Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>
2022-07-23 00:00:42 +02:00

50 lines
1.6 KiB
Plaintext

GLOBAL_LIST_INIT(boo_phrases, list(
"You feel a chill run down your spine.",
"You think you see a figure in your peripheral vision.",
"What was that?",
"The hairs stand up on the back of your neck.",
"You are filled with a great sadness.",
"Something doesn't feel right...",
"You feel a presence in the room.",
"It feels like someone's standing behind you.",
))
/obj/effect/proc_holder/spell/boo
name = "Boo!"
desc = "Fuck with the living."
selection_deactivated_message = "<span class='notice'>Your presence will not be known. For now.</span>"
selection_activated_message = "<span class='notice'>You prepare to reach across the veil. <b>Left-click to influence a target!</b></span>"
ghost = TRUE
action_icon_state = "boo"
school = "transmutation"
base_cooldown = 2 MINUTES
starts_charged = FALSE
clothes_req = FALSE
stat_allowed = UNCONSCIOUS
invocation = ""
invocation_type = "none"
// no need to spam admins regarding boo casts
create_attack_logs = FALSE
/obj/effect/proc_holder/spell/boo/create_new_targeting()
var/datum/spell_targeting/click/T = new()
T.allowed_type = /atom
T.try_auto_target = FALSE
return T
/obj/effect/proc_holder/spell/boo/cast(list/targets, mob/user = usr)
var/atom/target = targets[1]
ASSERT(istype(target))
if(target.get_spooked())
var/area/spook_zone = get_area(target)
if (spook_zone.is_haunted == TRUE)
to_chat(usr, "<span class='notice'>The veil is weak in [spook_zone], it took less effort to influence [target].</span>")
cooldown_handler.start_recharge(cooldown_handler.recharge_duration / 2)
return
cooldown_handler.start_recharge(cooldown_handler.recharge_duration * 0.1)