fix: small independent mechanic/condition/registry fixes - #1779
Merged
Conversation
Split out of #1677 (piece 6 of 8) — four small, unrelated fixes bundled together since each is a one-off, self-contained change: - RepeatMechanic: new single-instance setting cancels a caster's previous repeat tasks before starting a new one, instead of letting them stack. - TargetComponent: allow self-targeting when IncludeCaster is anything other than FALSE (previously self-targeting was always excluded regardless of the IncludeCaster setting). - Skill#damage(): wrap damage application in try-finally so the static skillDamage flag is always reset, even if dealing damage throws. - ComponentRegistry: register WorldTarget, which existed but was never registered as a usable target component.
Open
- RepeatMechanic: widen the tasks field to package-visible (matching DelayMechanic's existing convention) so tests can assert on it directly, then cover single-instance cancelling the caster's previous repeat task before starting a new one, vs. stacking without it. - TargetComponent: cover the self-targeting clause across all three IncludeCaster values, isolated from the separate ally/enemy grouping check by using group=both. - Skill#damage(): cover that the static skillDamage flag resets even when applying the damage throws (mocks DamageRegistry.dealDamage to throw), not just on the happy path. - ComponentRegistry: cover that WorldTarget is now registered as a selectable target component.
…Test stub CI caught this - StubTargetComponent didn't implement EffectComponent's abstract getKey(), failing test compilation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Split out of #1677 (piece 6 of 8 — see that PR for the full breakdown).
What
Four small, unrelated fixes bundled together since each is a one-off, self-contained change too small to justify its own PR:
single-instancesetting cancels a caster's previous repeat tasks before starting a new one, instead of letting them stack.IncludeCasteris anything other thanFALSE(previously self-targeting was always excluded regardless of theIncludeCastersetting).skillDamageflag is always reset, even if dealing damage throws.WorldTarget— it already existed in the codebase but was never registered as a usable target component.Why split out separately
None of these depend on each other or on any other piece of #1677; grouped here purely to avoid four near-trivial PRs. Happy to split further if reviewers would prefer that.
Testing
Could not build locally (private Maven repo unreachable in this sandbox). Needs manual/CI verification of each fix independently (repeat-mechanic stacking, self-targeting with IncludeCaster settings, WorldTarget now selectable in configs).
Generated by Claude Code