Skip to content

feat(crafting): runic golem crafting, core infusions, and guardian patrol engine - #209

Open
angelTomo9 wants to merge 2 commits into
Bitcoindefi:mainfrom
angelTomo9:feat-runic-golem-1787889658215
Open

feat(crafting): runic golem crafting, core infusions, and guardian patrol engine#209
angelTomo9 wants to merge 2 commits into
Bitcoindefi:mainfrom
angelTomo9:feat-runic-golem-1787889658215

Conversation

@angelTomo9

Copy link
Copy Markdown

Summary

Implements an ancient runic golem workshop, elemental core infusion, guardian patrol radius, and self-repair engine for OpenAO MMORPG.

Features

  • Chassis materials catalog (Granite, Obsidian, Mithril, Aether Crystal)
  • Elemental core infusions (Fire, Lightning, Void, Earth)
  • Patrol territory radius bounding calculations
  • Guardian slam attacks with target armor mitigation
  • Automated time-based core self-repairs
  • Full unit test coverage under Vitest

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

gitar-bot Bot commented Aug 28, 2026

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

Implements runic golem crafting with elemental core infusions, guardian patrol engine, and automated time-based self-repair. Fixes fractional HP loss on frequent self-repair calls and includes comprehensive unit test coverage.

✅ 1 resolved
Bug: Self-repair loses fractional HP on frequent calls

📄 api/src/lib/runicGolemCrafting.ts:162-169
performSelfRepair sets lastSelfRepairEpochMs = currentEpochMs on every call but computes repair as Math.floor(elapsedSeconds * repairRatePerSecond). When called at short intervals, the sub-1 HP fraction is floored to 0 while the timestamp still advances, so the accumulated fraction is discarded and the golem effectively never heals (e.g. a LIGHTNING/VOID core polled every ~100ms yields floor(0.4)=0 each tick). Fix by only advancing lastSelfRepairEpochMs by the time actually consumed by the granted HP (or carry the remainder), so repair accumulates across ticks.

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