[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:
Charlie
2022-05-24 16:35:26 +01:00
committed by GitHub
parent b32fb92770
commit 0f7a8707ef
311 changed files with 2268 additions and 2155 deletions
@@ -230,13 +230,13 @@
update_icon()
return
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/user)
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/living/user)
..()
if(istype(O, /obj/screen)) //fix for HUD elements making their way into the world -Pete
return
if(O.loc == user)
return
if(user.restrained() || user.stat || user.IsWeakened() || user.stunned || user.paralysis || user.lying)
if(user.restrained() || user.stat || user.IsWeakened() || user.IsStunned() || user.IsParalyzed() || user.lying)
return
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
return
@@ -134,7 +134,7 @@
src.visible_message(text("<span class='danger'>[M] falls free of [src]!</span>"))
unbuckle_mob(M, force = TRUE)
M.emote("scream")
M.AdjustWeakened(10)
M.AdjustWeakened(20 SECONDS)
/obj/structure/kitchenspike/post_unbuckle_mob(mob/living/M)
M.pixel_y = M.get_standard_pixel_y_offset(0)
+4 -4
View File
@@ -202,12 +202,12 @@
return
return
/obj/structure/m_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
/obj/structure/m_tray/MouseDrop_T(atom/movable/O, mob/living/user)
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
return
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
return
if(!ismob(user) || user.stat || user.lying || user.stunned)
if(!ismob(user) || user.stat || user.lying || user.IsStunned())
return
O.forceMove(loc)
if(user != O)
@@ -425,12 +425,12 @@
return
return
/obj/structure/c_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
/obj/structure/c_tray/MouseDrop_T(atom/movable/O, mob/living/user)
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
return
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
return
if(!ismob(user) || user.stat || user.lying || user.stunned)
if(!ismob(user) || user.stat || user.lying || user.IsStunned())
return
O.forceMove(loc)
if(user != O)
@@ -248,9 +248,8 @@
var/mob/living/buckled_mob = m
unbuckle_mob(buckled_mob)
buckled_mob.throw_at(A, 3, propelled)
buckled_mob.apply_effect(6, STUN, 0)
buckled_mob.apply_effect(6, WEAKEN, 0)
buckled_mob.apply_effect(6, STUTTER, 0)
buckled_mob.Weaken(12 SECONDS)
buckled_mob.Stuttering(12 SECONDS)
buckled_mob.take_organ_damage(10)
playsound(loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
buckled_mob.visible_message("<span class='danger'>[buckled_mob] crashed into [A]!</span>")
@@ -431,9 +430,8 @@
if(iscarbon(target))
var/mob/living/carbon/C = target
if(C.health < C.maxHealth*0.5)
C.apply_effect(6, STUN, 0)
C.apply_effect(6, WEAKEN, 0)
C.apply_effect(6, STUTTER, 0)
C.Weaken(12 SECONDS)
C.Stuttering(12 SECONDS)
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
smash(user)
@@ -445,7 +443,7 @@
m.loc = get_turf(src)
qdel(src)
var/mob/living/T = M
T.Weaken(5)
T.Weaken(10 SECONDS)
return
..()
@@ -85,15 +85,13 @@
occupant.throw_at(A, 3, propelled)
occupant.apply_effect(6, STUN, 0)
occupant.apply_effect(6, WEAKEN, 0)
occupant.apply_effect(6, STUTTER, 0)
occupant.Weaken(12 SECONDS)
occupant.Stuttering(12 SECONDS)
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
if(istype(A, /mob/living))
var/mob/living/victim = A
victim.apply_effect(6, STUN, 0)
victim.apply_effect(6, WEAKEN, 0)
victim.apply_effect(6, STUTTER, 0)
victim.Weaken(12 SECONDS)
victim.Stuttering(12 SECONDS)
victim.take_organ_damage(10)
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
+4 -4
View File
@@ -93,7 +93,7 @@
/obj/structure/table/attack_hand(mob/living/user)
..()
if(climber)
climber.Weaken(2)
climber.Weaken(4 SECONDS)
climber.visible_message("<span class='warning'>[climber.name] has been knocked off the table", "You've been knocked off the table", "You hear [climber.name] get knocked off the table</span>")
else if(Adjacent(user) && user.pulling && user.pulling.pass_flags & PASSTABLE)
user.Move_Pulled(src)
@@ -141,7 +141,7 @@
/**
* Determines whether a projectile crossing our turf should be stopped.
* Return FALSE to stop the projectile.
*
*
* Arguments:
* * P - The projectile trying to cross.
* * from - Where the projectile is located.
@@ -199,7 +199,7 @@
to_chat(user, "<span class='warning'>You cannot do this there is \a [blocking_object] in the way!</span>")
return FALSE
G.affecting.forceMove(get_turf(src))
G.affecting.Weaken(2)
G.affecting.Weaken(4 SECONDS)
item_placed(G.affecting)
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
@@ -438,7 +438,7 @@
debris -= AM
if(istype(AM, /obj/item/shard))
AM.throw_impact(L)
L.Weaken(5)
L.Weaken(10 SECONDS)
qdel(src)
/obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
@@ -68,20 +68,20 @@
return
for(var/atom/movable/AM in pod)
pod.eject(AM)
if(ismob(AM))
var/mob/M = AM
M.Weaken(5)
if(isliving(AM))
var/mob/living/L = AM
L.Weaken(10 SECONDS)
/obj/structure/transit_tube/station/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/grab) && hatch_state == TRANSIT_TUBE_OPEN)
var/obj/item/grab/G = W
if(ismob(G.affecting) && G.state >= GRAB_AGGRESSIVE)
var/mob/GM = G.affecting
var/mob/living/GM = G.affecting
for(var/obj/structure/transit_tube_pod/pod in loc)
pod.visible_message("<span class='warning'>[user] starts putting [GM] into [pod]!</span>")
if(do_after(user, 30, target = GM) && GM && G && G.affecting == GM)
GM.Weaken(5)
GM.Weaken(10 SECONDS)
Bumped(GM)
qdel(G)
break
+1 -1
View File
@@ -496,7 +496,7 @@
H.lip_style = null //Washes off lipstick
H.lip_color = initial(H.lip_color)
H.regenerate_icons()
user.AdjustDrowsy(-rand(2,3)) //Washing your face wakes you up if you're falling asleep
H.AdjustDrowsy(-rand(4 SECONDS, 6 SECONDS)) //Washing your face wakes you up if you're falling asleep
else
user.clean_blood()
+3 -3
View File
@@ -194,17 +194,17 @@
if(2)
M.visible_message("<span class='danger'>[user] bashes [M] against \the [src]!</span>")
if(prob(50))
M.Weaken(1)
M.Weaken(2 SECONDS)
M.apply_damage(10)
take_damage(25)
if(3)
M.visible_message("<span class='danger'><big>[user] crushes [M] against \the [src]!</big></span>")
M.Weaken(5)
M.Weaken(10 SECONDS)
M.apply_damage(20)
take_damage(50)
if(4)
visible_message("<span class='danger'><big>[user] smashes [M] against \the [src]!</big></span>")
M.Weaken(5)
M.Weaken(10 SECONDS)
M.apply_damage(30)
take_damage(75)
else