Skip to content

fix: small independent mechanic/condition/registry fixes - #1779

Merged
Travja merged 3 commits into
devfrom
split/1677-misc-mechanic-fixes
Jul 23, 2026
Merged

fix: small independent mechanic/condition/registry fixes#1779
Travja merged 3 commits into
devfrom
split/1677-misc-mechanic-fixes

Conversation

@Travja

@Travja Travja commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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:

  • 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 — 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

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.
@Travja Travja mentioned this pull request Jul 21, 2026
claude added 2 commits July 21, 2026 18:33
- 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.
@Travja
Travja merged commit 2d90c1d into dev Jul 23, 2026
3 checks passed
@Travja
Travja deleted the split/1677-misc-mechanic-fixes branch July 23, 2026 02:58
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