diff --git a/code/datums/brain_damage/hypnosis.dm b/code/datums/brain_damage/hypnosis.dm
index aa8d385092..1b592ec3a8 100644
--- a/code/datums/brain_damage/hypnosis.dm
+++ b/code/datums/brain_damage/hypnosis.dm
@@ -5,14 +5,13 @@
gain_text = ""
lose_text = ""
resilience = TRAUMA_RESILIENCE_SURGERY
- var/priority = TRUE
var/hypnotic_phrase = ""
var/regex/target_phrase
-/datum/brain_trauma/hypnosis/New(phrase, priority)
+/datum/brain_trauma/hypnosis/New(phrase, quirk = FALSE)
if(!phrase)
qdel(src)
- if(priority == TRUE)
+ if(quirk == TRUE)
hypnotic_phrase = phrase
else
friendliify(phrase)
@@ -42,11 +41,11 @@
"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.")]")
- if(priority == TRUE)
+ if(!HAS_TRAIT(owner, "hypnotherapy"))
to_chat(owner, "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.")
else
- to_chat(owner, "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,\
+ to_chat(owner, "You've been hypnotized by this sentence. You feel an incredible desire to follow these words, but are able to resist it somewhat. If it isn't a clear order, you can freely interpret how to do so,\
however this does not take precedence over your other objectives.")
..()
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 0ec09f4965..e3df8db9d1 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -534,8 +534,8 @@ datum/status_effect/pacify
tick_interval = 10
examine_text = "SUBJECTPRONOUN seems slow and unfocused."
var/stun = TRUE
- var/priority = TRUE
- alert_type = /obj/screen/alert/status_effect/trance
+ var/triggered = FALSE
+ alert_type = null
/obj/screen/alert/status_effect/trance
name = "Trance"
@@ -543,6 +543,22 @@ datum/status_effect/pacify
icon_state = "high"
/datum/status_effect/trance/tick()
+ if(HAS_TRAIT(owner, "hypnotherapy"))
+ message_admins("has trait")
+ if(triggered == TRUE)
+ message_admins("triggered")
+ UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
+ RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/hypnotize)
+ ADD_TRAIT(owner, TRAIT_MUTE, "trance")
+ if(!owner.has_quirk(/datum/quirk/monochromatic))
+ owner.add_client_colour(/datum/client_colour/monochrome)
+ to_chat(owner, "[pick("You feel your thoughts slow down...", "You suddenly feel extremely dizzy...", "You feel like you're in the middle of a dream...","You feel incredibly relaxed...")]")
+ triggered = FALSE
+ duration = 300
+ else
+ message_admins("not triggered")
+ return
+ message_admins("stunning")
if(stun)
owner.Stun(60, TRUE, TRUE)
owner.dizziness = 20
@@ -550,19 +566,26 @@ datum/status_effect/pacify
/datum/status_effect/trance/on_apply()
if(!iscarbon(owner))
return FALSE
+ if(HAS_TRAIT(owner, "hypnotherapy"))
+ message_admins("stunning")
+ RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/listen)
+ return TRUE
+ alert_type = /obj/screen/alert/status_effect/trance
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/hypnotize)
ADD_TRAIT(owner, TRAIT_MUTE, "trance")
if(!owner.has_quirk(/datum/quirk/monochromatic))
owner.add_client_colour(/datum/client_colour/monochrome)
- if(priority == TRUE)
- owner.visible_message("[stun ? "[owner] stands still as [owner.p_their()] eyes seem to focus on a distant point." : ""]", \
+ owner.visible_message("[stun ? "[owner] stands still as [owner.p_their()] eyes seem to focus on a distant point." : ""]", \
"[pick("You feel your thoughts slow down...", "You suddenly feel extremely dizzy...", "You feel like you're in the middle of a dream...","You feel incredibly relaxed...")]")
return TRUE
-/datum/status_effect/trance/on_creation(mob/living/new_owner, _duration, _stun = TRUE, _priority = priority)//priority == FALSE makes no visible message, prevents self antag messages, and places phrase below objectives.
+/datum/status_effect/trance/on_creation(mob/living/new_owner, _duration, _stun = TRUE, source_quirk = FALSE)//hypnoquirk makes no visible message, prevents self antag messages, and places phrase below objectives.
duration = _duration
stun = _stun
- priority = _priority
+ var/mob/living/carbon/C = new_owner
+ if(source_quirk == FALSE && HAS_TRAIT(C, "hypnotherapy"))
+ message_admins("removing quirk")
+ REMOVE_TRAIT(owner, "hypnotherapy", ROUNDSTART_TRAIT)
return ..()
/datum/status_effect/trance/on_remove()
@@ -573,16 +596,22 @@ datum/status_effect/pacify
owner.remove_client_colour(/datum/client_colour/monochrome)
to_chat(owner, "You snap out of your trance!")
+/datum/status_effect/trance/proc/listen(datum/source, message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
+ message_admins("Trigger start")
+ to_chat(owner, "[speaker] accidentally sets off your implanted trigger, sending you into a hypnotic daze!")
+ triggered = TRUE
+
/datum/status_effect/trance/proc/hypnotize(datum/source, message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
+ message_admins("Hypnotize")
if(!owner.can_hear())
return
if(speaker == owner)
return
var/mob/living/carbon/C = owner
C.cure_trauma_type(/datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY) //clear previous hypnosis
- if(priority == TRUE)
- addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, raw_message), 10)
+ if(HAS_TRAIT(C, "hypnotherapy"))
+ addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, raw_message, TRUE), 10)
else
- addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, raw_message, FALSE), 10)
+ addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, raw_message), 10)
addtimer(CALLBACK(C, /mob/living.proc/Stun, 60, TRUE, TRUE), 15) //Take some time to think about it
qdel(src)
diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm
index efa9e9a4cb..6b5f2abfbb 100644
--- a/code/datums/traits/negative.dm
+++ b/code/datums/traits/negative.dm
@@ -380,12 +380,5 @@
//DOES NOT give any indication when someone is triggered - this is intentional so people don't abuse it, you're supposed to get a random thing said to you as a mini objective.
/datum/quirk/hypno/proc/triggered(quirk_holder)//I figured I might as well make a trait of code I added.
- var/mob/living/carbon/human/H = quirk_holder
- var/list/seen = viewers(8, get_turf(H))
- seen -= quirk_holder
- if(LAZYLEN(seen) == 0)
- to_chat(H, "That object accidentally sets off your implanted trigger, sending you into a hypnotic daze!")
- else
- to_chat(H, "[pick(seen)] accidentally sets off your implanted trigger, sending you into a hypnotic daze!")
- H.apply_status_effect(/datum/status_effect/trance, 200, TRUE, FALSE)
- qdel(src)
+ var/mob/living/carbon/human/H = quirk_holder
+ H.apply_status_effect(/datum/status_effect/trance, 1000, TRUE, TRUE)
diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm
index 93558e2664..d9ed8fae11 100644
--- a/code/modules/surgery/organs/vocal_cords.dm
+++ b/code/modules/surgery/organs/vocal_cords.dm
@@ -1236,11 +1236,10 @@
var/trigger = html_decode(stripped_input(user, "Enter the trigger phrase", MAX_MESSAGE_LEN))
var/custom_words_words_list = list("Speak", "Echo", "Shock", "Cum", "Kneel", "Strip", "Trance", "Cancel")
var/trigger2 = input(user, "Pick an effect", "Effects") in custom_words_words_list
- //var/trigger2 = stripped_input(user, "Enter the effect.", MAX_MESSAGE_LEN)
trigger2 = lowertext(trigger2)
if ((findtext(trigger2, custom_words_words)))
if (trigger2 == "speak" || trigger2 == "echo")
- var/trigger3 = html_decode(stripped_input(user, "Enter the phrase spoken.", MAX_MESSAGE_LEN))
+ var/trigger3 = html_decode(stripped_input(user, "Enter the phrase spoken. Abusing this to self antag is bannable.", MAX_MESSAGE_LEN))
E.customTriggers[trigger] = list(trigger2, trigger3)
message_admins("[H] has been implanted by [user] with [trigger], triggering [trigger2], to send [trigger3].")
else