[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
+7 -7
View File
@@ -23,7 +23,7 @@
/obj/item/flash/proc/clown_check(mob/user)
if(user && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
flash_carbon(user, user, 15, 0)
flash_carbon(user, user, 30 SECONDS, 0)
return 0
return 1
@@ -86,14 +86,14 @@
return TRUE
/obj/item/flash/proc/flash_carbon(mob/living/carbon/M, mob/user = null, power = 5, targeted = 1)
/obj/item/flash/proc/flash_carbon(mob/living/carbon/M, mob/user = null, power = 10 SECONDS, targeted = 1)
if(user)
add_attack_logs(user, M, "Flashed with [src]")
if(targeted)
if(M.flash_eyes(1, 1))
M.AdjustConfused(power)
terrible_conversion_proc(M, user)
M.Stun(1)
M.Stun(2 SECONDS)
visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
to_chat(user, "<span class='danger'>You blind [M] with the flash!</span>")
to_chat(M, "<span class='userdanger'>[user] blinds you with the flash!</span>")
@@ -110,7 +110,7 @@
if(!try_use_flash(user))
return 0
if(iscarbon(M))
flash_carbon(M, user, 5, 1)
flash_carbon(M, user, 10 SECONDS, 1)
if(overcharged)
M.adjust_fire_stacks(6)
M.IgniteMob()
@@ -119,7 +119,7 @@
else if(issilicon(M))
add_attack_logs(user, M, "Flashed with [src]")
if(M.flash_eyes(affect_silicon = 1))
M.Weaken(rand(4, 6))
M.Weaken(rand(8 SECONDS, 12 SECONDS))
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with [src]!</span>", "<span class='danger'>You overload [M]'s sensors with [src]!</span>")
return 1
user.visible_message("<span class='disarm'>[user] fails to blind [M] with [src]!</span>", "<span class='warning'>You fail to blind [M] with [src]!</span>")
@@ -130,14 +130,14 @@
return 0
user.visible_message("<span class='disarm'>[user]'s [src] emits a blinding light!</span>", "<span class='danger'>Your [src] emits a blinding light!</span>")
for(var/mob/living/carbon/M in oviewers(3, null))
flash_carbon(M, user, 3, 0)
flash_carbon(M, user, 6 SECONDS, 0)
/obj/item/flash/emp_act(severity)
if(!try_use_flash())
return 0
for(var/mob/living/carbon/M in viewers(3, null))
flash_carbon(M, null, 10, 0)
flash_carbon(M, null, 20 SECONDS, 0)
burn_out()
..()
@@ -63,10 +63,9 @@
else
to_chat(user, "<span class='danger'>[H] doesn't respond!</span>")
H.AdjustParalysis(3)
H.AdjustStunned(5)
H.AdjustWeakened(5)
H.AdjustStuttering(10)
H.AdjustParalysis(6 SECONDS)
H.AdjustWeakened(10 SECONDS)
H.AdjustStuttering(20 SECONDS)
to_chat(H, "<span class='danger'>You feel a powerful jolt!</span>")
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK, 100)
@@ -118,7 +118,7 @@
//20% chance to actually hit the sensors
if(prob(effectchance * diode.rating))
S.flash_eyes(affect_silicon = 1)
S.Weaken(rand(5,10))
S.Weaken(rand(10 SECONDS, 20 SECONDS))
to_chat(S, "<span class='warning'>Your sensors were overloaded by a laser!</span>")
outmsg = "<span class='notice'>You overload [S] by shining [src] at [S.p_their()] sensors.</span>"
@@ -57,8 +57,8 @@
if(!signal || signal.encryption != code)
return
if(ismob(loc) && on)
var/mob/M = loc
if(isliving(loc) && on)
var/mob/living/M = loc
var/turf/T = M.loc
if(istype(T, /turf))
if(!M.moved_recently && M.last_move)
@@ -70,7 +70,7 @@
to_chat(M, "<span class='danger'>You feel a sharp shock!</span>")
do_sparks(3, 1, M)
M.Weaken(5)
M.Weaken(10 SECONDS)
if(master)
master.receive_signal()
+2 -2
View File
@@ -543,7 +543,7 @@ REAGENT SCANNER
materials = list(MAT_METAL=30, MAT_GLASS=20)
/obj/item/slime_scanner/attack(mob/living/M, mob/living/user)
if(user.incapacitated() || user.eye_blind)
if(user.incapacitated() || user.AmountBlinded())
return
if(!isslime(M))
to_chat(user, "<span class='warning'>This device can only scan slimes!</span>")
@@ -749,7 +749,7 @@ REAGENT SCANNER
extra_font = (target.getBrainLoss() < 1 ?"<font color='blue'>" : "<font color='red'>")
dat += "[extra_font]\tApprox. Brain Damage %: [target.getBrainLoss()]<br>"
dat += "Paralysis Summary %: [target.paralysis] ([round(target.paralysis / 4)] seconds left!)<br>"
dat += "Paralysis Summary %: [target.IsParalyzed()] ([round(target.AmountParalyzed() / 10)] seconds left!)<br>"
dat += "Body Temperature: [target.bodytemperature-T0C]&deg;C ([target.bodytemperature*1.8-459.67]&deg;F)<br>"
dat += "<hr>"
@@ -108,7 +108,7 @@
if(mytape && recording)
var/ending = copytext(msg, length(msg))
mytape.timestamp += mytape.used_capacity
if(M.stuttering)
if(M.AmountStuttering())
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [M.name] stammers, \"[msg]\""
return
if(M.getBrainLoss() >= 60)
@@ -40,7 +40,7 @@
spawn((wavelength+(intensity*4))*10)
if(M)
if(intensity >= 5)
M.apply_effect(round(intensity/1.5), PARALYZE)
M.Paralyse(intensity * 40/3)
M.rad_act(intensity * 10)
else
to_chat(user, "<span class='warning'>The radioactive microlaser is still recharging.</span>")
@@ -292,8 +292,7 @@
/obj/item/teleporter/proc/telefrag(turf/fragging_location, mob/user)
for(var/mob/living/M in fragging_location)//Hit everything in the turf
M.apply_damage(20, BRUTE)
M.Stun(3)
M.Weaken(3)
M.Weaken(6 SECONDS)
to_chat(M, "<span_class='warning'>[user] teleports into you, knocking you to the floor with the bluespace wave!</span>")
/obj/item/paper/teleporter