Skip to content

feat(crafting): arcane disenchanting, essence extraction, and equipment reforging forge engine - #214

Open
angelTomo9 wants to merge 2 commits into
Bitcoindefi:mainfrom
angelTomo9:feat-disenchanting-forge-1787907684767
Open

feat(crafting): arcane disenchanting, essence extraction, and equipment reforging forge engine#214
angelTomo9 wants to merge 2 commits into
Bitcoindefi:mainfrom
angelTomo9:feat-disenchanting-forge-1787907684767

Conversation

@angelTomo9

Copy link
Copy Markdown

Summary

Implements an arcane disenchanting, elemental essence extraction, equipment prefix reforging, and forge instability failure engine for OpenAO MMORPG.

Features

  • Item rarities and essence yield extraction catalog (Common, Rare, Epic, Legendary)
  • Essence extraction into Arcane Dust, Astral Shards, Void Crystals, and Prismatic Cores
  • Reforge prefixes catalog (Flaming, Vampiric, Invulnerable, Titan Slayer)
  • Forge instability threshold calculation with skill mitigation
  • Catastrophic item fracture failure mechanics
  • Full unit test coverage under Vitest

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

gitar-bot Bot commented Aug 28, 2026

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

Adds arcane disenchanting, essence extraction, and equipment reforging with forge instability mechanics to the crafting system. Unused crypto import removed and essence consumption fixed to only deduct on successful reforge.

✅ 2 resolved
Quality: Unused crypto import in forge engine

📄 api/src/lib/enchantmentDisenchantingForge.ts:1
import crypto from "node:crypto" is never referenced — the fracture roll uses the injected rng defaulting to Math.random. It's dead code (and looks like an abandoned intent to use a CSPRNG). The api tsconfig doesn't set noUnusedLocals so it won't break the build, but remove the import, or actually use crypto as the default RNG if secure randomness was intended.

Edge Case: Essences consumed even when reforge fractures the item

📄 api/src/lib/enchantmentDisenchantingForge.ts:98-112
Essences are deducted at line 99, then the fracture roll at line 106 can destroy the item and return without refunding them, so a failed reforge costs both the item and the materials. If that double-loss is intended, ignore this; if not, roll for fracture before deducting (or refund on fracture) so players don't lose essences on a fracture.

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