mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
[Ready] Refactors stuns and status effects. (#17579)
* Fixes reviver runtime * Confusion status effect * Dizzy status effect * Drowsiness status effect * decaying -> transient * Drunkenness status effect * why use timer when SSfastprocessing work good * stuns (mostly) * weaken and immobalise * stun/weaken times * update_flags redundancies. * Slowed() * Silence + fixes transient decay * Jittery * sleeping * Paralyze -> weaken * Cult sluring * paralyse * Stammer * slurring + projectile cleanups * losebreath * Hallucination * forgor this * eyeblurry * eye blind * Druggy * affected didn't like my spacing * review pass * second review pass * some cleanups * documentation and signal framework * confusion fix * Fixes spec_stun * rejuv fix * removes a TODO * conflicted myself * fixes * self review * review * removes TODOs * adminfreeze * TM fixes * hallucination fix + others * tones down alchol and runtime fixes * confusion overlay suggestion * more fixes * runtime fix * losebreath fix * clamp => directional bounded sum * steel review * oops Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> * reduces the dizziness cycle rate * borg hotfix * sanctified decursening Co-authored-by: mochi <1496804+dearmochi@users.noreply.github.com> Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
@@ -100,14 +100,13 @@
|
||||
var/shock_damage = min(rand(30,40),rand(30,40))
|
||||
|
||||
if(isliving(user) && !issilicon(user))
|
||||
var/stun = min(shock_damage, 15)
|
||||
user.Stun(stun)
|
||||
user.Weaken(10)
|
||||
var/stun = (min(shock_damage, 15)) STATUS_EFFECT_CONSTANT
|
||||
user.Weaken(stun)
|
||||
user.electrocute_act(shock_damage, src, 1)
|
||||
|
||||
else if(issilicon(user))
|
||||
if(prob(20))
|
||||
user.Stun(2)
|
||||
user.Stun(4 SECONDS)
|
||||
user.take_overall_damage(0, shock_damage)
|
||||
user.visible_message("<span class='danger'>[user.name] was shocked by [src]!</span>", \
|
||||
"<span class='userdanger'>Energy pulse detected, system damaged!</span>", \
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
if(M.stat == CONSCIOUS)
|
||||
if(!iscultist(M))
|
||||
to_chat(M, "<span class='warning'>You feel your sanity crumble away in an instant as you gaze upon [src.name]...</span>")
|
||||
M.apply_effect(3, STUN)
|
||||
M.Stun(6 SECONDS)
|
||||
|
||||
|
||||
/obj/singularity/narsie/consume(atom/A)
|
||||
|
||||
@@ -416,7 +416,7 @@
|
||||
to_chat(H, "<span class='notice'>You look directly into [src], good thing you had your protective eyewear on!</span>")
|
||||
return
|
||||
|
||||
M.apply_effect(3, STUN)
|
||||
M.Stun(6 SECONDS)
|
||||
M.visible_message("<span class='danger'>[M] stares blankly at [src]!</span>", \
|
||||
"<span class='userdanger'>You look directly into [src] and feel weak.</span>")
|
||||
return
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
///How much the bullets damage should be multiplied by when it is added to the internal variables
|
||||
var/bullet_energy = 2
|
||||
///How much hallucination should we produce per unit of power?
|
||||
var/hallucination_power = 0.1
|
||||
var/hallucination_power = 1
|
||||
|
||||
///Our internal radio
|
||||
var/obj/item/radio/radio
|
||||
@@ -328,7 +328,8 @@
|
||||
if(ishuman(mob))
|
||||
//Hilariously enough, running into a closet should make you get hit the hardest.
|
||||
var/mob/living/carbon/human/H = mob
|
||||
H.hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1))))
|
||||
var/hallucination_amount = (max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1))))) SECONDS
|
||||
H.AdjustHallucinate(hallucination_amount)
|
||||
var/rads = DETONATION_RADS * sqrt(1 / (get_dist(L, src) + 1))
|
||||
L.rad_act(rads)
|
||||
|
||||
@@ -539,8 +540,8 @@
|
||||
for(var/mob/living/carbon/human/l in view(src, HALLUCINATION_RANGE(power))) // If they can see it without mesons on. Bad on them.
|
||||
if(!istype(l.glasses, /obj/item/clothing/glasses/meson) && !HAS_TRAIT(l, TRAIT_MESON_VISION))
|
||||
var/D = sqrt(1 / max(1, get_dist(l, src)))
|
||||
l.hallucination += power * hallucination_power * D
|
||||
l.hallucination = clamp(l.hallucination, 0, 200)
|
||||
var/hallucination_amount = power * hallucination_power * D
|
||||
l.AdjustHallucinate(hallucination_amount, 0, 200 SECONDS)
|
||||
for(var/mob/living/l in range(src, round((power / 100) ** 0.25)))
|
||||
var/rads = (power / 10) * sqrt( 1 / max(get_dist(l, src), 1) )
|
||||
l.rad_act(rads)
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
var/mob_speed = M.movement_delay()
|
||||
switch(M.m_intent)
|
||||
if(MOVE_INTENT_RUN)
|
||||
if(M.drowsyness > 0)
|
||||
if(M.get_drowsiness() > 0)
|
||||
mob_speed += 6
|
||||
mob_speed += GLOB.configuration.movement.base_run_speed - 1
|
||||
if(MOVE_INTENT_WALK)
|
||||
|
||||
Reference in New Issue
Block a user