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

Add creature effect tests #40234

Merged
merged 1 commit into from
May 6, 2020
Merged

Conversation

wapcaplet
Copy link
Contributor

@wapcaplet wapcaplet commented May 6, 2020

Summary

SUMMARY: Infrastructure "Add tests for creature effect functions"

Purpose of change

To have some test coverage of effects on creatures (monsters and characters).

Describe the solution

Includes test cases for Creature effects, covering functions:

  • add_effect, remove_effect
  • has_effect, has_effect_with_flag
  • resists_effect, is_immune_effect

Behaviors exercised:

  • characters may have an effect on a body part, or all-body
  • monsters may only have all-body effects (not having body parts)
  • monsters immune to an effect can still be forced to have it
  • fleshy, warm-blooded monsters can bleed and be poisoned
  • bony, non-warm monsters are immune to bleeding and poison
  • fleshy, non-warm-blooded monsters are immune to bleeding and poison
  • Slimy mutation gives immunity to corroding effect
  • Tentacle bracing mutation gives immunity to downing
  • Strong Stomach mutation gives immunity to nausea

Describe alternatives you've considered

Faking it all with latex and lighting

Testing

tests/cata_test [effect][creature]

Additional context

There is more work to be done here, but I am leaving a few TODOs undone to leave an opening for future contributors.

Part 2 of splitting #40064

Includes test cases for `Creature` effects, covering functions:

- add_effect, remove_effect
- has_effect, has_effect_with_flag
- resists_effect, is_immune_effect

Behaviors exercised:

- characters may have an effect on a body part, or all-body
- monsters may only have all-body effects (not having body parts)
- monsters immune to an effect can still be forced to have it
- fleshy, warm-blooded monsters can bleed and be poisoned
- bony, non-warm monsters are immune to bleeding and poison
- fleshy, non-warm-blooded monsters are immune to bleeding and poison
- Slimy mutation gives immunity to corroding effect
- Tentacle bracing mutation gives immunity to downing
- Strong Stomach mutation gives immunity to nausea
@kevingranade kevingranade merged commit f48ecfc into CleverRaven:master May 6, 2020
@wapcaplet wapcaplet deleted the fx-creature branch May 6, 2020 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants