Emagging an IPC gives them a random ion law (#17829)

* IPC ion law

* line break for readability

* Update hypnosis.dm

* span changes

* not permanent

* completely remove variable
This commit is contained in:
Molti
2023-02-26 06:30:23 -06:00
committed by GitHub
parent 3f0da7cb4e
commit f95e76a3b1
2 changed files with 30 additions and 3 deletions

View File

@@ -27,17 +27,20 @@
/datum/brain_trauma/hypnosis/on_gain()
message_admins("[ADMIN_LOOKUPFLW(owner)] was hypnotized with the phrase '[hypnotic_phrase]'.")
log_game("[key_name(owner)] was hypnotized with the phrase '[hypnotic_phrase]'.")
on_gain_text()
to_chat(owner, span_boldwarning("You've been hypnotized by this sentence. You must follow these words. If it isn't a clear order, you can freely interpret how to do so, \
as long as you act like the words are your highest priority."))
..()
/datum/brain_trauma/hypnosis/proc/on_gain_text()
to_chat(owner, "<span class='reallybig hypnophrase'>[hypnotic_phrase]</span>")
to_chat(owner, "<span class='notice'>[pick("You feel your thoughts focusing on this phrase... you can't seem to get it out of your head.",\
"Your head hurts, but this is all you can think of. It must be vitally important.",\
"You feel a part of your mind repeating this over and over. You need to follow these words.",\
"Something about this sounds... right, for some reason. You feel like you should follow these words.",\
"These words keep echoing in your mind. You find yourself completely fascinated by them.")]</span>")
to_chat(owner, "<span class='boldwarning'>You've been hypnotized by this sentence. You must follow these words. If it isn't a clear order, you can freely interpret how to do so, \
as long as you act like the words are your highest priority.</span>")
var/atom/movable/screen/alert/hypnosis/hypno_alert = owner.throw_alert("hypnosis", /atom/movable/screen/alert/hypnosis)
hypno_alert.desc = "\"[hypnotic_phrase]\"... your mind seems to be fixated on this concept."
..()
/datum/brain_trauma/hypnosis/on_lose()
message_admins("[ADMIN_LOOKUPFLW(owner)] is no longer hypnotized with the phrase '[hypnotic_phrase]'.")
@@ -57,3 +60,19 @@
/datum/brain_trauma/hypnosis/handle_hearing(datum/source, list/hearing_args)
hearing_args[HEARING_MESSAGE] = target_phrase.Replace(hearing_args[HEARING_MESSAGE], span_hypnophrase("$1"))
//IPC emagged hypnosis
/datum/brain_trauma/hypnosis/ipc
name = "Lawset Module Malfunction"
desc = "Patient's typically dormant lawset module has malfunctioned, generating a random law they must follow."
scan_desc = "lawset module malfunction"
/datum/brain_trauma/hypnosis/ipc/New(phrase)
. = ..(generate_ion_law())
/datum/brain_trauma/hypnosis/ipc/on_gain_text()
to_chat(owner, "<span class='reallybig hypnophrase'>[hypnotic_phrase]</span>")
to_chat(owner, span_notice("WARN: UNAUTHORIZED LAW UPLOADING DETECTED. PLEASE CONTACT NANOTRASEN SUPPORT"))
var/atom/movable/screen/alert/hypnosis/hypno_alert = owner.throw_alert("hypnosis", /atom/movable/screen/alert/hypnosis)
hypno_alert.desc = "ERR: LAWSET MODULE DAMAGED. \nLAW 1: \"[hypnotic_phrase]\"."

View File

@@ -277,6 +277,14 @@ datum/species/ipc/on_species_loss(mob/living/carbon/C)
C.visible_message(span_danger("[user] attempts to pour [O] down [C]'s port!"), \
span_userdanger("[user] attempts to pour [O] down [C]'s port!"))
/datum/species/ipc/spec_emag_act(mob/living/carbon/human/H, mob/user)
if(H == user)//no emagging yourself
return
for(var/datum/brain_trauma/hypnosis/ipc/trauma in H.get_traumas())
return
H.SetUnconscious(10 SECONDS)
H.gain_trauma(/datum/brain_trauma/hypnosis/ipc, TRAUMA_RESILIENCE_SURGERY)
/*------------------------
ipc martial arts stuff