mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-26 09:32:21 +00:00
* Nerfs bone wounds to make them less miserable (#61196) So I've always kinda known that bone wounds are unpleasant to receive, but since paying some closer attention to how they affect peoples rounds in the last few months, I've realized that they need to be reigned in some more. So, let's break down the big changes... General bone wound nerfs Limping on a busted leg is now a chance with each step of that leg, instead of always happening: No matter how small the delay added to your move time after each step (like if it was just a dislocation), and even with slings, bone wounds on your leg crippled you with the constant slowdown, because they happened every time you stepped on that leg. Now, the chance to limp on any given step with that leg is higher with worse wounds, and applying a sling to that leg further lowers that chance, as well as lowering the delay from that limp. A dislocated leg, for example, only limps 30% of the time, while a compound fracture limps 70% of the time. Skeletons and plasmamen (aka carbons with no flesh) can now use bone gel directly on cracked limbs to fix them, in 1/4th the time it takes the normal bone gel + surgical tape improvised fix to heal them, and with none of the damage. I felt bad that the ability for skeletons to stick dismembered limbs back into their slots was destroyed because the limbs would be critically wounded already, and still useless. Now, skeletons and plasmamen can be treated with just bone gel and some time. At some point after this is merged, someone should give the pirate ship some free bone gel. The speed of the improvised bone gel + surgical fix for broken bones is even further improved by laying down and by sleeping than it was before, meaning the improvised fixes can be cut down further by laying down for a bit while it works. Makes bone wounds less obnoxious, reducing their ability to single-handedly ruin your round when you suffer one. I want to go further in the future and add an easier improvised fix for hairline fractures soon, but those changes can come later after these are merged. * Nerfs bone wounds to make them less miserable Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
227 lines
7.3 KiB
Plaintext
227 lines
7.3 KiB
Plaintext
|
|
// The shattered remnants of your broken limbs fill you with determination!
|
|
/atom/movable/screen/alert/status_effect/determined
|
|
name = "Determined"
|
|
desc = "The serious wounds you've sustained have put your body into fight-or-flight mode! Now's the time to look for an exit!"
|
|
icon_state = "regenerative_core"
|
|
|
|
/datum/status_effect/determined
|
|
id = "determined"
|
|
alert_type = /atom/movable/screen/alert/status_effect/determined
|
|
|
|
/datum/status_effect/determined/on_apply()
|
|
. = ..()
|
|
owner.visible_message(span_danger("[owner]'s body tenses up noticeably, gritting against [owner.p_their()] pain!"), span_notice("<b>Your senses sharpen as your body tenses up from the wounds you've sustained!</b>"), \
|
|
vision_distance=COMBAT_MESSAGE_RANGE)
|
|
if(ishuman(owner))
|
|
var/mob/living/carbon/human/human_owner = owner
|
|
human_owner.physiology.bleed_mod *= WOUND_DETERMINATION_BLEED_MOD
|
|
|
|
/datum/status_effect/determined/on_remove()
|
|
owner.visible_message(span_danger("[owner]'s body slackens noticeably!"), span_warning("<b>Your adrenaline rush dies off, and the pain from your wounds come aching back in...</b>"), vision_distance=COMBAT_MESSAGE_RANGE)
|
|
if(ishuman(owner))
|
|
var/mob/living/carbon/human/human_owner = owner
|
|
human_owner.physiology.bleed_mod /= WOUND_DETERMINATION_BLEED_MOD
|
|
return ..()
|
|
|
|
/datum/status_effect/limp
|
|
id = "limp"
|
|
status_type = STATUS_EFFECT_REPLACE
|
|
tick_interval = 0
|
|
alert_type = /atom/movable/screen/alert/status_effect/limp
|
|
var/msg_stage = 0//so you dont get the most intense messages immediately
|
|
/// The left leg of the limping person
|
|
var/obj/item/bodypart/l_leg/left
|
|
/// The right leg of the limping person
|
|
var/obj/item/bodypart/r_leg/right
|
|
/// Which leg we're limping with next
|
|
var/obj/item/bodypart/next_leg
|
|
/// How many deciseconds we limp for on the left leg
|
|
var/slowdown_left = 0
|
|
/// How many deciseconds we limp for on the right leg
|
|
var/slowdown_right = 0
|
|
/// The chance we limp with the left leg each step it takes
|
|
var/limp_chance_left = 0
|
|
/// The chance we limp with the right leg each step it takes
|
|
var/limp_chance_right = 0
|
|
|
|
/datum/status_effect/limp/on_apply()
|
|
if(!iscarbon(owner))
|
|
return FALSE
|
|
var/mob/living/carbon/C = owner
|
|
left = C.get_bodypart(BODY_ZONE_L_LEG)
|
|
right = C.get_bodypart(BODY_ZONE_R_LEG)
|
|
update_limp()
|
|
RegisterSignal(C, COMSIG_MOVABLE_MOVED, .proc/check_step)
|
|
RegisterSignal(C, list(COMSIG_CARBON_GAIN_WOUND, COMSIG_CARBON_LOSE_WOUND, COMSIG_CARBON_ATTACH_LIMB, COMSIG_CARBON_REMOVE_LIMB), .proc/update_limp)
|
|
return TRUE
|
|
|
|
/datum/status_effect/limp/on_remove()
|
|
UnregisterSignal(owner, list(COMSIG_MOVABLE_MOVED, COMSIG_CARBON_GAIN_WOUND, COMSIG_CARBON_LOSE_WOUND, COMSIG_CARBON_ATTACH_LIMB, COMSIG_CARBON_REMOVE_LIMB))
|
|
|
|
/atom/movable/screen/alert/status_effect/limp
|
|
name = "Limping"
|
|
desc = "One or more of your legs has been wounded, slowing down steps with that leg! Get it fixed, or at least in a sling of gauze!"
|
|
|
|
/datum/status_effect/limp/proc/check_step(mob/whocares, OldLoc, Dir, forced)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!owner.client || owner.body_position == LYING_DOWN || !owner.has_gravity() || (owner.movement_type & FLYING) || forced || owner.buckled)
|
|
return
|
|
|
|
// less limping while we have determination still
|
|
var/determined_mod = owner.has_status_effect(STATUS_EFFECT_DETERMINED) ? 0.5 : 1
|
|
|
|
if(next_leg == left)
|
|
if(prob(limp_chance_left * determined_mod))
|
|
owner.client.move_delay += slowdown_left * determined_mod
|
|
next_leg = right
|
|
else
|
|
if(prob(limp_chance_right * determined_mod))
|
|
owner.client.move_delay += slowdown_right * determined_mod
|
|
next_leg = left
|
|
|
|
/datum/status_effect/limp/proc/update_limp()
|
|
SIGNAL_HANDLER
|
|
|
|
var/mob/living/carbon/C = owner
|
|
left = C.get_bodypart(BODY_ZONE_L_LEG)
|
|
right = C.get_bodypart(BODY_ZONE_R_LEG)
|
|
|
|
if(!left && !right)
|
|
C.remove_status_effect(src)
|
|
return
|
|
|
|
slowdown_left = 0
|
|
slowdown_right = 0
|
|
limp_chance_left = 0
|
|
limp_chance_right = 0
|
|
|
|
// technically you can have multiple wounds causing limps on the same limb, even if practically only bone wounds cause it in normal gameplay
|
|
if(left)
|
|
for(var/thing in left.wounds)
|
|
var/datum/wound/W = thing
|
|
slowdown_left += W.limp_slowdown
|
|
limp_chance_left = max(limp_chance_left, W.limp_chance)
|
|
|
|
if(right)
|
|
for(var/thing in right.wounds)
|
|
var/datum/wound/W = thing
|
|
slowdown_right += W.limp_slowdown
|
|
limp_chance_right = max(limp_chance_right, W.limp_chance)
|
|
|
|
// this handles losing your leg with the limp and the other one being in good shape as well
|
|
if(!slowdown_left && !slowdown_right)
|
|
C.remove_status_effect(src)
|
|
return
|
|
|
|
|
|
/////////////////////////
|
|
//////// WOUNDS /////////
|
|
/////////////////////////
|
|
|
|
// wound alert
|
|
/atom/movable/screen/alert/status_effect/wound
|
|
name = "Wounded"
|
|
desc = "Your body has sustained serious damage, click here to inspect yourself."
|
|
|
|
/atom/movable/screen/alert/status_effect/wound/Click()
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
|
|
var/mob/living/carbon/carbon_owner = owner
|
|
carbon_owner.check_self_for_injuries()
|
|
|
|
// wound status effect base
|
|
/datum/status_effect/wound
|
|
id = "wound"
|
|
status_type = STATUS_EFFECT_MULTIPLE
|
|
var/obj/item/bodypart/linked_limb
|
|
var/datum/wound/linked_wound
|
|
alert_type = NONE
|
|
|
|
/datum/status_effect/wound/on_creation(mob/living/new_owner, incoming_wound)
|
|
. = ..()
|
|
linked_wound = incoming_wound
|
|
linked_limb = linked_wound.limb
|
|
|
|
/datum/status_effect/wound/on_remove()
|
|
linked_wound = null
|
|
linked_limb = null
|
|
UnregisterSignal(owner, COMSIG_CARBON_LOSE_WOUND)
|
|
|
|
/datum/status_effect/wound/on_apply()
|
|
if(!iscarbon(owner))
|
|
return FALSE
|
|
RegisterSignal(owner, COMSIG_CARBON_LOSE_WOUND, .proc/check_remove)
|
|
return TRUE
|
|
|
|
/// check if the wound getting removed is the wound we're tied to
|
|
/datum/status_effect/wound/proc/check_remove(mob/living/L, datum/wound/W)
|
|
SIGNAL_HANDLER
|
|
|
|
if(W == linked_wound)
|
|
qdel(src)
|
|
|
|
|
|
// bones
|
|
/datum/status_effect/wound/blunt
|
|
|
|
/datum/status_effect/wound/blunt/on_apply()
|
|
. = ..()
|
|
RegisterSignal(owner, COMSIG_MOB_SWAP_HANDS, .proc/on_swap_hands)
|
|
on_swap_hands()
|
|
|
|
/datum/status_effect/wound/blunt/on_remove()
|
|
. = ..()
|
|
UnregisterSignal(owner, COMSIG_MOB_SWAP_HANDS)
|
|
var/mob/living/carbon/wound_owner = owner
|
|
wound_owner.remove_actionspeed_modifier(/datum/actionspeed_modifier/blunt_wound)
|
|
|
|
/datum/status_effect/wound/blunt/proc/on_swap_hands()
|
|
SIGNAL_HANDLER
|
|
|
|
var/mob/living/carbon/wound_owner = owner
|
|
if(wound_owner.get_active_hand() == linked_limb)
|
|
wound_owner.add_actionspeed_modifier(/datum/actionspeed_modifier/blunt_wound, (linked_wound.interaction_efficiency_penalty - 1))
|
|
else
|
|
wound_owner.remove_actionspeed_modifier(/datum/actionspeed_modifier/blunt_wound)
|
|
|
|
/datum/status_effect/wound/blunt/nextmove_modifier()
|
|
var/mob/living/carbon/C = owner
|
|
|
|
if(C.get_active_hand() == linked_limb)
|
|
return linked_wound.interaction_efficiency_penalty
|
|
|
|
return 1
|
|
|
|
// blunt
|
|
/datum/status_effect/wound/blunt/moderate
|
|
id = "disjoint"
|
|
/datum/status_effect/wound/blunt/severe
|
|
id = "hairline"
|
|
/datum/status_effect/wound/blunt/critical
|
|
id = "compound"
|
|
// slash
|
|
/datum/status_effect/wound/slash/moderate
|
|
id = "abrasion"
|
|
/datum/status_effect/wound/slash/severe
|
|
id = "laceration"
|
|
/datum/status_effect/wound/slash/critical
|
|
id = "avulsion"
|
|
// pierce
|
|
/datum/status_effect/wound/pierce/moderate
|
|
id = "breakage"
|
|
/datum/status_effect/wound/pierce/severe
|
|
id = "puncture"
|
|
/datum/status_effect/wound/pierce/critical
|
|
id = "rupture"
|
|
// burns
|
|
/datum/status_effect/wound/burn/moderate
|
|
id = "seconddeg"
|
|
/datum/status_effect/wound/burn/severe
|
|
id = "thirddeg"
|
|
/datum/status_effect/wound/burn/critical
|
|
id = "fourthdeg"
|