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

Adjust monster immunities to venoms, being downed #46156

Merged
merged 28 commits into from
Feb 18, 2021

Conversation

Venera3
Copy link
Member

@Venera3 Venera3 commented Dec 19, 2020

Summary

SUMMARY: Balance "Adjust monster immunities, buff player venoms"

Purpose of change

While cleaning up after my venom rebalance I noticed that the way monster immunities to effects were calculated was neither intuitive nor realistic. This PR attempts to change that, at least with regards to poisons and bleeding.

Describe the solution

  • Make all zombies impervious to systemic venoms, ie. the old poisons and wasp/bee venom, while keeping them susceptible to direct tissue damage

  • Make giant arthropods susceptible to venoms and bleeding in general

  • Rework player venoms into something more gameplay-relevant than applying the old venom effects

  • Add immunity to being downed to flying monsters as well as critters with the bodytypes Blob, Fish, and Snake and a 75% resist to Multi-legged critters ( Insect, Spider, Crab bodytypes )

  • Figure out which of the more exotic critters should get which immunity

  • Rewrite the tests

Describe alternatives you've considered

Keep zombies generally poisonable, but for a lot of poisons that simply makes little sense ( venoms that don't directly damage the tissue tend to affect systems the zombies don't have anymore like circulation etc.).
Not messing with the conditions and adding WARM to all insects to at least have them be poisoned, but then the new venoms would have affected everything from a bot to triffids.
Rework the immunity check into something JSONable instead of directly referencing the effect ids, but that's a bit intimidating and would probably count as a "Feature".

Testing

The intended mobs get poisoned. Hitting NPCs / getting hit by Apis applies the non-player venom variants. The tests pass.

Additional context

In the current implementation, both bleeding and poison require that the affected mob is warm-blooded (?) and made of flesh (bleeding) or flesh or iflesh (poisons). Since no bugs get the WARM flag they are effectively immune to both, as are by the way skeletons (who are also not warm, for some reason).

My general assumptions:

  • Alive animals should be able to be poisoned and bled ( the player is one, and we get both );
  • Giant bugs should be able to be poisoned bled ( most insect venom is developed against other insects, bugs are full of haemolymph and the butchery results reference a more mammal-like physiology anyway );
  • Mycus, Triffids and other weird stuff should not be poisoned and should not bleed ( too different physiology to justify poisons working, they could use some extra effects just for them down the line);
  • Zombies should not be able to be poisoned by systemic poisons, but tissue damage should work on them;

@Venera3 Venera3 mentioned this pull request Dec 19, 2020
1 task
@actual-nh
Copy link
Contributor

actual-nh commented Dec 19, 2020

Note prior discussion in #46079; my comment can be seen here. One might describe the question re zombies as whether they're more like cells taken over by a virus, just the physical structure left of the original body, or something in-between - and, if in-between, exactly how? (And it could even vary by zombie - ones with REVIVES_HEALTHY might be a bit different...)

@Venera3
Copy link
Member Author

Venera3 commented Dec 19, 2020

The fact that this touches on pretty fundamental design questions is the other reason I put it up separately. Since they are energized by transdimensional Blob voodoo, don't need to breathe and evolve rapidly the assumption that their physiology is pretty different is a safe one. Still, their material is flesh and they don't seem to want to change that in the course of the first year, even though they incorporate extraneus material, so I'd suppose proteolytic enzymes would keep working for a while, at least.

@actual-nh
Copy link
Contributor

Heh. Those design questions (@I-am-Erk? @kevingranade? anyone?) had me considering which Discussions category to ask about them in... thanks!

@actual-nh
Copy link
Contributor

BTW, weirdly enough, Magiclysm lizardfolk (and their pet crocodiles!) have NO_BREATHE....

@Venera3
Copy link
Member Author

Venera3 commented Dec 22, 2020

First pass on the player venoms, very WIP:

  • Venomous attacks do 10 dmg on application and then 1 dmg with a 50% chance each tick, 1 minute duration from one hit with a 2 min maximal duration
  • Very Venomous does 20 dmg on application, 4 dmg with 50% chance, and applies a hefty -50 speed debuff, also one minute per hit up to max 2 mins,

Those feel relevant, if slightly underpowered for monsters ( up from completely irrelevant, so that's progress). However, since the players are working with effectively 80ish max health for each limb, and a third of the limbs are an instakill if they break that would be pretty unfair to say the least. Because of this, the mutated attacks now apply the locally damaging mob venom effect or both the damaging and the weakening venom when hitting an NPC or a player.

@anothersimulacrum anothersimulacrum added the Monsters Monsters both friendly and unfriendly. label Dec 22, 2020
@Venera3
Copy link
Member Author

Venera3 commented Dec 22, 2020

Nether creatures and power leeches are now immune to the same venoms zombies got immune to, but those made of flesh can still bleed. Player venoms have a 20% chance to cause Stun / Downed, for the weaker and stronger variant respectively.

Looking at it once more I'm not convinced making zombies immune to some venoms but not to others is good game design even if it makes my inner pedant happier, so I'm opening it for review in the hopes of some core dev feedback.

@Venera3 Venera3 marked this pull request as ready for review December 22, 2020 21:45
@Venera3
Copy link
Member Author

Venera3 commented Dec 24, 2020

While I'm here I also did a sanity check on the "downed" effect, mostly applied by Sweeping attacks so that it can't affect flying things or things without y'know, legs to sweep. Arthropods also got a 75% immunity to it. Included that immunity in the tests as well.
This will also mean that I'll need to fiddle a bit more with the strong player venoms' secondary effect.

src/monster.cpp Outdated Show resolved Hide resolved
Co-authored-by: actual-nh <[email protected]>
@Night-Pryanik
Copy link
Contributor

This will conflict with #46357. Bleeding will be overhauled in that PR, so maybe you cancel the changes to bleeding immunity and leave only your changes to poison immunity?

@lgtm-com
Copy link

lgtm-com bot commented Dec 28, 2020

This pull request introduces 1 alert when merging 7be91dc into ea3e6a3 - view on LGTM.com

new alerts:

  • 1 for Empty branch of conditional

@Venera3 Venera3 changed the title [CR]Adjust monster immunities [CR]Adjust monster immunities to venoms, being downed Dec 30, 2020
@Night-Pryanik
Copy link
Contributor

#46357 was merged. @Venera3 could you please resolve conflicts?

@Venera3
Copy link
Member Author

Venera3 commented Jan 1, 2021

#46357 was merged. @Venera3 could you please resolve conflicts?

Yeah, I'm just about done with those. However, I added some test cases for fungaloids and flaming eyes to check for poisons/downing and included bleed in them. Neither has a species with a declared blood type or a relevant flag, but both can still bleed ( both in game and in the tests). Did you test them as well?

@actual-nh
Copy link
Contributor

Side note: If a wasp-specific mutation line ever gets created, another player venom-type dualistic manifestation: NPCs could logically get pain (bradykinin); not sure about monsters.

@Night-Pryanik
Copy link
Contributor

Neither has a species with a declared blood type or a relevant flag, but both can still bleed ( both in game and in the tests). Did you test them as well?

I didn't test them myself, but tests in your own PR say they cant't bleed.

@Venera3
Copy link
Member Author

Venera3 commented Jan 2, 2021

CHECK: is_immune returns false, since the can bleed. Nevertheless, here's a screenie from the latest exp build (11326, clean download):
Bleed

The problem has to lie in their materials, since fungaloids bleed plant sap and flaming eyes normal blood from materials veggy and flesh respectively. Your test checked a generator made of steel, and riot bots also don't bleed. On the left is a zpider mass.

@Night-Pryanik
Copy link
Contributor

Ok. Fungaloids do bleed as they have veggy material, though @kevingranade stated that they shouldn't bleed at all. We should fix this sometime, but I think it's out of scope of this PR.
Flaming eyes do bleed too as they have flesh material.

So I'd say it's working as intended (except for fungi bleeding), and tests should pass on these monsters.

@Venera3 Venera3 changed the title [CR]Adjust monster immunities to venoms, being downed Adjust monster immunities to venoms, being downed Jan 15, 2021
@actual-nh
Copy link
Contributor

actual-nh commented Jan 19, 2021

@Venera3: You may find this PMC article of interest regarding uses of venom other than predation/feeding and defense, BTW, as well as for giving ideas for another group of insects: assassin bugs.

@ZhilkinSerg ZhilkinSerg merged commit 681e80c into CleverRaven:master Feb 18, 2021
UmbralReaper added a commit to UmbralReaper/Cataclysm-DDA that referenced this pull request Feb 18, 2021
Ramza13 pushed a commit to Ramza13/Cataclysm-DDA that referenced this pull request Apr 12, 2021
@Venera3 Venera3 deleted the MonsterImmunity branch September 21, 2021 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Monsters Monsters both friendly and unfriendly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants