Repository navigation
Let an attuned mage weapon be re-attuned from scratch for a fee - #64
Conversation
Sneak-right-clicking an empty station with an attuned weapon names a fee (gear.reattune.cost_fraction of the weapon's part costs, 0.5 by default, rounded up per material). A second sneak-click within the confirm window pays it and rests the weapon as a pending reset. The next charge's run replaces the weapon's elements and Rift with what it catches. A run that catches nothing leaves the old attunement and keeps the reset pending. Only the owner can charge a pending reset, and empty-hand pickup is blocked; the owner's shift-left-click returns the unchanged weapon with the whole fee. A station that loses its furniture drops the fee with the weapon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
What
fran asked for already-crafted mage weapons to be attunable again, at a higher cost. A recharge (setting the weapon back on a station and applying another charge) already worked, but it can only raise a weapon's requirements: an element can never be removed or swapped. This adds a paid reset that wipes the old attunement and lets the weapon be attuned from scratch.
How it works
Sneak + right-click an empty Magic station while holding an attuned weapon the station can create. Chat lists the fee and asks for a second sneak-right-click within
gear.confirm_seconds.The second click pays the fee and rests one weapon on the station as a pending reset (
rested: true,reattune: true, with the fee kept incharged). The weapon itself isn't changed yet.Apply a charge as usual. When a run catches something:
rewriteSocketswould wipe applied runes, and withsocket_rarity_prefix: falsethe colours wouldn't change anyway.The row then becomes a plain rested weapon, its
chargedset to{}.A run that catches nothing leaves the old attunement untouched. The reset stays paid and pending for another charge.
While a reset is pending:
magic.admincan apply a charge, since whoever charges it picks the new attunement.Plain right-click recharging is unchanged.
Fee
gear.reattune.cost_fractioninconfig.yml, default0.5. It is that share of the weapon's current part costs ingear/parts.yml, rounded up per material, and at least 1 of each material when the share is above 0.0makes the reset free, andmagic.bypass_crafting_costskips the fee as it does for crafting. For example, Main's iron staff with basic parts pays 2 iron, 1 stick, 3 books and 12 enchanted dust.The jar doesn't add the new key to an existing
config.yml, so a live config without it gets the 0.5 default. Newgear.reattune.*messages fall back to the bundledmessages.ymluntil they're added to a live copy.Tests
GearReattuneCoverageTest, plus reset cases inGearStationListenerCoverageTest,GearOrbServiceCoverageTest,GearChargeCoverageTestandConfigurationTest.mvn verifyon Linux: 683 tests pass and the 100% coverage gate is met. The station persistence suites need Linux directory fsync, so they can't run on Windows.DEV-20261021-reattune, mineflayer bot TestChar2 on a real character):Docs: TF-Minecraft/Docs MAGE_GEAR.md "Re-attuning from scratch" (separate PR).
🤖 Generated with Claude Code