Skip to content

feat(chronomancy): temporal dilation, haste stasis, and paradox backlash engine - #207

Open
angelTomo9 wants to merge 2 commits into
Bitcoindefi:mainfrom
angelTomo9:feat-chrono-dilation-1787886032788
Open

feat(chronomancy): temporal dilation, haste stasis, and paradox backlash engine#207
angelTomo9 wants to merge 2 commits into
Bitcoindefi:mainfrom
angelTomo9:feat-chrono-dilation-1787886032788

Conversation

@angelTomo9

Copy link
Copy Markdown

Summary

Implements a chronomancy temporal dilation, haste stasis, health snapshot rewind, and paradox backlash engine for OpenAO MMORPG.

Features

  • Chronomancy spellcraft (Time Warp, Chrono Stasis, Temporal Echo, Rewind Fate)
  • Dynamic haste multipliers accelerating tick rates up to 2.5x
  • Chrono Stasis action and cooldown freezing
  • Health state snapshotting and 5-second rewind recovery
  • Temporal Paradox Backlash damage when stacking excessive time streams
  • Full unit test coverage under Vitest

Comment thread api/src/lib/chronoTemporalDilation.ts
Comment thread api/src/lib/chronoTemporalDilation.ts
@gitar-bot

gitar-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 2 resolved / 2 findings

Implements chronomancy spellcraft with temporal dilation, haste stasis, health snapshots, and paradox backlash mechanics for OpenAO MMORPG. Addresses stasis-lock isolation to target player and extends snapshot retention window to prevent rewind point eviction. Full unit test coverage included.

✅ 2 resolved
Bug: Caster stasis-locked by CHRONO_STASIS cast on another player

📄 api/src/lib/chronoTemporalDilation.ts:84-91 📄 api/src/lib/chronoTemporalDilation.ts:130-136 📄 api/src/lib/chronoTemporalDilation.ts:84-87
When A casts CHRONO_STASIS on target B, the same effect object is pushed into both target.activeEffects and caster.activeEffects (lines 84-87), but only target.isStasisLocked is set (line 90). The next time cleanseExpiredEffects runs on the caster (it runs at the start of every castChronoSpell), it recomputes isStasisLocked = activeEffects.some(e => e.spellType === 'CHRONO_STASIS') (line 134), so the caster becomes stasis-locked simply because it holds a copy of the stasis effect it applied to someone else. That freezes the caster's cooldowns (calculateCooldownMultiplier returns 0). Only push the stasis effect / set the flag on the target, or exclude caster-side copies from the stasis recomputation.

Edge Case: REWIND_FATE snapshot cap of 10 can evict the rewind point

📄 api/src/lib/chronoTemporalDilation.ts:96-102 📄 api/src/lib/chronoTemporalDilation.ts:121-124
recordHealthSnapshot keeps only the last 10 snapshots (lines 121-124) and is called at the start of every cast. In a busy fight with more than 10 casts inside a 5-second window, the '5 seconds ago' snapshot is shifted out before REWIND_FATE can read it, so the rewind silently falls back to healthSnapshots[0] (line 98) — the most recent retained low-HP state — and fails to heal. Evict by age (drop snapshots older than the rewind window) rather than by fixed count, or size the buffer to cover the window at expected cast rates.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Important

Your trial ends in 4 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

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