mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
[MIRROR] Fixes a consistency issue in which nightmares to heal faster while jaunting and moving (#2075)
* Fixes a consistency issue in which nightmares to heal faster while jaunting and moving (#55134) So basically, shadow jaunt calls a proc to check the light level whenever the shadowing moves and normal processing. This proc forces the shadowing out of the jaunt if the light levels were too high BUT ALSO was the same proc used to heal them while in darkness. This means that the shadowing could heal extremely quickly by moving back and forth while in darkness but only healing at a meager rate whilst being motionless in the darkness. So I separated the proc in two and only called the part that heals on process() as well as upping the damage healed for consistency's sake. * Fixes a consistency issue in which nightmares to heal faster while jaunting and moving Co-authored-by: itseasytosee <55666666+itseasytosee@users.noreply.github.com>
This commit is contained in:
co-authored by
itseasytosee
parent
dc2458653b
commit
f5c51d3f37
@@ -1,3 +1,5 @@
|
||||
#define SHADOW_REGEN_RATE 1.5
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/shadowwalk
|
||||
name = "Shadow Walk"
|
||||
desc = "Grants unlimited movement in darkness."
|
||||
@@ -46,11 +48,16 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/dummy/phased_mob/shadow/process()
|
||||
/obj/effect/dummy/phased_mob/shadow/process(delta_time)
|
||||
var/turf/T = get_turf(src)
|
||||
var/light_amount = T.get_lumcount()
|
||||
if(!jaunter || jaunter.loc != src)
|
||||
qdel(src)
|
||||
if (light_amount < 0.2 && (!QDELETED(jaunter))) //heal in the dark
|
||||
jaunter.heal_overall_damage((SHADOW_REGEN_RATE * delta_time), (SHADOW_REGEN_RATE * delta_time), 0, BODYPART_ORGANIC)
|
||||
check_light_level()
|
||||
|
||||
|
||||
/obj/effect/dummy/phased_mob/shadow/relaymove(mob/living/user, direction)
|
||||
var/turf/oldloc = loc
|
||||
. = ..()
|
||||
@@ -68,8 +75,6 @@
|
||||
var/light_amount = T.get_lumcount()
|
||||
if(light_amount > 0.2) // jaunt ends
|
||||
end_jaunt(TRUE)
|
||||
else if (light_amount < 0.2 && (!QDELETED(jaunter))) //heal in the dark
|
||||
jaunter.heal_overall_damage(1,1, 0, BODYPART_ORGANIC)
|
||||
|
||||
/obj/effect/dummy/phased_mob/shadow/proc/end_jaunt(forced = FALSE)
|
||||
if(jaunter)
|
||||
@@ -79,3 +84,6 @@
|
||||
visible_message("<span class='boldwarning'>[jaunter] emerges from the darkness!</span>")
|
||||
playsound(loc, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1)
|
||||
qdel(src)
|
||||
|
||||
|
||||
#undef SHADOW_REGEN_RATE
|
||||
|
||||
Reference in New Issue
Block a user