Skip to content

Commit

Permalink
Reduces the chance of getting hurt from a broken bone if one is walki…
Browse files Browse the repository at this point in the history
…ng (#3996)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

This PR reduces the probability to cause damage to a player from 5% per
tile walked to 1% per tile walked if the player is in the walk intent
mode. If they are in the run intent mode, the probability remains at 5%.

## Why It's Good For The Game

I thought it might be a little flavorful to have it so that the chance
to get hurt from a broken bone is reduced if one is walking instead of
running, as it would imply that a character is attempting to avoid
jostling their broken bone(s) around. I'm not sure if the probabilities
should be tweaked a little, however.

## Changelog

:cl:
balance: The bone breakage damage proc now depends on the movement
intent of a carbon. Walking reduces the proc call probability
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Signed-off-by: zimon9 <122945887+zimon9@users.noreply.github.com>
Co-authored-by: Theos <theubernyan@gmail.com>
  • Loading branch information
zimon9 and SomeguyManperson authored Jan 20, 2025
1 parent 5e573e2 commit 9fbf4dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/modules/surgery/bodyparts/bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@
if(bone_status != BONE_FLAG_BROKEN || !owner || istype(owner?.buckled, /obj/structure/bed/roller))
return

if(prob(5))
if(prob(owner.m_intent == MOVE_INTENT_RUN ? 5 : 1))
if(HAS_TRAIT(owner, TRAIT_ANALGESIA))
to_chat(owner, span_notice("[pick("You feel something shifting inside your [name].", "There is something moving inside [name].", "Something inside your [name] slips.")]"))
else
Expand Down

0 comments on commit 9fbf4dd

Please sign in to comment.