diff --git a/code/modules/events/holiday/halloween.dm b/code/modules/events/holiday/halloween.dm index c0143fe5ee6..8930c93bf5f 100644 --- a/code/modules/events/holiday/halloween.dm +++ b/code/modules/events/holiday/halloween.dm @@ -54,6 +54,50 @@ if(IsMultiple(activeFor, 4)) spawn_meteors(3, meteorsSPOOKY) //meteor list types defined in gamemode/meteor/meteors.dm +//Creepy clown invasion +/datum/round_event_control/creepy_clowns + name = "Clowns" + typepath = /datum/round_event/creepy_clowns + holidayID = HALLOWEEN + weight = 20 + earliest_start = 0 + +/datum/round_event/creepy_clowns + endWhen = 40 + +/datum/round_event/creepy_clowns/start() + for(var/mob/living/carbon/human/H in living_mob_list) + if(!H.client || !istype(H)) + return + H << "Honk..." + H << 'sound/spookoween/scary_clown_appear.ogg' + var/turf/T = get_turf(H) + if(T) + new /obj/effect/hallucination/simple/clown(T, H, 50) + +/datum/round_event/creepy_clowns/tick() + if(IsMultiple(activeFor, 4)) + for(var/mob/living/carbon/human/H in living_mob_list) + if (prob(66)) + playsound(H.loc, pick('sound/spookoween/scary_horn.ogg','sound/spookoween/scary_horn2.ogg', 'sound/spookoween/scary_horn3.ogg'), 100, 1) + if (prob(33)) + var/turf/T = get_turf(H) + if(T) + new /obj/effect/hallucination/simple/clown(T, H, 25) + else if (prob(25)) + var/turf/T = get_turf(H) + if(T) + new /obj/effect/hallucination/simple/clown/scary(T, H, 25) + else if (prob(5)) + var/turf/T = get_turf(H) + if(T) + spawn_atom_to_turf(/obj/effect/mob_spawn/human/corpse/clown, H, 1) + else if (prob(1)) + spawn_atom_to_turf(/mob/living/simple_animal/hostile/retaliate/clown, H, 1) + +/datum/round_event/creepy_clowns/announce() + priority_announce("Honk... Honk... honk... HONK! HONK! HONKHONKHONKHONKHONK", "HONK!", 'sound/spookoween/scary_horn.ogg') + //spooky foods (you can't actually make these when it's not halloween) /obj/item/weapon/reagent_containers/food/snacks/sugarcookie/spookyskull name = "skull cookie" diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index c14da947741..cdcb8983ef1 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -206,6 +206,18 @@ Gunshots/explosions/opening doors/less rare audio (done) target << "[xeno_name] scrambles into the ventilation ducts!" qdel(src) +/obj/effect/hallucination/simple/clown + image_icon = 'icons/mob/animal.dmi' + image_state = "clown" + +/obj/effect/hallucination/simple/clown/New(loc,var/mob/living/carbon/T,duration) + ..(loc, T) + name = pick(clown_names) + QDEL_IN(src,duration) + +/obj/effect/hallucination/simple/clown/scary + image_state = "scary_clown" + /obj/effect/hallucination/singularity_scare //Singularity moving towards you. //todo Hide where it moved with fake space images @@ -303,11 +315,12 @@ Gunshots/explosions/opening doors/less rare audio (done) if(target.client) delusions |= A target.client.images |= A - sleep(duration) + QDEL_IN(src, duration) + +/obj/effect/hallucination/delusion/Destroy() for(var/image/I in delusions) if(target.client) target.client.images.Remove(I) - qdel(src) /obj/effect/hallucination/fakeattacker/New(loc,var/mob/living/carbon/T) target = T