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

feat: show monster immunity in description #3254

Merged
merged 5 commits into from
Sep 25, 2023

Conversation

scarf005
Copy link
Member

@scarf005 scarf005 commented Sep 24, 2023

Summary

SUMMARY: Interface "Show monster immunity in extended description"

Purpose of change

expose more info to players, in this PR, immunity

Describe the solution

  • reused describe_flags lambda

DT_BIOLOGICAL, // internal damage, like from smoke or poison

  • made it render as 'posion' and 'smoke' despite being a single m_flag (MF_BIOPROOF), because i couldn't figure out a better way

Describe alternatives you've considered

name its immunity biohazard

Testing

image
image
image
image

  1. spawn a zombie, zombie firefighter, zombie master, and prototype robot.
  2. e(x)amine then read (e)xtended description
  3. its immunity is shown.

Additional context

  • which would be better? biohazard or smoke + poison?
  • should we split this damage type into two?
  • are there smoke or poison damage type?

@github-actions github-actions bot added the src changes related to source code. label Sep 24, 2023
src/monster.cpp Outdated Show resolved Hide resolved
Copy link
Member

@chaosvolt chaosvolt left a comment

Choose a reason for hiding this comment

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

  1. Compiled and load-tested.
  2. Spawned in a mundane zombie, checked its description.
    image
    mon_zombie does not have any of the relevant flags, so this is clearly incorrect.

@scarf005 scarf005 disabled auto-merge September 24, 2023 23:19
@scarf005
Copy link
Member Author

ah, hecc. not sure why that happens, will investigate later.

@chaosvolt
Copy link
Member

Also checked a monster that actually has an immunity, firefighter zed has acidproof and still shows all immunities, so it's not a simple case of the logic being installed backwards it seems...
image

@scarf005
Copy link
Member Author

well, should've used describe_flags over describe_properties.

Copy link
Member

@chaosvolt chaosvolt left a comment

Choose a reason for hiding this comment

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

  1. Compiled and load-tested.
  2. Spawned in and examine several critters.
  3. Basic zombies correctly don't even show the immunity line.
  4. Firefighter zeds show immunity to acid.
  5. Zombie masters show bio immunity.
  6. Robots show immunity to cold and bio-hazard.

@chaosvolt chaosvolt added this pull request to the merge queue Sep 25, 2023
Merged via the queue into cataclysmbnteam:upload with commit fbcaae3 Sep 25, 2023
14 checks passed
@scarf005 scarf005 deleted the monster-desc branch September 25, 2023 22:47
scarf005 added a commit to scarf005/Cataclysm-BN that referenced this pull request Sep 28, 2023
* feat: show monster immunity in description

* fix: describe bioproof only once

Co-authored-by: Chaosvolt <chaosvolt@users.noreply.github.com>

* fix: use describe_flags

* perf: use string_view

* style: cmake format

---------

Co-authored-by: Chaosvolt <chaosvolt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants