Skip to content

Commit

Permalink
Tones down super rage shake radius + tiny refactor (#13724)
Browse files Browse the repository at this point in the history
* Tones down super rage shake radius + tiny refactor

* Let this affect xenos too to preserve functionality
  • Loading branch information
ivanmixo authored Aug 9, 2023
1 parent 0d88ccd commit 96a84df
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,15 @@

///Warns the player when Endure is about to end
/datum/action/xeno_action/endure/proc/endure_warning()
if(QDELETED(owner))
return
to_chat(owner,span_highdanger("We feel the plasma draining from our veins... [ability_name] will last for only [timeleft(endure_duration) * 0.1] more seconds!"))
owner.playsound_local(owner, 'sound/voice/hiss4.ogg', 50, 0, 1)

///Turns off the Endure buff
/datum/action/xeno_action/endure/proc/endure_deactivate()
if(QDELETED(owner))
return
var/mob/living/carbon/xenomorph/X = owner

UnregisterSignal(X, COMSIG_XENOMORPH_BRUTE_DAMAGE)
Expand Down Expand Up @@ -367,20 +371,19 @@
ravage.clear_cooldown() //Reset ravage cooldown
RegisterSignal(X, COMSIG_XENOMORPH_ATTACK_LIVING, PROC_REF(drain_slash))

for(var/turf/affected_tiles AS in RANGE_TURFS(rage_power_radius, X.loc))
for(var/turf/affected_tiles AS in RANGE_TURFS(rage_power_radius / 2, X.loc))
affected_tiles.Shake(duration = 1 SECONDS) //SFX

for(var/mob/living/L AS in GLOB.mob_living_list) //Roar that applies cool SFX
if(L.stat == DEAD || !L.hud_used || (get_dist(L, X) > rage_power_radius)) //We don't care about the dead
for(var/mob/living/affected_mob in cheap_get_humans_near(X, rage_power_radius) + cheap_get_xenos_near(X, rage_power_radius)) //Roar that applies cool SFX
if(affected_mob.stat) //We don't care about the dead/unconsious
continue

shake_camera(L, 1 SECONDS, 1)
L.Shake(duration = 1 SECONDS) //SFX
shake_camera(affected_mob, 1 SECONDS, 1)
affected_mob.Shake(duration = 1 SECONDS) //SFX

if(rage_power >= RAVAGER_RAGE_SUPER_RAGE_THRESHOLD) //If we're super pissed it's time to get crazy

var/atom/movable/screen/plane_master/floor/OT = L.hud_used.plane_masters["[FLOOR_PLANE]"]
var/atom/movable/screen/plane_master/game_world/GW = L.hud_used.plane_masters["[GAME_PLANE]"]
var/atom/movable/screen/plane_master/floor/OT = affected_mob.hud_used.plane_masters["[FLOOR_PLANE]"]
var/atom/movable/screen/plane_master/game_world/GW = affected_mob.hud_used.plane_masters["[GAME_PLANE]"]

addtimer(CALLBACK(OT, TYPE_PROC_REF(/atom, remove_filter), "rage_outcry"), 1 SECONDS)
GW.add_filter("rage_outcry", 2, radial_blur_filter(0.07))
Expand Down Expand Up @@ -417,6 +420,8 @@

///Warns the user when his rage is about to end.
/datum/action/xeno_action/rage/proc/rage_warning(bonus_duration = 0)
if(QDELETED(owner))
return
to_chat(owner,span_highdanger("Our rage begins to subside... [ability_name] will only last for only [(RAVAGER_RAGE_DURATION + bonus_duration) * (1-RAVAGER_RAGE_WARNING) * 0.1] more seconds!"))
owner.playsound_local(owner, 'sound/voice/hiss4.ogg', 50, 0, 1)

Expand Down Expand Up @@ -449,7 +454,8 @@

///Called when we want to end the Rage effect
/datum/action/xeno_action/rage/proc/rage_deactivate()

if(QDELETED(owner))
return
var/mob/living/carbon/xenomorph/X = owner

X.do_jitter_animation(1000)
Expand Down

0 comments on commit 96a84df

Please sign in to comment.