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:
@@ -39,6 +39,11 @@
|
||||
|
||||
#define MOVEMENT_DELAY_BUFFER 0.75
|
||||
#define MOVEMENT_DELAY_BUFFER_DELTA 1.25
|
||||
#define CONFUSION_LIGHT_COEFFICIENT 0.15
|
||||
#define CONFUSION_HEAVY_COEFFICIENT 0.075
|
||||
#define CONFUSION_MAX 80 SECONDS
|
||||
|
||||
|
||||
/client/Move(n, direct)
|
||||
if(world.time < move_delay)
|
||||
return
|
||||
@@ -156,17 +161,20 @@
|
||||
M.other_mobs = null
|
||||
M.animate_movement = 2
|
||||
|
||||
else if(mob.confused)
|
||||
var/newdir = 0
|
||||
if(mob.confused > 40)
|
||||
newdir = pick(GLOB.alldirs)
|
||||
else if(prob(mob.confused * 1.5))
|
||||
newdir = angle2dir(dir2angle(direct) + pick(90, -90))
|
||||
else if(prob(mob.confused * 3))
|
||||
newdir = angle2dir(dir2angle(direct) + pick(45, -45))
|
||||
if(newdir)
|
||||
direct = newdir
|
||||
n = get_step(mob, direct)
|
||||
else
|
||||
var/mob/living/L = mob
|
||||
if(L)
|
||||
var/newdir = NONE
|
||||
var/confusion = L.get_confusion()
|
||||
if(confusion > CONFUSION_MAX)
|
||||
newdir = pick(GLOB.alldirs)
|
||||
else if(prob(confusion * CONFUSION_HEAVY_COEFFICIENT))
|
||||
newdir = angle2dir(dir2angle(direct) + pick(90, -90))
|
||||
else if(prob(confusion * CONFUSION_LIGHT_COEFFICIENT))
|
||||
newdir = angle2dir(dir2angle(direct) + pick(45, -45))
|
||||
if(newdir)
|
||||
direct = newdir
|
||||
n = get_step(mob, direct)
|
||||
|
||||
var/prev_pulling_loc = null
|
||||
if(mob.pulling)
|
||||
@@ -199,6 +207,10 @@
|
||||
for(var/obj/O in mob)
|
||||
O.on_mob_move(direct, mob)
|
||||
|
||||
#undef CONFUSION_LIGHT_COEFFICIENT
|
||||
#undef CONFUSION_HEAVY_COEFFICIENT
|
||||
#undef CONFUSION_MAX
|
||||
|
||||
|
||||
/mob/proc/SelfMove(turf/n, direct, movetime)
|
||||
return Move(n, direct, movetime)
|
||||
|
||||
Reference in New Issue
Block a user