Tweaks hypnoquirk as the discord seems to really want it.
This commit is contained in:
@@ -9,10 +9,13 @@
|
||||
var/hypnotic_phrase = ""
|
||||
var/regex/target_phrase
|
||||
|
||||
/datum/brain_trauma/hypnosis/New(phrase)
|
||||
/datum/brain_trauma/hypnosis/New(phrase, priority = TRUE)
|
||||
if(!phrase)
|
||||
qdel(src)
|
||||
hypnotic_phrase = phrase
|
||||
if(priority == TRUE)
|
||||
hypnotic_phrase = phrase
|
||||
else
|
||||
phrase friendliify(phrase)
|
||||
try
|
||||
target_phrase = new("(\\b[hypnotic_phrase]\\b)","ig")
|
||||
catch(var/exception/e)
|
||||
@@ -20,6 +23,16 @@
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/hypnosis/proc/friendliify(phrase)
|
||||
phrase = replacetext(lowertext(phrase), "kill", "hug")
|
||||
phrase = replacetext(lowertext(phrase), "murder", "cuddle")
|
||||
phrase = replacetext(lowertext(phrase), "harm", "snuggle")
|
||||
phrase = replacetext(lowertext(phrase), "decapitate", "headpat")
|
||||
phrase = replacetext(lowertext(phrase), "strangle", "meow at")
|
||||
phrase = replacetext(lowertext(phrase), "suicide", "self-love")
|
||||
phrase = replacetext(lowertext(phrase), "lynch", "kiss")
|
||||
hypnotic_phrase = phrase
|
||||
|
||||
/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]'.")
|
||||
@@ -29,8 +42,12 @@
|
||||
"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,\
|
||||
if(priority == TRUE)
|
||||
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>")
|
||||
else
|
||||
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,\
|
||||
however this does not take precedence over your other objectives.</span>")
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/hypnosis/on_lose()
|
||||
|
||||
@@ -553,11 +553,12 @@ datum/status_effect/pacify
|
||||
ADD_TRAIT(owner, TRAIT_MUTE, "trance")
|
||||
if(!owner.has_quirk(/datum/quirk/monochromatic))
|
||||
owner.add_client_colour(/datum/client_colour/monochrome)
|
||||
owner.visible_message("[stun ? "<span class='warning'>[owner] stands still as [owner.p_their()] eyes seem to focus on a distant point.</span>" : ""]", \
|
||||
if(priority == TRUE)
|
||||
owner.visible_message("[stun ? "<span class='warning'>[owner] stands still as [owner.p_their()] eyes seem to focus on a distant point.</span>" : ""]", \
|
||||
"<span class='warning'>[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...")]</span>")
|
||||
return TRUE
|
||||
|
||||
/datum/status_effect/trance/on_creation(mob/living/new_owner, _duration, _stun = TRUE)
|
||||
/datum/status_effect/trance/on_creation(mob/living/new_owner, _duration, _stun = TRUE, priority = TRUE)//priority == FALSE makes no visible message, prevents self antag messages, and places phrase below objectives.
|
||||
duration = _duration
|
||||
stun = _stun
|
||||
return ..()
|
||||
@@ -577,6 +578,9 @@ datum/status_effect/pacify
|
||||
return
|
||||
var/mob/living/carbon/C = owner
|
||||
C.cure_trauma_type(/datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY) //clear previous hypnosis
|
||||
addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, raw_message), 10)
|
||||
if(priority == TRUE)
|
||||
addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, raw_message), 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.proc/Stun, 60, TRUE, TRUE), 15) //Take some time to think about it
|
||||
qdel(src)
|
||||
|
||||
@@ -348,6 +348,6 @@
|
||||
to_chat(H, "<span class='notice'><i>That object accidentally sets off your implanted trigger, sending you into a hypnotic daze!</i></span>")
|
||||
else
|
||||
to_chat(H, "<span class='notice'><i>[pick(seen)] accidentally sets off your implanted trigger, sending you into a hypnotic daze!</i></span>")
|
||||
H.apply_status_effect(/datum/status_effect/trance, 200, TRUE)
|
||||
H.apply_status_effect(/datum/status_effect/trance, 200, TRUE, FALSE)
|
||||
qdel(src)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user