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

64 lines
2.8 KiB
Plaintext

/obj/effect/proc_holder/spell/touch/banana
name = "Banana Touch"
desc = "A spell popular at wizard birthday parties, this spell will put on a clown costume on the target, \
stun them with a loud HONK, and mutate them to make them more entertaining! \
Warning : Effects are permanent on non-wizards."
hand_path = /obj/item/melee/touch_attack/banana
school = "transmutation"
base_cooldown = 30 SECONDS
clothes_req = TRUE
cooldown_min = 100 //50 deciseconds reduction per rank
action_icon_state = "clown"
/obj/item/melee/touch_attack/banana
name = "banana touch"
desc = "It's time to start clowning around."
catchphrase = "NWOLC YRGNA"
on_use_sound = 'sound/items/AirHorn.ogg'
icon_state = "banana_touch"
item_state = "banana_touch"
/obj/item/melee/touch_attack/banana/afterattack(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
var/datum/effect_system/smoke_spread/s = new
s.set_up(5, 0, target)
s.start()
to_chat(user, "<font color='red' size='6'>HONK</font>")
var/mob/living/carbon/human/H = target
H.bananatouched()
..()
/mob/living/carbon/human/proc/bananatouched()
to_chat(src, "<font color='red' size='6'>HONK</font>")
Weaken(14 SECONDS)
Stuttering(30 SECONDS)
do_jitter_animation(30 SECONDS)
if(iswizard(src) || (mind && mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE)) //Wizards get non-cursed clown robes and magical mask.
unEquip(shoes, TRUE)
unEquip(wear_mask, TRUE)
unEquip(head, TRUE)
unEquip(wear_suit, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/head/wizard/clown, slot_head, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/suit/wizrobe/clown, slot_wear_suit, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/clown_shoes/magical, slot_shoes, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/mask/gas/clownwiz, slot_wear_mask, TRUE, TRUE)
else
qdel(shoes)
qdel(wear_mask)
qdel(w_uniform)
equip_to_slot_if_possible(new /obj/item/clothing/under/rank/clown/nodrop, slot_w_uniform, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/clown_shoes/nodrop, slot_shoes, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/mask/gas/clown_hat/nodrop, slot_wear_mask, TRUE, TRUE)
dna.SetSEState(GLOB.clumsyblock, TRUE, TRUE)
dna.SetSEState(GLOB.comicblock, TRUE, TRUE)
singlemutcheck(src, GLOB.clumsyblock, MUTCHK_FORCED)
singlemutcheck(src, GLOB.comicblock, MUTCHK_FORCED)
if(!(iswizard(src) || (mind && mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE))) //Mutations are permanent on non-wizards. Can still be removed by genetics fuckery but not mutadone.
dna.default_blocks.Add(GLOB.clumsyblock)
dna.default_blocks.Add(GLOB.comicblock)