Files
Aurora.3/code/modules/psionics/complexus/complexus_latency.dm
Matt Atlas c087a0a0bf Ports a psionic system from Bay. (#7717)
* Ports a psionic system from Bay.

* Rip out this shitcode.

* shitcoden't

* fixes

* it should work fully now

* Admin fixes

* Remove todos

* remove todos part 2

* Removes psi-armour. We don't need this for now.

* Skrell are now operants. Tweaks coercion.

* Adds thralls.

* Temp removal of psiarmour. Fixes psigrabs.

* Thrall assay.

* fixes

* More fixes

* unused define cleanup

* Log and powers

* Skrell powers are done.

* Update code/modules/psionics/events/mini_spasm.dm

Co-Authored-By: Geeves <ggrobler447@gmail.com>

* Update code/modules/psionics/events/mini_spasm.dm

Co-Authored-By: Geeves <ggrobler447@gmail.com>

* Update code/modules/psionics/equipment/cerebro_enhancers.dm

* did this work???

* jargon

* arrow's fixes

Co-authored-by: Geeves <ggrobler447@gmail.com>
2019-12-24 11:32:05 +01:00

18 lines
746 B
Plaintext

/datum/psi_complexus/proc/check_latency_trigger(var/trigger_strength = 0, var/source, var/redactive = FALSE)
if(!LAZYLEN(latencies) || world.time < next_latency_trigger)
return FALSE
if(!prob(trigger_strength))
next_latency_trigger = world.time + rand(100, 300)
return FALSE
var/faculty = pick(latencies)
var/new_rank = rand(2,5)
owner.set_psi_rank(faculty, new_rank)
var/datum/psionic_faculty/faculty_decl = SSpsi.get_faculty(faculty)
to_chat(owner, span("danger", "You scream internally as your [faculty_decl.name] faculty is forced into operancy by [source]!"))
next_latency_trigger = world.time + rand(600, 1800) * new_rank
if(!redactive) owner.adjustBrainLoss(rand(trigger_strength * 2, trigger_strength * 4))
return TRUE