Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduces the chance for grenades to go off in your hands #3441

Merged
merged 10 commits into from
Oct 15, 2024

Conversation

zimon9
Copy link
Contributor

@zimon9 zimon9 commented Sep 26, 2024

About The Pull Request

This change reduces the probability of a grenade blowing up in one's hands from 15% down to 5%.

Please let me know if this probability is too low. I just chose an oddball low number to use.

The check was also modified so that the dice roll is only made if a projectile hits a hand holding a grenade.

Why It's Good For The Game

It always felt a little too high of a chance to me. The probability roll happens for each projectile that one gets hit with, and with how often and how rapidly one can be hit in a firefight here, the chance of it blowing up in ones hands goes from being somewhat unlikely to being more likely to happen than not.

image
This calculator gives the probability of the event occurring as being 68% likely, if one were shot 7 times. This is around how many shots it takes to bring someone down, on average, from my anecdotal experience.

This currently has the effect of making grenades useful in only a few very specific scenarios.

If the probability of this were to go down, it would encourage the use of grenades more, which I feel can enhance fights.

Changelog

🆑
balance: rebalanced the probability of a grenade going off in one's hands
/:cl:

@github-actions github-actions bot added the Code change Watch something violently break. label Sep 26, 2024
@@ -150,7 +150,7 @@

/obj/item/grenade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
var/obj/projectile/P = hitby
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(1) && prob(50))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(1) && prob(50))
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(0.5))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, thank you! I wasn't sure if the argument only took integers or if it took floats, so I just did it like this to ensure that it worked. I'll fix this, thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The modification should be complete now

@Apogee-dev
Copy link
Contributor

Honestly this should just be a chance that rolls for each projectile that hits that specific arm rather than the player in general. 15% would make a lot more sense if that were the case.

@zimon9
Copy link
Contributor Author

zimon9 commented Sep 27, 2024

I'll try and implement that. I will say, however, I'd prefer if the probability were still reduced down to, say, 2-5% even with this change, as bullets can hit limbs just from natural spread, and with the current probability calculation, the chance of it going off would still be fairly high, if it were kept at 15%.

@zimon9 zimon9 marked this pull request as draft September 27, 2024 06:11
@zimon9 zimon9 marked this pull request as ready for review October 11, 2024 01:44
@zimon9
Copy link
Contributor Author

zimon9 commented Oct 11, 2024

Honestly this should just be a chance that rolls for each projectile that hits that specific arm rather than the player in general. 15% would make a lot more sense if that were the case.

I've implemented a check to see if a projectile hits an arm holding a grenade, and I also set the probability to 5% for this. Please let me know if this looks okay? Thank you.

@rye-rice rye-rice dismissed FalloutFalcon’s stale review October 15, 2024 11:06

single change fixed

@rye-rice rye-rice added this pull request to the merge queue Oct 15, 2024
Merged via the queue into shiptest-ss13:master with commit de9fb7a Oct 15, 2024
14 checks passed
zimon9 added a commit to zimon9/Shiptest-PR-testing that referenced this pull request Oct 29, 2024
…3#3441)

<!-- 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 change reduces the probability of a grenade blowing up in one's
hands from 15% down to 5%.

Please let me know if this probability is too low. I just chose an
oddball low number to use.

The check was also modified so that the dice roll is only made if a
projectile hits a hand holding a grenade.

## Why It's Good For The Game

It always felt a little too high of a chance to me. The probability roll
happens for _each_ projectile that one gets hit with, and with how often
and how rapidly one can be hit in a firefight here, the chance of it
blowing up in ones hands goes from being somewhat unlikely to being more
likely to happen than not.


![image](https://github.com/user-attachments/assets/4a88545b-768d-480d-b8a1-38df915e1ea2)
This calculator gives the probability of the event occurring as being
68% likely, if one were shot 7 times. This is around how many shots it
takes to bring someone down, on average, from my anecdotal experience.

This currently has the effect of making grenades useful in only a few
very specific scenarios.

If the probability of this were to go down, it would encourage the use
of grenades more, which I feel can enhance fights.

## Changelog

:cl:
balance: rebalanced the probability of a grenade going off in one's
hands
/: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. -->
zimon9 pushed a commit to zimon9/Shiptest-PR-testing that referenced this pull request Oct 29, 2024
MrCat15352 pushed a commit to MrCat15352/MrCat that referenced this pull request Dec 27, 2024
…3#3441)

<!-- 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 change reduces the probability of a grenade blowing up in one's
hands from 15% down to 5%.

Please let me know if this probability is too low. I just chose an
oddball low number to use.

The check was also modified so that the dice roll is only made if a
projectile hits a hand holding a grenade.

## Why It's Good For The Game

It always felt a little too high of a chance to me. The probability roll
happens for _each_ projectile that one gets hit with, and with how often
and how rapidly one can be hit in a firefight here, the chance of it
blowing up in ones hands goes from being somewhat unlikely to being more
likely to happen than not.


![image](https://github.com/user-attachments/assets/4a88545b-768d-480d-b8a1-38df915e1ea2)
This calculator gives the probability of the event occurring as being
68% likely, if one were shot 7 times. This is around how many shots it
takes to bring someone down, on average, from my anecdotal experience.

This currently has the effect of making grenades useful in only a few
very specific scenarios.

If the probability of this were to go down, it would encourage the use
of grenades more, which I feel can enhance fights.

## Changelog

:cl:
balance: rebalanced the probability of a grenade going off in one's
hands
/: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. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code change Watch something violently break.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants