Add effect test and some effect test data #40222
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Infrastructure "Add tests for the effect class"
Purpose of change
To have more test coverage of effects, including several major attributes documented in EFFECT_JSON.md
Describe the solution
Add new test cases focused on
effect
class functions, including:Example behaviors exercised:
Some related JSON attributes:
"name": [ "A", "B", "C"]
- multiple intensity names"speed_name": "@-name"
- as shown in the @ menu"base_mods": [ ... ]
- fixed mod to stats, healing, etc."scaling_mods": [ ... ]
- intensity-based mods to stats, etc."int_dur_factor": time
- for duration-based intensityIncludes some JSON test data to use for data-dependent checks.
Describe alternatives you've considered
I didn't get done all that I wanted, but I figure it never hurts to leave a few gimme TODOs for future contributors.
Testing
tests/cata_test [effect]
Additional context
Was originally part of #40064 but that one was getting hairy, so I pulled this part out, to be part one of several standalone PRs.