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

Create splash attacks and give them to Boomers #71964

Merged
merged 28 commits into from
Mar 1, 2024

Conversation

worm-girl
Copy link
Contributor

@worm-girl worm-girl commented Feb 25, 2024

Summary

Features "Creates functionality for liquid attacks and moves boomer bile to use it"

Purpose of change

Split from #71584

A lot of monsters attack the player by splashing liquid on them, but these attacks didn't really take gear into account very well. #69555 took steps to fix that by checking overall wetness protection, but given that our two main liquid attacks are bile (which should be able to make worn items filthy) and acid (which should be able to damage them), it would be better to have a system that could check worn items layer-by-layer.

Describe the solution

Adds splash_attack()
Any spell with the LIQUID flag is a splash attack, and will try to apply its effects to characters by getting on their skin/eyes/mouth. LIQUID spells that hit a body part check the coverage of each layer of armor, from the outside in, and are deflected or soak through according to that item's coverage and breathability. LIQUID spells have a liquid_volume defined in their json, and their effectiveness potentially decreases as each layer of armor reduces the remaining volume in turn.

Adds the DODGEABLE spell flag
DODGEABLE spells can be completely dodged by characters and monsters in the usual way, using the spell's level and accuracy. If a spell has this flag, this replaces the previous behavior where up to 2/3 of the damage could be avoided thanks to the character's blocking and dodging ability. It does not affect the further 1/3 that can be shaved off by spell resistance.

Adds max_dodge_training to spells
Dodging spells trains dodge as normal. If it is not appropriate for an attack to teach past a certain rank (as was previously done with boomer bile), spell jsons can now hold define what they should teach to instead.

Boomers and huge boomers now use bile_spew

  • Boomers and huge boomers now use splash_attack to vomit bile. They cast the same spell, but huge boomers cast it at a higher level with greater range, frequency, and fluid volume. Boomer gluttons use a different attack which was already a spell, and are mostly unchanged.
  • If the player dodges, nothing happens.
  • If the player is underwater, nothing happens. The boomer will not try to use the attack while it is underwater.
  • If the player is hit, the attack targets a random body part and rolls against coverage for every item worn on that body part.
  • Bile can make clothes filthy, see Additional Context for percentages.
  • If bile reaches your skin, it reacts with your sweat to make your scent much stronger for a short time. This makes boomers perform more like you may be used to in Left 4 Dead. Most of the early game zombies can't track by scent, so this is an effect that will become more dangerous later in the cataclysm.
  • CHLOROMORPH changes your scent category (afaik it's the only mutation that does this) so that you smell like a plant. Boomer bile doesn't react with plant stink, so chloromorphs are immune to the stinkening.
  • If bile gets in your eyes, it functions as above and also blinds you and risks conjunctivitis, as it does now.
  • Both effects are very minorly bad for your lifestyle score. It's corpse bile, wear PPE! Every second that you have the effect, you have a 0.3% chance to lose one lifestyle point, giving you around a 10% chance to lose a lifestyle point if you've got the effect for the full 30 seconds. This is per body part, so having bile on multiple parts is multiplicative. Saprovores, Saprophages, and Eaters of the Dead are immune to this part of the effect.
  • The death explosion for boomers, huge boomers, and boomer gluttons splashes bile as if using a one level higher version of their bile spew attack on everything caught in the radius.
  • This changes boomers up a bit in terms of gameplay: their slippery bile presents an immediate hazard, but has more insidious long-term effects on your mood and lifestyle score. They continue to serve as a force multiplier for other zombies, especially since they can now help them track the player character by scent.
  • Splash attacks provide clear feedback in the message logs, explaining which items are hit and by how much liquid. This should help players easily understand the mechanic.
  • Monsters do not have equipment, and so splash attacks against them are currently resolved as normal spells, though they are able to dodge the splash.

Describe alternatives you've considered

Right now, boomers just hit a random BP which can include the eyes, and getting hit in the eyes causes the boomer blindness effect. They ought to be targeting eyes specifically, even if that's not where they always wind up hitting, and the easiest way to get that would be to give them a second spell that aims specifically for the eyes. I'd like to do that with an RNG condition, but I need to wait on #71956 to be merged, and this PR is probably big enough already.

In the future, the messaging to be a bit more descriptive regarding the breathability of items which are hit. Right now it says something like "The rain poncho is splashed with a glob of liquid!". It might be nice if a 0 breathability item read like "The rain poncho partially deflects a splashed glob of liquid!" and "A glob of liquid splashes against the faux fur trenchcoat, partially soaking through!" This would explain to players that their 0 breathability poncho is better at protecting them than their 30 breathability trenchcoat, but this would require a bit more jiu-jutsu than the strings are currently doing and seems out of scope for now.

Splashes currently only hit one body part. I would like to add support for very large amounts of fluid (say 200 and above) to automatically split the attack across multiple body parts. No attack currently splashes this much fluid, but that might be an appropriate consequence of, say, standing next to an exploding boomer glutton.

Waterproof items should be easier to wash.

The player should be able to wash fluid effects off of themselves if they have water handy. I have this partially coded and will submit it in a future PR.

Monsters should use their enviro resistance and armor values to protect themselves from splashes. Currently bile is the only splash effect, so this isn't really a big deal yet.

Testing

Spawned in, got barfed on until (eventually) my clothes got filthy. Spawned a huge boomer, saw it was barfing larger amounts. Killed a boomer and a huge boomer, saw that I got splashed. Let a boomer barf on a monster, saw that nothing strange happened.

Additional context

Boomer vs 0 Breathability Item = 2.75% chance to become filthy
Boomer vs 50 Breathability Item = 4.84% chance to become filthy
Boomer vs 100 Breathability Item = 10.89% chance to become filthy
Huge Boomer vs 0 Breathability Item = 7.56% chance to become filthy
Huge Boomer vs 50 Breathability Item = 13.46% chance to become filthy
Huge Boomer vs 100 Breathability Item = 30.25% chance to become filthy
It should be pretty simple to create tests for these.

The above amounts are only for if an item catches the full blast. If the bile was already partially deflected by a layer above, the chance will be reduced relative to the amount of the total fluid that was lost. This means, as you might logically expect, wearing something like a rain poncho over your terrycloth robe is likely to work out better than wearing the robe over the poncho.

In testing, the chances for an item to get filthy don't feel especially high, it's just something that happens sometimes if you're not careful or unlucky. The intent is that players consider using ranged attacks against boomers, something that their slippery bile should have already been encouraging.

image
augh

image
revenge

@github-actions github-actions bot added <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. Mechanics: Enchantments / Spells Enchantments and spells EOC: Effects On Condition Anything concerning Effects On Condition labels Feb 25, 2024
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Feb 25, 2024
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Feb 25, 2024
@github-actions github-actions bot added Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies and removed json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Feb 25, 2024
@worm-girl worm-girl marked this pull request as ready for review February 25, 2024 07:03
@github-actions github-actions bot requested a review from KorGgenT February 25, 2024 07:03
worm-girl and others added 2 commits February 24, 2024 23:08
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Feb 25, 2024
@github-actions github-actions bot removed the json-styled JSON lint passed, label assigned by github actions label Feb 25, 2024
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Feb 26, 2024
@Maleclypse
Copy link
Member

Conflicts need resolving

@worm-girl
Copy link
Contributor Author

Conflicts need resolving

fixed 👍

@github-actions github-actions bot removed BasicBuildPassed This PR builds correctly, label assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Feb 28, 2024
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Feb 28, 2024
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Feb 29, 2024
@worm-girl worm-girl closed this Feb 29, 2024
@worm-girl worm-girl reopened this Feb 29, 2024
@Maleclypse Maleclypse merged commit c3e8b12 into CleverRaven:master Mar 1, 2024
44 of 53 checks passed
Fris0uman added a commit to Fris0uman/Cataclysm-DDA that referenced this pull request Mar 4, 2024
Fris0uman added a commit to Fris0uman/Cataclysm-DDA that referenced this pull request Mar 5, 2024
@worm-girl worm-girl mentioned this pull request Mar 6, 2024
1 task
Fris0uman added a commit to Fris0uman/Cataclysm-DDA that referenced this pull request Mar 8, 2024
kevingranade added a commit that referenced this pull request Mar 10, 2024
Revert "Create splash attacks and give them to Boomers (#71964)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing EOC: Effects On Condition Anything concerning Effects On Condition [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Mechanics: Enchantments / Spells Enchantments and spells Monsters Monsters both friendly and unfriendly. Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants