Skip to content

Add data-driven status effect (modifier) system#93

Closed
stainlu wants to merge 1 commit intomainfrom
worktree-agent-abe19d7b
Closed

Add data-driven status effect (modifier) system#93
stainlu wants to merge 1 commit intomainfrom
worktree-agent-abe19d7b

Conversation

@stainlu
Copy link
Copy Markdown
Owner

@stainlu stainlu commented Mar 24, 2026

Summary

  • Add genre-agnostic status effect system as pure data: tag + stat modifiers + duration + tick effects (no hardcoded Stun/Slow/Shield enums)
  • Core types: StatusEffect, StatModifier, ModifierOp, StackPolicy, TickEffect, StatusEffects component
  • apply_effect() with Replace vs Stack{max} policies, cleanse() with tag substring filter, status_effect_tick_system() for DPS/HPS/expiry
  • HTTP routes: POST /effect/apply, GET /effect/list/{id}, POST /effect/cleanse
  • CLI commands: euca effect apply, euca effect list, euca effect cleanse
  • 12 unit tests covering application, stacking, expiry, cleanse, DPS, HPS, source tracking, modifier storage

Test plan

  • cargo test --workspace — all 108+ gameplay tests pass (12 new status effect tests)
  • cargo build --workspace — clean build
  • cargo clippy --workspace — zero warnings
  • cargo fmt --all --check — formatting clean

🤖 Generated with Claude Code

Implement genre-agnostic status effects as pure data: tag + stat modifiers
+ duration + tick effects. No hardcoded Stun/Slow/Shield enums — these
emerge from tag + modifier combinations defined by game data.

Core (euca-gameplay):
- StatusEffect, StatModifier, ModifierOp, StackPolicy, TickEffect types
- StatusEffects component (Vec<StatusEffect> per entity)
- apply_effect(): respects Replace vs Stack{max} policies
- cleanse(): remove effects matching a tag substring filter
- status_effect_tick_system(): tick durations, apply DPS/HPS, remove
  expired, emit StatusEffectExpired events
- 12 unit tests covering application, stacking, expiry, cleanse, DPS,
  HPS, source tracking, and modifier storage

HTTP API (euca-agent):
- POST /effect/apply, GET /effect/list/{id}, POST /effect/cleanse

CLI (euca-cli):
- euca effect apply, euca effect list, euca effect cleanse

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying euca-engine with  Cloudflare Pages  Cloudflare Pages

Latest commit: 92d7181
Status: ✅  Deploy successful!
Preview URL: https://6b4056bf.euca-engine.pages.dev
Branch Preview URL: https://worktree-agent-abe19d7b.euca-engine.pages.dev

View logs

@stainlu
Copy link
Copy Markdown
Owner Author

stainlu commented Mar 29, 2026

Closing stale worktree agent PR — this work was superseded or not merged.

@stainlu stainlu closed this Mar 29, 2026
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.

1 participant