Repository navigation
Let sealed artifacts from the Rune Crafting Station break open into rolled artifacts - #65
Conversation
|
@coderabbitai review |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Dev test (TFMCDev01, real character bot TestChar2 as a Mage)There were two runs: the first used 10827ac, the second used 5cf4403, which has the review fixes. Both ran with ServerAssets#71's Passed on 5cf4403:
Not a plugin issue: off-hand seals on this server. A seal placed in the off hand never stays there. The server's equipment is The full-inventory drop path can't happen with these items either. Seals are unstackable, so breaking one always frees the slot the artifact goes into. The drop is kept as a safety net and is covered by unit tests. Review: CodeRabbit is rate-limited, so GPT-6.1-Sol reviewed instead.
|
…olled artifacts Right-clicking a sealed item listed in the new artifacts/sealed.yml rolls an artifact the same way a Dowsing Artifact Mine drop is made: rarity by the file's weights (65/25/7/3, as the live node), then the usual roller and builder, so caps, secondary schools, wear and Recycler value match. A seal can lock the school or roll it from random_pool. The item is only used up when the artifact was made; a full inventory drops it at the player's feet. Each opened seal is logged to the console for counting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s fair The once-per-click guard remembered only the last player, so player A's trailing event after player B's click in the same tick opened a second seal. It now tracks every player who opened a seal this tick. Rarity weights are divided by the largest before summing, as ArtifactRoller does, so finite weights near Double.MAX_VALUE no longer overflow to the last rarity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5cf4403 to
30ffb2b
Compare
|
Rebased onto 006108b (#66) and retested on Dev as |
What this does
Artifacts can now be crafted. The Rune Crafting Station (MMOItems, configured in ServerAssets) crafts Sealed Artifacts, which are LOOT items. Right-clicking one breaks the seal and gives an artifact rolled the same way as a Dowsing Artifact Mine drop.
artifacts/sealed.yml. It lists the sealed items (TLibs path), each with a locked school orrandom, and the rarity weights. The bundled weights are 65/25/7/3, the same as the live Artifact Mine node. An entry can set its ownrarities. Magic copies the file in when it is missing, so live servers get it on the next start without editingconfig.yml.ArtifactRoller.roll(element, rarity)andArtifactItemBuilder. Caps, secondary schools, wear and Recycler value therefore match node artifacts. A school-locked seal still rolls secondaries; themagic.(primary=…)path does not. Random seals pick fromrandom_poolby type weight.Sealed artifact opened: player=… seal=… element=… rarity=…), so craft supply can be counted from the server logs.aura.logwould not work for this because it is wiped on every start.ArtifactRollerdoes, so very large weights stay fair.shrines.ymlandsacrifice.yml.Rollout
The planned Rune Crafting Station recipes (ServerAssets PR) are 18 Enchanted Dust for a random Sealed Artifact and 28 for each of the Oseni, Seithr, Cerrith and Mitlan ones. At 18 dust, the Artifact Mine node stays slightly better than Dust Mine plus crafting. Crafting then recycling loses about half the dust, so there is no loop.
Tests
SealedArtifactTest:sealed.ymlloads 5 seals against the bundled generator;Double.MAX_VALUE;SealedArtifactListenerTest: right-click air and block, usable blocks, sneaking, denied item use, other actions, the off hand, and one seal per click, including another player's click in between.mvn verifyshows the same failing set asmain. Those are only the Windows file-lock gear-ownership tests, and none are new. The new classes and the changedArtifactConfigLoaderandMagichave 100% line and branch coverage. Linux CI runs the full gate.🤖 Generated with Claude Code