Skip to content

feat(world-events): astral rift invasion defense, wave progression, and rune sealing engine - #204

Open
angelTomo9 wants to merge 2 commits into
Bitcoindefi:mainfrom
angelTomo9:feat-astral-rift-1787875248920
Open

feat(world-events): astral rift invasion defense, wave progression, and rune sealing engine#204
angelTomo9 wants to merge 2 commits into
Bitcoindefi:mainfrom
angelTomo9:feat-astral-rift-1787875248920

Conversation

@angelTomo9

Copy link
Copy Markdown

Summary

Implements an Astral Rift dimensional invasion world event with stability degradation, wave progression, celestial rune sealing, and contribution reward tiers for OpenAO MMORPG.

Features

  • Dimensional void creature catalogs and stability degradation weights
  • Event phase state machine (Preparation, Invasion Active, Boss Phase, Victory, Failure)
  • Celestial rune channeling rituals restoring dimensional stability
  • Tiered player reward evaluation based on defensive contributions
  • Full unit test coverage under Vitest

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

gitar-bot Bot commented Aug 28, 2026

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

Implements Astral Rift dimensional invasion world event with stability degradation, wave progression, celestial rune sealing, and tiered player rewards. Addressed event state expiry handling to properly report zero stability and restricted rune channeling to active invasion phases only.

✅ 2 resolved
Bug: Expiry path reports stability 0 but leaves event state unchanged

📄 api/src/lib/astralRiftInvasionDefense.ts:69-72
In spawnWave, the duration-expired branch sets phase to COLLAPSED_FAILURE and returns stabilityRemaining: 0, but never mutates event.riftStabilityPercent. Downstream consumers reading event.riftStabilityPercent will see the previous (non-zero) value while the returned result claims 0, an inconsistent state. Set event.riftStabilityPercent = 0 in that branch so the event object and the returned value agree.

Edge Case: Runes can be channeled and contributions earned during PREPARATION

📄 api/src/lib/astralRiftInvasionDefense.ts:109-122
channelSealingRune only rejects COLLAPSED_FAILURE and SEALED_VICTORY events, so a player can channel runes and accrue contribution points while the event is still in PREPARATION (before any wave spawns). If runes are meant to be a defensive response to an active invasion, this lets players farm contribution/reward tiers before the fight begins. Consider also rejecting the PREPARATION phase, or explicitly document that pre-invasion channeling is intended.

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 5 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