mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-21 05:02:40 +01:00
877569a5f6
readable flow control
50 lines
1.6 KiB
Plaintext
50 lines
1.6 KiB
Plaintext
/datum/artifact_effect/uncommon/stun
|
|
name = "stun"
|
|
effect_color = "#00eeff"
|
|
|
|
|
|
/datum/artifact_effect/uncommon/stun/New()
|
|
..()
|
|
effect_type = pick(EFFECT_PSIONIC, EFFECT_ORGANIC)
|
|
|
|
|
|
/datum/artifact_effect/uncommon/stun/DoEffectTouch(mob/living/user)
|
|
if (user && iscarbon(user))
|
|
var/mob/living/carbon/C = user
|
|
var/susceptibility = GetAnomalySusceptibility(C)
|
|
if (prob(susceptibility * 100))
|
|
to_chat(C, "<font color='red'>A powerful force overwhelms your consciousness.</font>")
|
|
C.Weaken(rand(1,10) * susceptibility)
|
|
C.stuttering += 30 * susceptibility
|
|
C.Stun(rand(1,10) * susceptibility)
|
|
|
|
|
|
/datum/artifact_effect/uncommon/stun/DoEffectAura()
|
|
var/atom/holder = get_master_holder()
|
|
if (holder)
|
|
var/turf/T = get_turf(holder)
|
|
for (var/mob/living/carbon/C in range(src.effectrange,T))
|
|
var/susceptibility = GetAnomalySusceptibility(C)
|
|
if (prob(10 * susceptibility))
|
|
to_chat(C, "<font color='red'>Your body goes numb for a moment.</font>")
|
|
C.Weaken(2)
|
|
C.stuttering += 2
|
|
if (prob(10))
|
|
C.Stun(1)
|
|
else if (prob(10))
|
|
to_chat(C, "<font color='red'>You feel numb.</font>")
|
|
|
|
|
|
/datum/artifact_effect/uncommon/stun/DoEffectPulse()
|
|
var/atom/holder = get_master_holder()
|
|
if (holder)
|
|
var/turf/T = get_turf(holder)
|
|
for (var/mob/living/carbon/C in range(src.effectrange,T))
|
|
var/susceptibility = GetAnomalySusceptibility(C)
|
|
if (prob(100 * susceptibility))
|
|
to_chat(C, "<font color='red'>A wave of energy overwhelms your senses!</font>")
|
|
C.SetWeakened(4 * susceptibility)
|
|
C.stuttering = 4 * susceptibility
|
|
if (prob(10))
|
|
C.SetStunned(1 * susceptibility)
|