Skip to content
15 changes: 11 additions & 4 deletions modular_darkpack/modules/jumping/code/jumper_component.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
#define JUMP_SLOWDOWN_MULT 1.6 // 1.5 means a jumping character and a walking character will keep pace. Increase to slow jumpers further.
#define BASE_JUMP_DISTANCE 1
#define MAX_JUMP_DISTANCE 6
#define JUMP_BOOM_COOLDOWN 2 SECONDS //CRIMSON GRID ADDITION - Reworks the implimentation of stun jumps

/datum/component/jumper
COOLDOWN_DECLARE(jump_cooldown)
COOLDOWN_DECLARE(jump_boom_cooldown) //CRMISON GRID ADDITION - Reworks the implimentation of stun jumps
var/prepared_to_jump = FALSE

/datum/component/jumper/Initialize()
Expand Down Expand Up @@ -117,15 +119,18 @@
adjusted_target = locate(jumper.loc.x + round(dx * scale), jumper.loc.y + round(dy * scale), jumper.loc.z)

playsound(jumper.loc, 'modular_darkpack/modules/jumping/sounds/jump_neutral.ogg', 50, TRUE)

if(jumper.combat_mode && get_dist(jumper.loc, target) <= 3 && strength >= 8)
addtimer(CALLBACK(src, PROC_REF(jump_boom), jumper),(distance * 0.5))
//CRIMSON GRID EDIT START - fixes jump stun flaking out at max distance and actually triggering proper
if(jumper.combat_mode && distance <= adjusted_jump_range && strength >= 8 && COOLDOWN_FINISHED(src, jump_boom_cooldown))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using distance <= adjusted_jump_range instead of get_dist(jumper.loc, target) <= 3 actually makes jump stuns stronger. a char with high strength/athletics can have as high a range as 6 where as before it didn't proceed if <= 3.

	var/adjusted_jump_range = clamp((BASE_JUMP_DISTANCE + 0.75 + max(0,(strength -1)) * 0.5 + athletics), 1, 6)

i know the mood is largely that this jump stun shit should be nerfed. did you intend to buff it here?

@Wolf-751 Wolf-751 Sep 2, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intended it to adjust for the distance itself being increased with the internal increase of the jump, apparently the more strength you had the further the distance you traveled and it wasn't calculating that increased distance with the stun jumping stomp, I assumed this was the correct calculation that added to the distance given by increased strength to make the jump stun capable of activating from the new distance recalculated by the increases, I did not think it was not an intended mechanic for it to be set at a maximum of 3 only and thought this was closer to a bug fix.

COOLDOWN_START(src, jump_boom_cooldown, JUMP_BOOM_COOLDOWN) //CRIMSON GRID ADDITION - adds an internal cooldown to fix jump misfires
Comment thread
Wolf-751 marked this conversation as resolved.
Outdated
addtimer(CALLBACK(src, PROC_REF(jump_boom), jumper), (get_dist(jumper.loc, adjusted_target) * 0.5))
//CRIMSON GRID EDIT END
jumper.visible_message(span_danger("[jumper] takes a mighty leap that shatters \the [adjusted_target] where they land!"))
jumper.adjust_stamina_loss(20)
else
jumper.adjust_stamina_loss(10)
jumper.visible_message(span_danger("[jumper] jumps towards [adjusted_target]."))


Comment thread
chazzyjazzy marked this conversation as resolved.
Outdated
var/turf/start_T = get_turf(jumper.loc) //Get the start and target tile for the descriptors
var/turf/end_T = get_turf(adjusted_target)
if(start_T && end_T)
Expand All @@ -148,10 +153,11 @@
/datum/component/jumper/proc/jump_boom(mob/living/jumper)
playsound(get_turf(jumper), 'modular_darkpack/modules/jumping/sounds/jump_slam.ogg', 40, FALSE)
new /obj/effect/temp_visual/dir_setting/crack_effect(get_turf(jumper))
for(var/mob/living/shaken_person in range(5, jumper))
for(var/mob/living/shaken_person in range(2, jumper)) //CRIMSON GRID EDIT - Reworks the Implimentation of stun jumps - Original: for(var/mob/living/shaken_person in range(5, jumper))
if(shaken_person == jumper)
continue
shaken_person.Stun(20)
shaken_person.do_stagger_animation(60) //CRIMSON GRID ADDITION - Reworks the implimentation of stun jumps
var/distance = get_dist(shaken_person, jumper)
shake_camera(shaken_person, max(6-distance), max(4-distance, 1))
jumper.Stun(10)
Expand All @@ -165,3 +171,4 @@
#undef JUMP_WINDUP
#undef BASE_JUMP_DISTANCE
#undef MAX_JUMP_DISTANCE
#undef JUMP_BOOM_COOLDOWN //CRIMSON GRID ADDITION - Reworks the implimentation of stun jumps
Loading