mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 20:37:34 +01:00
a802b48e2a
The next step in the Psi Reworks is here, this time adding all of the remaining sources and applications of Psi-sensitivity and Psi-protection that were on my To-Do list. Aside from a variety of tweaks and bugfixes to powers, the most player-facing addition is the new Psi-sensitivity related traits, which are High Psi-sensitivity, and Low Psi-sensitivity. These traits modify the character's psi-sensitivity, which messes with their interactions with psionics in a variety of ways. All of these new sources and interactions with psionics are handled entirely through components, which operate on the previously added COMSIG_PSI signals. Check the changelog file for more specific details on what all was fixed. I've fixed quite a lot of bugs and issues with the various psi powers. I have actually tested this PR and verified that it works as advertised. <img width="1902" height="1015" alt="image" src="https://github.com/user-attachments/assets/e922593c-0595-4b63-bee4-36080d9cb8b4" />
78 lines
2.9 KiB
Plaintext
78 lines
2.9 KiB
Plaintext
/singleton/psionic_power/emotional_suggestion
|
|
name = "Emotional Suggestion"
|
|
desc = "Allows you to psionically commune with the target."
|
|
icon_state = "tech_gambit"
|
|
ability_flags = PSI_FLAG_EVENT|PSI_FLAG_CANON
|
|
spell_path = /obj/item/spell/emotional_suggestion
|
|
|
|
/obj/item/spell/emotional_suggestion
|
|
name = "emotional suggestion"
|
|
desc = "Suggest an emotion to someone."
|
|
icon_state = "generic"
|
|
item_icons = null
|
|
cast_methods = CAST_RANGED|CAST_MELEE
|
|
aspect = ASPECT_PSIONIC
|
|
cooldown = 10
|
|
psi_cost = 15
|
|
|
|
/obj/item/spell/emotional_suggestion/on_melee_cast(atom/hit_atom, mob/living/user, def_zone)
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
emotional_suggestion(hit_atom, user)
|
|
|
|
/obj/item/spell/emotional_suggestion/on_ranged_cast(atom/hit_atom, mob/user)
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
emotional_suggestion(hit_atom, user)
|
|
|
|
/obj/item/spell/emotional_suggestion/proc/emotional_suggestion(atom/hit_atom, mob/user)
|
|
if(!isliving(hit_atom))
|
|
return
|
|
|
|
var/mob/living/target = hit_atom
|
|
if(target.stat == DEAD)
|
|
to_chat(user, SPAN_WARNING("Not even a psion of your level can suggest to the dead."))
|
|
return
|
|
|
|
var/psi_blocked = target.is_psi_blocked(user, FALSE)
|
|
if(psi_blocked)
|
|
to_chat(user, psi_blocked)
|
|
return
|
|
|
|
var/text = tgui_input_list(user, "Which emotion would you like to suggest?", "Emotional Suggestion", list("Calm", "Happiness", "Sadness", "Fear", "Anger", "Stress", "Confusion"))
|
|
if(!text)
|
|
return
|
|
|
|
text = lowertext(text)
|
|
|
|
if(target.stat == DEAD)
|
|
to_chat(user, SPAN_WARNING("Not even a psion of your level can suggest to the dead."))
|
|
return
|
|
|
|
log_say("[key_name(user)] suggested an emotion to [key_name(target)]: [text]")
|
|
|
|
to_chat(user, SPAN_CULT("You psionically suggest an emotion to [target]: [text]"))
|
|
|
|
for (var/mob/M in GLOB.player_list)
|
|
if (istype(M, /mob/abstract/new_player))
|
|
continue
|
|
else if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS))
|
|
to_chat(M, "<span class='notice'>[user] psionically suggests an emotion to [target]:</span> [text]")
|
|
|
|
var/mob/living/carbon/human/H = target
|
|
var/target_sensitivity = H.check_psi_sensitivity()
|
|
if(target_sensitivity >= 1)
|
|
// Augmented case for anyone with enhancements to their psi-sensitivity
|
|
to_chat(H, SPAN_NOTICE("<i>[user] blinks, their eyes briefly developing an unnatural shine.</i>"))
|
|
to_chat(H, SPAN_NOTICE("You sense [user]'s psyche link with your own, and an emotion of <b>[text]</b> washes through your mind."))
|
|
else if (target_sensitivity >= 0)
|
|
// Standard case for most characters.
|
|
to_chat(H, SPAN_NOTICE("An emotion from outside your consciousness slips into your mind: <b>[text]</b>."))
|
|
else
|
|
// Negative sensitivity case, message arrives scrambled.
|
|
// 25% of the message is scrambled per negative point of psi-sensitivity. Allowing fractional points.
|
|
var/scrambled_message = stars(text, (abs(target_sensitivity) * 25))
|
|
to_chat(H, SPAN_NOTICE("A half-formed emotion passes through your mind: <b>[scrambled_message]</b>."))
|