Files
Yogstation/code/datums/components/spooky.dm
tattax 4e5f8a27f3 adds antagonists to the game (#18514)
* commit 1 - get me out

* she lives

* adds wizards

* thing

* surprise end hits take 1

* s

* d

* surprise end hits take 2

* montreal

* REAl

* strangelight

* guilford fall

* natural disasters

* envelope

* h

* lady elect

* test 321

* test 123

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>

* hot toes test

* ss

* redundancy

* s

* test 2

* s²

* s³

* s²³

* a pray!

* life and limb

* epic problem

* hmm

* update

* fixes something

* fixes something²

* adds slaughter demons to the game

* rend it

* hmm

* restores something

* adds clockwork cult into the game

* adds changelings to the game

* cassevetes

* test 101

* :)

* against

* shut the door

* adds darkspawn to the game

* sad

* cashout

* adds vampires to the game

* 2

* summer freeze

* pink frosty

* test111

* adds game to the game

* 2

* syndrome

* test

* test 2

* test 3

* test 4

* adds replay to the game?

* maybe?

* slo

* hrn

* test II

* test III

* test IV

* new technique

* ahm hum

* d

* sensible

* c

* ss13

* a

* v

* f

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2023-05-25 19:54:14 -05:00

61 lines
2.8 KiB
Plaintext

/datum/component/spooky
var/too_spooky = TRUE //will it spawn a new instrument?
/datum/component/spooky/Initialize()
RegisterSignal(parent, COMSIG_ITEM_ATTACK, PROC_REF(spectral_attack))
/datum/component/spooky/proc/spectral_attack(datum/source, mob/living/carbon/C, mob/user)
if(ishuman(user)) //this weapon wasn't meant for mortals.
var/mob/living/carbon/human/U = user
if(!istype(U.dna.species, /datum/species/skeleton))
U.adjustStaminaLoss(35) //Extra Damage
U.adjust_jitter(35 SECONDS)
U.adjust_stutter(20 SECONDS)
if(U.getStaminaLoss() > 95)
to_chat(U, "<font color ='red', size ='4'><B>Your ears weren't meant for this spectral sound.</B></font>")
spectral_change(U)
return
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(istype(H.dna.species, /datum/species/skeleton))
return //undeads are unaffected by the spook-pocalypse.
if(istype(H.dna.species, /datum/species/zombie))
H.adjustStaminaLoss(25)
H.Paralyze(15) //zombies can't resist the doot
C.adjust_jitter(35 SECONDS)
C.adjust_stutter(20 SECONDS)
if((!istype(H.dna.species, /datum/species/skeleton)) && (!istype(H.dna.species, /datum/species/golem)) && (!istype(H.dna.species, /datum/species/android)) && (!istype(H.dna.species, /datum/species/jelly)))
C.adjustStaminaLoss(25) //boneless humanoids don't lose the will to live
to_chat(C, "<font color='red' size='4'><B>DOOT</B></font>")
spectral_change(H)
else //the sound will spook monkeys.
C.adjust_jitter(15 SECONDS)
C.adjust_stutter(20 SECONDS)
/datum/component/spooky/proc/spectral_change(mob/living/carbon/human/H, mob/user)
if((H.getStaminaLoss() > 95) && (!istype(H.dna.species, /datum/species/skeleton)) && (!istype(H.dna.species, /datum/species/golem)) && (!istype(H.dna.species, /datum/species/android)) && (!istype(H.dna.species, /datum/species/jelly)))
H.Paralyze(2 SECONDS)
H.set_species(/datum/species/skeleton)
H.visible_message(span_warning("[H] has given up on life as a mortal."))
var/T = get_turf(H)
if(too_spooky)
if(prob(30))
new/obj/item/instrument/saxophone/spectral(T)
else if(prob(30))
new/obj/item/instrument/trumpet/spectral(T)
else if(prob(30))
new/obj/item/instrument/trombone/spectral(T)
else
to_chat(H, "The spooky gods forgot to ship your instrument. Better luck next unlife.")
to_chat(H, "<B>You are the spooky skeleton!</B>")
to_chat(H, "A new life and identity has begun. Help your fellow skeletons into bringing out the spooky-pocalypse. You haven't forgotten your past life, and are still beholden to past loyalties.")
change_name(H) //time for a new name!
/datum/component/spooky/proc/change_name(mob/living/carbon/human/H)
var/t = stripped_input(H, "Enter your new skeleton name", H.real_name, null, MAX_NAME_LEN)
if(!t)
t = "spooky skeleton"
H.fully_replace_character_name(null, t)