mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 16:10:02 +01:00
Psi Rework Part 1: The Miracle and the Sleeper (#21584)
<img width="1701" height="292" alt="image" src="https://github.com/user-attachments/assets/db1dbc50-1a6a-4549-b9e5-b838ec62f849" /> **This is but one of several PRs as part of Project Anabasis, and is a necessary building-block for a Traits System and a Skills System** This PR was essentially prompted by recent lore changes to Skrell that weren't yet existing in the game, so I'm kicking off this as a PR to start a series of more meaningful psionic reworks. With a focus on Components and Signals as a way of dramatically increasing the systems interactivity of psionics. With this PR, mobs have an effective "Psi-Sensitivity" that can be checked by psionic effects, and influence a wide variety of interactions. Psi-Sensitivity is calculated based on a Signal interaction, whereby multiple responding sources have a chance to respond to the signal and influence the end result of the calculation. For now there still remains a cutout specifically for owners of a Psi-Complexus(Which is just Skrell and Antag Psions), who have a bonus to the psi-sensitivity check equal to their PSI-RATING. That being 1 for Skrell, and 2 for antag psions. But eventually in the future this should be replaced with a standalone component separate from the concept of "Sending" The other common sources of sensitivity currently are the Psionic Receiver implant, MindShield, and Mind Blanker implants. With Psionic Receivers giving a bonus to psi-sensitivity, and the latter two giving a penalty to psi-sensitivity. Both MindShields and Mind Blankers are now unified in how they interact with psionics, both using the same system of Signals without a hardcoded check for the mindshield. As an important distinction to make, Psi-Sensitivity is NOT the same thing as being Psionic. Actually Psionic characters like Skrell have a big bonus to their sensitivity. It's more a measurement of how receptive a character is to Receiving (separate from Sending) psionic influences. You can actually be capable of using psionic abilities, but have a sensitivity of 0, effectively meaning such a character can "Send but not Receive" psi influences. - [x] I have tested this PR and have verified that it works, you're welcome.
This commit is contained in:
@@ -10,11 +10,16 @@ GLOBAL_LIST_EMPTY_TYPED(dream_entries, /turf)
|
||||
|
||||
/mob/living/carbon/human/proc/handle_shared_dreaming(var/force_wakeup = FALSE)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
if(is_psi_blocked(src)) // Can't enter the dream if the caster is blocked from RECEIVING. It's a two-way street.
|
||||
return
|
||||
|
||||
// If they're an Unconsious person with the abillity to do Skrellepathy.
|
||||
// If either changes, they should be nocked back to the real world.
|
||||
// This is one of the legitimate uses for has_psionics() that should be kept even though has_psionics() is deprecated.
|
||||
// Entering the dream requires the caster be capable of SENDING.
|
||||
var/is_psionic = has_psionics()
|
||||
|
||||
// Entering the dream requires that the caster either be capable of SENDING, or has a "guide" performing the SENDING on their behalf.
|
||||
var/mob/living/carbon/human/srom_puller = srom_pulled_by?.resolve()
|
||||
if((has_psionics() || (srom_puller && Adjacent(srom_puller))) && stat == UNCONSCIOUS && sleeping > 1)
|
||||
if((is_psionic || (srom_puller && Adjacent(srom_puller))) && stat == UNCONSCIOUS && sleeping > 1)
|
||||
if(!istype(bg) && client) // Don't spawn a brainghost if we're not logged in.
|
||||
bg = new /mob/living/brain_ghost(src, src) // Generate a new brainghost.
|
||||
if(isnull(bg)) // Prevents you from getting kicked if the brain ghost didn't spawn - geeves
|
||||
@@ -27,13 +32,14 @@ GLOBAL_LIST_EMPTY_TYPED(dream_entries, /turf)
|
||||
to_chat(bg, SPAN_WARNING("Whilst in shared dreaming, you find it difficult to hide your secrets."))
|
||||
if(willfully_sleeping)
|
||||
to_chat(bg, "To wake up, use the \"Awaken\" verb in the IC tab.")
|
||||
if(!srom_pulling && has_psionics())
|
||||
if(!srom_pulling && is_psionic)
|
||||
var/obj/item/grab/G = r_hand
|
||||
if(!G)
|
||||
G = l_hand
|
||||
if(G)
|
||||
var/mob/living/carbon/human/victim = G.affecting
|
||||
if(ishuman(victim) && !isSynthetic(victim) && victim.is_psi_pingable(srom_puller))
|
||||
// Victims must be capable of RECEIVING.
|
||||
if(!victim.is_psi_blocked(src) && ((victim.check_psi_sensitivity() > 0) || victim.has_zona_bovinae()))
|
||||
to_chat(bg, SPAN_NOTICE("You have taken [victim] to the Srom with you."))
|
||||
victim.srom_pulled_by = WEAKREF(src)
|
||||
srom_pulling = WEAKREF(victim)
|
||||
@@ -47,7 +53,7 @@ GLOBAL_LIST_EMPTY_TYPED(dream_entries, /turf)
|
||||
if(istype(bg) || force_wakeup)
|
||||
// If we choose to be asleep, keep sleeping.
|
||||
if(willfully_sleeping && sleeping && stat == UNCONSCIOUS)
|
||||
if(has_psionics() || srom_pulled_by)
|
||||
if(is_psionic || srom_pulled_by)
|
||||
sleeping = 5
|
||||
return
|
||||
for(var/thing in SSpsi.processing)
|
||||
@@ -61,15 +67,17 @@ GLOBAL_LIST_EMPTY_TYPED(dream_entries, /turf)
|
||||
var/mob/return_mob = src
|
||||
|
||||
if(srom_pulled_by)
|
||||
if(!has_psi_aug())
|
||||
var/sensitivity = check_psi_sensitivity()
|
||||
if(sensitivity <= 0)
|
||||
dizziness += 40
|
||||
confused += 40
|
||||
slurring += 40
|
||||
eye_blurry += 40
|
||||
return_text += " You feel dizzy, confused and weird..."
|
||||
else
|
||||
return_text += " Your augment staves off most of the post-Srom pull symptoms, but you still feel like your mind is clouded."
|
||||
adjustBrainLoss(10)
|
||||
return_text += " You stave off most of the post-Srom pull symptoms, but you still feel like your mind is clouded."
|
||||
// Non-Psions can have a RECEIVING stat, so we'll account for it by giving them a leeway on the brain damage if they're sufficiently sensitive.
|
||||
adjustBrainLoss(10 - min(10, 5 * sensitivity))
|
||||
srom_pulled_by = null
|
||||
|
||||
var/mob/living/carbon/human/victim = srom_pulling?.resolve()
|
||||
|
||||
Reference in New Issue
Block a user