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

Take the brunt of grenade and pipebomb explosions by laying on top and blocking #15855

Merged
merged 15 commits into from Oct 17, 2023

Conversation

pgmzeta
Copy link
Contributor

@pgmzeta pgmzeta commented Sep 16, 2023

About the PR

When grenades and pipe-bombs detonate, add the following:

  1. If the explosive is directly on a tile (e.g. not in a closet)
  2. Get a list of human mobs on the same tile and filter them
    a. is directly laying down on the same tile
    b. has 'blocking' status effect from resisting (press z)
  3. Pick one of the matching mobs

The hero receives a more direct personal effect from the explosive, but the world impact is limited in some way. Each explosive has a different effect depending on what it does. Note that for grenades not nullified, the remainder of the detonation will still occur directly under the hero.

Effects

old_grenade/spawner/wasp

Hero: Gibbed (by mass wasp implantation)
Grenade: Nullified (but some will explode out of you)

old_grenade/graviton

Hero: Takes massive (suicide-level) chest crunch damage
Grenade: Half range

old_grenade/stinger & old_grenade/stinger/frag

Hero: Half of the projectiles (10) hit you directly
Grenade: Quarter of the projectiles (5) are still flung out

old_grenade/high_explosive

Hero: Take direct explosion
Grenade: Half power

old_grenade/sonic

Hero: Take direct ear damage
Grenade: Half power

old_grenade/emp

Hero: All organs are EMPed
Grenade: Half range

gimmickbomb/owlclothes & gimmickbomb/hotdog

Hero: Dressed up in completely unremovable clothes
Grenade: Nullified

pipebomb/bomb

Strength
Hero: Throw chest organs out. Over 9 power guarantee gibs. Still at center of reduced explosion.
Grenade: reduce power by one quarter, max reduction of three. This means after 12 initial power, the max reduction is 3.
Power reduction calculator: https://www.desmos.com/calculator/hqdqnv5zcy

Various pipe-bomb customizations e.g. power cells are also applied to the hero before lowering their overall effectiveness.

Why's this needed?

TODOs

  • find a better way to convey 'diving' onto an explosive
  • implement on more explosives because it really sucks to try and fail
  • feedback
  • tinker with balancing / tuning

Changelog

(u)glowbold
(*)Play hero by laying down and blocking on top of live hand grenades and pipebombs.

@github-actions github-actions bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 16, 2023
@pgmzeta pgmzeta added C-Feature A new feature or enhancements to existing features C-Balance Balance changes, buffs and nerfs A-Player-Actions Relating to direct player actions, e.g. emotes, special attacks, abilities labels Sep 16, 2023
@Sbmhawk
Copy link
Contributor

Sbmhawk commented Sep 16, 2023

I would say not gibbing outright, but ruining organs in the chest area, and a lot of damage, would be better.

(At the very least, for stinger nades)

@Sbmhawk
Copy link
Contributor

Sbmhawk commented Sep 16, 2023

Also, I haven't looked at the code, but I would make sure that throwing a nade on a stunned person (or vice versa) does NOT trigger this

@pgmzeta
Copy link
Contributor Author

pgmzeta commented Sep 16, 2023

Also, I haven't looked at the code, but I would make sure that throwing a nade on a stunned person (or vice versa) does NOT trigger this

yep, considered this - you have to be pulling the active grenade and be lying down on the same tile.

@Absolute-Baller
Copy link

I'm sorta just spitballing and imnotcoder so this might be completely off-base or unfeasible, but I imagine a more robust system would be a general explosion-power reduction feature. It could be something like: when laying down on top of a tile where an explosion is occurring, you eat up to [x] explosion power, and it gets applied to you in the form of brute damage or whatever. Some damage still always occurs, but just enough to show that an explosion happened. Then, if the power of the explosion exceeds [x], you eat [x] explosion power, gib, and the rest of the explosion power gets applied to the explosion.

@M-Earthfire
Copy link
Contributor

M-Earthfire commented Sep 16, 2023

I geniuly believe it should gib you. Making a heroic sacrifice snd surviving it feels extremly anticlimatic. Also, i see people diving on bp pipebombs to not gib if we don't make it this way, which would be misuse, given the intention to protect others, not yourself.

Throwing yourself on a gibbing bomb should gib you, at least.

@Glamurio
Copy link
Contributor

Didn't check all of the code, but how does this interact with gimmick grenades? I don't want people gibbed for banana or owlbombs. Perhaps in the case of owlbombs they can turn into an actual owl critter (concentrated effect).

@pgmzeta pgmzeta changed the title 'diving' on grenades reduces their overall impact but gibs you 'diving' on grenades reduces their overall impact at a great personal cost Sep 16, 2023
@pgmzeta
Copy link
Contributor Author

pgmzeta commented Sep 16, 2023

Didn't check all of the code, but how does this interact with gimmick grenades? I don't want people gibbed for banana or owlbombs. Perhaps in the case of owlbombs they can turn into an actual owl critter (concentrated effect).

owlbomb/hotdogbomb only force-clothe the 'sacrifice', and my plan for the future is to make the clothing completely irremovable if you dive on those two grenades specifically.

the other gimmick grenades do not call this and have no effect.

@pgmzeta pgmzeta changed the title 'diving' on grenades reduces their overall impact at a great personal cost 'diving' on grenades reduces impact at a great personal cost Sep 16, 2023
@TDHooligan
Copy link
Contributor

TDHooligan commented Sep 17, 2023

could also have slide (resist + throw) be a shorthand for this that doesnt require the aiming of grab + move + lie.

as an aside, there are plenty of sane reasons to do this and not expect to be gibbed. i dont think it makes sense for someone in an EOD suit to get gibbered lying atop a grenade.
simply hitting the poor sod with every bit of shrapnel (and possibly boosting said shrapnel) is a pretty steep cost. for an action that's not likely to be done except explicitly to suicide.

if you are REALLY keen on exploding people, you could just do a health check after and gib based on that?

@pgmzeta
Copy link
Contributor Author

pgmzeta commented Sep 17, 2023

for an action that's not likely to be done except explicitly to suicide.

in retrospect making these custom suicides feels like an obvious solution. update soon

@pgmzeta pgmzeta marked this pull request as draft September 17, 2023 18:41
@github-actions github-actions bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 19, 2023
@pgmzeta pgmzeta changed the title 'diving' on grenades reduces impact at a great personal cost curl up around item explosives by laying down and blocking Sep 19, 2023
@pgmzeta pgmzeta changed the title curl up around item explosives by laying down and blocking curl up around item explosives by laying down and blocking , reducing their impact to others Sep 19, 2023
@pgmzeta pgmzeta changed the title curl up around item explosives by laying down and blocking , reducing their impact to others Take the brunt of item explosions by laying on top and blocking Sep 19, 2023
@pgmzeta pgmzeta marked this pull request as ready for review September 19, 2023 06:51
@pgmzeta
Copy link
Contributor Author

pgmzeta commented Sep 19, 2023

Rather major change in approach; please see the updated PR description.

Copy link
Member

@Tarmunora Tarmunora left a comment

Choose a reason for hiding this comment

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

Interesting idea but I'm feeling like it (further) complicates explosion code while also not affecting the majority of actual grenades (stinger/frag grenade projectiles come to mind).

code/mob/living/carbon/human/procs/damage.dm Outdated Show resolved Hide resolved
code/datums/controllers/explosion_controls.dm Outdated Show resolved Hide resolved
@pgmzeta
Copy link
Contributor Author

pgmzeta commented Sep 25, 2023

Interesting idea but I'm feeling like it (further) complicates explosion code while also not affecting the majority of actual grenades (stinger/frag grenade projectiles come to mind).

Thank you for the feedback - I'll work on integrating this and the previous eat-shrapnel implementation. Agreed on adding explosion complexity, but I am worried that it will be frustrating to dive on an explosive and have nothing come of it just depending on the bomb type. Don't mind cutting it if others don't think that's a valid concern.

@Tarmunora
Copy link
Member

... I am worried that it will be frustrating to dive on an explosive and have nothing come of it just depending on the bomb type...

I think having a system that explicitly covers only pipebombs and some grenades would cover most people's expectations fairly well, for what it's worth

@github-actions github-actions bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 25, 2023
@pgmzeta pgmzeta changed the title Take the brunt of item explosions by laying on top and blocking Take the brunt of grenade and pipebomb explosions by laying on top and blocking Sep 25, 2023
@github-actions
Copy link
Contributor

This PR has been inactive for two weeks, and has been automatically marked as stale. This means it is at risk of being auto closed in another week. Please address any outstanding review items and ensure your PR is finished. If you are auto-staled anyway, ask developers if your PR will be merged. Once you have done any of the previous actions then you should request a developer remove the stale label on your PR, to reset the stale timer. If you feel no developer will respond in that time, you may wish to close this PR youself, while you seek developer comment, as you will then be able to reopen the PR yourself.

@github-actions github-actions bot added the S-Stale An inactive PR that has had no updates in the past two weeks label Oct 11, 2023
Copy link
Member

@Tarmunora Tarmunora left a comment

Choose a reason for hiding this comment

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

oops i forgot about this PR

code/obj/item/grenades.dm Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the S-Stale An inactive PR that has had no updates in the past two weeks label Oct 12, 2023
@Tarmunora Tarmunora merged commit 6e6c227 into goonstation:master Oct 17, 2023
22 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Player-Actions Relating to direct player actions, e.g. emotes, special attacks, abilities C-Balance Balance changes, buffs and nerfs C-Feature A new feature or enhancements to existing features size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants