Files
Paradise/code/datums/spells/horsemask.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

42 lines
1.8 KiB
Plaintext

/obj/effect/proc_holder/spell/horsemask
name = "Curse of the Horseman"
desc = "This spell triggers a curse on a target, causing them to wield an unremovable horse head mask. They will speak like a horse! Any masks they are wearing will be disintegrated. This spell does not require robes."
school = "transmutation"
base_cooldown = 150
clothes_req = FALSE
stat_allowed = CONSCIOUS
invocation = "KN'A FTAGHU, PUCK 'BTHNK!"
invocation_type = "shout"
cooldown_min = 30 //30 deciseconds reduction per rank
selection_activated_message = "<span class='notice'>You start to quietly neigh an incantation. Click on or near a target to cast the spell.</span>"
selection_deactivated_message = "<span class='notice'>You stop neighing to yourself.</span>"
action_icon_state = "barn"
sound = 'sound/magic/HorseHead_curse.ogg'
/obj/effect/proc_holder/spell/horsemask/create_new_targeting()
var/datum/spell_targeting/click/T = new()
T.selection_type = SPELL_SELECTION_RANGE
return T
/obj/effect/proc_holder/spell/horsemask/cast(list/targets, mob/user = usr)
if(!targets.len)
to_chat(user, "<span class='notice'>No target found in range.</span>")
return
var/mob/living/carbon/human/target = targets[1]
var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead
magichead.flags |= NODROP | DROPDEL //curses!
magichead.flags_inv = null //so you can still see their face
magichead.voicechange = TRUE //NEEEEIIGHH
target.visible_message( "<span class='danger'>[target]'s face lights up in fire, and after the event a horse's head takes its place!</span>", \
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a horse!</span>")
if(!target.unEquip(target.wear_mask))
qdel(target.wear_mask)
target.equip_to_slot_if_possible(magichead, slot_wear_mask, TRUE, TRUE)
target.flash_eyes()