Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Recoup] Genetics Cluwnes now have cures. #11904

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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 change: 1 addition & 0 deletions code/__DEFINES/DNA.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#define GELADIKINESIS /datum/mutation/geladikinesis
#define CRYOKINESIS /datum/mutation/cryokinesis
#define CLUWNEMUT /datum/mutation/cluwne
#define CURSEDCLUWNEMUT /datum/mutation/cluwne/cursed
#define WAXSALIVA /datum/mutation/wax_saliva
#define STRONGWINGS /datum/mutation/strongwings
#define CATCLAWS /datum/mutation/catclaws
Expand Down
63 changes: 37 additions & 26 deletions code/datums/mutations/cluwne.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
desc = "Turns a person into a Cluwne, a poor soul cursed to a short and miserable life by the honkmother."
quality = NEGATIVE
locked = TRUE
mutadone_proof = TRUE
var/list/datum/weakref/clothing_weakrefs = list()

/datum/mutation/cluwne/on_acquiring(mob/living/carbon/owner)
if(..())
Expand All @@ -13,29 +15,18 @@

playsound(owner.loc, 'sound/misc/bikehorn_creepy.ogg', vol = 50, vary = TRUE)
owner.equip_to_slot_or_del(new /obj/item/storage/backpack/clown(owner), ITEM_SLOT_BACK) // this is purely for cosmetic purposes incase they aren't wearing anything in that slot
if(!istype(owner.wear_mask, /obj/item/clothing/mask/cluwne))
if(!owner.doUnEquip(owner.wear_mask))
qdel(owner.wear_mask)
owner.equip_to_slot_or_del(new /obj/item/clothing/mask/cluwne(owner), ITEM_SLOT_MASK)

if(ishuman(owner))
var/mob/living/carbon/human/H = owner
if(!istype(H.w_uniform, /obj/item/clothing/under/cluwne))
if(!H.doUnEquip(H.w_uniform))
qdel(H.w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/under/cluwne(H), ITEM_SLOT_ICLOTHING)
if(!istype(H.shoes, /obj/item/clothing/shoes/cluwne))
if(!H.doUnEquip(H.shoes))
qdel(H.shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/cluwne(H), ITEM_SLOT_FEET)
owner.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/white(owner), ITEM_SLOT_GLOVES) // ditto
equip_cursed_clothing(/obj/item/clothing/mask/cluwne, ITEM_SLOT_MASK)
equip_cursed_clothing(/obj/item/clothing/under/cluwne, ITEM_SLOT_ICLOTHING)
equip_cursed_clothing(/obj/item/clothing/shoes/cluwne, ITEM_SLOT_FEET)
equip_cursed_clothing(/obj/item/clothing/gloves/color/white, ITEM_SLOT_GLOVES)
owner.regenerate_icons()

/datum/mutation/cluwne/on_life()
if(prob(15) && owner.IsUnconscious())
owner.setOrganLoss(ORGAN_SLOT_BRAIN, 199)
switch(rand(1, 6))
if(1)
owner.say("HONK")
owner.say("HONK", forced = "cluwne")
if(2 to 5)
owner.emote("scream")
if(6)
Expand All @@ -44,17 +35,37 @@
owner.Jitter(500)

/datum/mutation/cluwne/on_losing(mob/living/carbon/owner)
owner.adjust_fire_stacks(1)
owner.IgniteMob()
owner.dna.add_mutation(CLUWNEMUT)
owner.emote("scream")
owner.visible_message("<span class='warning'><span class='name'>[owner]</span> faints as [owner.p_their()] cursed cluwne clothing melts away!</span>")
owner.Unconscious(rand(45 SECONDS, 70 SECONDS))
owner.dna.remove_mutation(CLOWNMUT)
owner.dna.remove_mutation(EPILEPSY)
for(var/datum/weakref/clothing_weakref in clothing_weakrefs)
var/obj/item/clothing/clothing = clothing_weakref.resolve()
if(QDELETED(clothing))
continue
if(!owner.doUnEquip(clothing, force = TRUE, silent = TRUE))
qdel(clothing)
clothing_weakrefs.Cut()

/datum/mutation/cluwne/proc/equip_cursed_clothing(type, slot)
var/obj/item/clothing/original_clothing = owner.get_item_by_slot(slot)
if(istype(original_clothing, type))
return
if(!QDELETED(original_clothing) && !owner.doUnEquip(original_clothing, silent = TRUE))
qdel(original_clothing)
var/obj/item/clothing/cursed_clothing = new type(owner)
if(owner.equip_to_slot_or_del(cursed_clothing, slot))
clothing_weakrefs += WEAKREF(cursed_clothing)

/mob/living/carbon/proc/cluwneify()
dna.add_mutation(CLUWNEMUT)
/mob/living/carbon/proc/cluwneify(cursed = FALSE)
dna.add_mutation(cursed ? CURSEDCLUWNEMUT : CLUWNEMUT)
emote("scream")
regenerate_icons()
visible_message("<span class='danger'>[src]'s body glows green, the glow dissipating only to leave behind a cluwne formerly known as [src]!</span>", \
visible_message("<span class='danger'><span class='name'>[src]'s</span> body glows green, the glow dissipating only to leave behind a cluwne formerly known as <span class='name'>[src]</span>!</span>", \
"<span class='danger'>Your brain feels like it's being torn apart, there is only the honkmother now.</span>")
flash_act()
flash_act(override_blindness_check = TRUE)
client?.give_award(/datum/award/achievement/misc/cluwne, src)

if (client)
client.give_award(/datum/award/achievement/misc/cluwne, src)
/datum/mutation/cluwne/cursed
scrambled = TRUE
14 changes: 12 additions & 2 deletions code/game/objects/items/dna_injector.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,22 @@
/obj/item/dnainjector/cluwnemut
name = "\improper DNA injector (Cluwneify)"
desc = "This is your last chance to turn back."
add_mutations = list(CLOWNMUT)
add_mutations = list(CLUWNEMUT)

/obj/item/dnainjector/anticluwne
name = "\improper DNA injector (Anti-Cluwne)"
desc = "This is going to hurt."
remove_mutations = list(CLUWNEMUT)

/obj/item/dnainjector/cursedcluwnemut
name = "\improper DNA injector (Cluwneify)"
desc = "This is your last chance to turn back."
add_mutations = list(CURSEDCLUWNEMUT)

/obj/item/dnainjector/anticursedcluwne
name = "\improper DNA injector (Anti-Cluwne)"
desc = "This isn't going to work."
remove_mutations = list(CLOWNMUT)
remove_mutations = list(CURSEDCLUWNEMUT)

/obj/item/dnainjector/antitour
name = "\improper DNA injector (Anti-Tour.)"
Expand Down
Loading