Skip to content

Replace static→instance copy ritual with applyStatics helper#30

Merged
oskarrough merged 1 commit into
mainfrom
claude/review-node-composition-4ZGHj
May 13, 2026
Merged

Replace static→instance copy ritual with applyStatics helper#30
oskarrough merged 1 commit into
mainfrom
claude/review-node-composition-4ZGHj

Conversation

@oskarrough
Copy link
Copy Markdown
Owner

The base classes for Spell, DamageEffect, DoT, and HOT each repeated a
5–7 line constructor that mirrored static config onto the instance.
RenewHOT had its own inline copy of the same shape. One small helper in
utils.ts captures the pattern, so subclasses can be pure data: see
RenewHOT shedding its constructor entirely.

Behavior is unchanged — balance edits still only affect newly spawned
attacks (the snapshot semantics live in applyStatics now).

The base classes for Spell, DamageEffect, DoT, and HOT each repeated a
5–7 line constructor that mirrored static config onto the instance.
RenewHOT had its own inline copy of the same shape. One small helper in
utils.ts captures the pattern, so subclasses can be pure data: see
RenewHOT shedding its constructor entirely.

Behavior is unchanged — balance edits still only affect newly spawned
attacks (the snapshot semantics live in applyStatics now).
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
balancemender 6399cfe Commit Preview URL

Branch Preview URL
May 12 2026, 11:53 PM

@oskarrough oskarrough merged commit d2acd11 into main May 13, 2026
3 checks passed
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