Files
Paradise/code/datums/spells/cluwne.dm
Fox McCloud 70b46d8aea Life refactor (#13471)
* Life Refactor WIP

* part 2

* part 3

* runtime fix

* newlines

* tweaks

* perspective checks

* fixes

* remote view tweaks

* more fixes

* robot fixes

* better updating

* cleaned up icon procs

* less proc call overhead

* performance gains

* more optimization

* shorter lists, removal of unecesary code

* gene OOP and dna styling cleanup

* oops

* axe disabilities

* typeless loop

* various tweaks and fixes

* brain checks

* runtime fixes

* cryo vision fixes
2020-06-03 19:43:30 -06:00

88 lines
2.9 KiB
Plaintext

/obj/effect/proc_holder/spell/targeted/touch/cluwne
name = "Curse of the Cluwne"
desc = "Turns the target into a fat and cursed monstrosity of a clown."
hand_path = /obj/item/melee/touch_attack/cluwne
school = "transmutation"
charge_max = 600
clothes_req = 1
cooldown_min = 200 //100 deciseconds reduction per rank
action_icon_state = "clown"
/mob/living/carbon/human/proc/makeCluwne()
to_chat(src, "<span class='danger'>You feel funny.</span>")
if(!get_int_organ(/obj/item/organ/internal/brain/cluwne))
var/obj/item/organ/internal/brain/cluwne/idiot_brain = new
idiot_brain.insert(src, make_cluwne = 0)
idiot_brain.dna = dna.Clone()
setBrainLoss(80, use_brain_mod = FALSE)
set_nutrition(9000)
overeatduration = 9000
Confused(30)
if(mind)
mind.assigned_role = "Cluwne"
var/obj/item/organ/internal/honktumor/cursed/tumor = new
tumor.insert(src)
mutations.Add(NERVOUS)
dna.SetSEState(GLOB.nervousblock, 1, 1)
genemutcheck(src, GLOB.nervousblock, null, MUTCHK_FORCED)
rename_character(real_name, "cluwne")
unEquip(w_uniform, 1)
unEquip(shoes, 1)
unEquip(gloves, 1)
if(!istype(wear_mask, /obj/item/clothing/mask/cursedclown)) //Infinite loops otherwise
unEquip(wear_mask, 1)
equip_to_slot_if_possible(new /obj/item/clothing/under/cursedclown, slot_w_uniform, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/gloves/cursedclown, slot_gloves, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/mask/cursedclown, slot_wear_mask, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/cursedclown, slot_shoes, TRUE, TRUE)
/mob/living/carbon/human/proc/makeAntiCluwne()
to_chat(src, "<span class='danger'>You don't feel very funny.</span>")
adjustBrainLoss(-120)
set_nutrition(NUTRITION_LEVEL_STARVING)
overeatduration = 0
SetConfused(0)
SetJitter(0)
if(mind)
mind.assigned_role = "Lawyer"
var/obj/item/organ/internal/honktumor/cursed/tumor = get_int_organ(/obj/item/organ/internal/honktumor/cursed)
if(tumor)
tumor.remove(src)
else
mutations.Remove(CLUMSY)
mutations.Remove(GLOB.comicblock)
dna.SetSEState(GLOB.clumsyblock,0)
dna.SetSEState(GLOB.comicblock,0)
genemutcheck(src, GLOB.clumsyblock, null, MUTCHK_FORCED)
genemutcheck(src, GLOB.comicblock, null, MUTCHK_FORCED)
mutations.Remove(NERVOUS)
dna.SetSEState(GLOB.nervousblock, 0)
genemutcheck(src, GLOB.nervousblock, null, MUTCHK_FORCED)
var/obj/item/clothing/under/U = w_uniform
unEquip(w_uniform, 1)
if(U)
qdel(U)
var/obj/item/clothing/shoes/S = shoes
unEquip(shoes, 1)
if(S)
qdel(S)
if(istype(wear_mask, /obj/item/clothing/mask/cursedclown))
unEquip(wear_mask, 1)
if(istype(gloves, /obj/item/clothing/gloves/cursedclown))
var/obj/item/clothing/gloves/G = gloves
unEquip(gloves, 1)
qdel(G)
equip_to_slot_if_possible(new /obj/item/clothing/under/lawyer/black, slot_w_uniform, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/black, slot_shoes, TRUE, TRUE)