Skip to content

feat(cobbling): ancient runic leather cobbler shoe last, wooden form, and arcane tread engine - #284

Open
angelTomo9 wants to merge 2 commits into
Bitcoindefi:mainfrom
angelTomo9:feat-cobbler-last-1788149459305
Open

feat(cobbling): ancient runic leather cobbler shoe last, wooden form, and arcane tread engine#284
angelTomo9 wants to merge 2 commits into
Bitcoindefi:mainfrom
angelTomo9:feat-cobbler-last-1788149459305

Conversation

@angelTomo9

Copy link
Copy Markdown

Summary

Implements an ancient runic leather cobbler shoe last, wooden tree form, and arcane tread footwear crafting system, cobbler shoe lasts (Oak Cobbler Last Bench, Runic Ironwood Shoe Tree, Celestial Void Swift-Tread Sanctum), raw tanned leather soles (Tanned Cowhide Sole Plate, Reinforced Wyrmhide Boot Vamp, Celestial Void Starlight Tread Leather), cobbler footwear recipes (Scout Swift-Stride Moccasin, Ranger Iron-Tread Marching Boot, Celestial Void Seraphic Winged Greave), tread traction ratings (0% to 100%), calibrated movement speed and terrain fatigue resistance scaling, upfront material deduction on all attempts, consistent remainingProvidedSoles shapes across all branches, and cobbler bench maintenance for OpenAO MMORPG.

Features

  • Cobbler shoe last catalog with power ratings, durability, and traction bonuses
  • Cobbler footwear recipes with calibrated movement speed and terrain fatigue resistance scaling
  • Independent tread traction quality roll scaling
  • Upfront material deduction on all craft attempts to prevent zero-cost retries
  • Consistent remainingProvidedSoles arrays returned on all early rejection branches
  • Cached static catalog maxima and table maintenance with durability threshold gating
  • Full unit test coverage under Vitest including mid-range traction tests

Comment on lines +192 to +199
// Calculate independent tread traction score (0% to 100%) dynamically using cached catalog maxima & authoritative catalog values
const { maxPower, maxBonus } = this.CATALOG_MAXIMA;
const safeTractionRoll = Number.isFinite(tractionRoll) ? Math.max(0, Math.min(1, tractionRoll)) : Math.random();
const powerRatio = Math.min(1.0, lastData.cobblingPower / maxPower);
const bonusPoints = (lastData.tractionBonusPercent / maxBonus) * 20;
const tractionScore = Math.max(0, Math.min(100, Math.round(
(safeTractionRoll * 40) + (powerRatio * 40) + bonusPoints
)));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Quality: treadTractionPercent can never approach the documented 0% floor

The docs/types advertise tread traction as a "0% to 100%" rating, but the formula is (roll*40) + (powerRatio*40) + bonusPoints, where powerRatio (cobblingPower/maxPower) and bonusPoints are always positive for every catalog last. Even the weakest Oak bench with a traction roll of 0 yields ~14 (0 + 8.33 + 5.71), so a low-end result near 0 is unreachable. Consider adjusting the wording/type comment or the scaling if a true 0% floor is intended.

Was this helpful? React with 👍 / 👎

@gitar-bot

gitar-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 0 resolved / 1 findings

Implements a comprehensive cobbler crafting system for OpenAO MMORPG with shoe lasts, leather soles, footwear recipes, and tread traction mechanics. Consider adjusting the treadTractionPercent formula or documentation: the current calculation (roll*40) + (powerRatio*40) + bonusPoints cannot reach the advertised 0% floor since all components are non-negative, yielding a minimum of ~14% even with the weakest bench and a zero traction roll.

💡 Quality: treadTractionPercent can never approach the documented 0% floor

📄 api/src/lib/ancientRunicLeatherCobblerShoeLast.ts:192-199 📄 api/src/lib/ancientRunicLeatherCobblerShoeLast.ts:47

The docs/types advertise tread traction as a "0% to 100%" rating, but the formula is (roll*40) + (powerRatio*40) + bonusPoints, where powerRatio (cobblingPower/maxPower) and bonusPoints are always positive for every catalog last. Even the weakest Oak bench with a traction roll of 0 yields ~14 (0 + 8.33 + 5.71), so a low-end result near 0 is unreachable. Consider adjusting the wording/type comment or the scaling if a true 0% floor is intended.

🤖 Prompt for agents
Code Review: Implements a comprehensive cobbler crafting system for OpenAO MMORPG with shoe lasts, leather soles, footwear recipes, and tread traction mechanics. Consider adjusting the treadTractionPercent formula or documentation: the current calculation `(roll*40) + (powerRatio*40) + bonusPoints` cannot reach the advertised 0% floor since all components are non-negative, yielding a minimum of ~14% even with the weakest bench and a zero traction roll.

1. 💡 Quality: treadTractionPercent can never approach the documented 0% floor
   Files: api/src/lib/ancientRunicLeatherCobblerShoeLast.ts:192-199, api/src/lib/ancientRunicLeatherCobblerShoeLast.ts:47

   The docs/types advertise tread traction as a "0% to 100%" rating, but the formula is `(roll*40) + (powerRatio*40) + bonusPoints`, where `powerRatio` (cobblingPower/maxPower) and `bonusPoints` are always positive for every catalog last. Even the weakest Oak bench with a traction roll of 0 yields ~14 (0 + 8.33 + 5.71), so a low-end result near 0 is unreachable. Consider adjusting the wording/type comment or the scaling if a true 0% floor 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 1 day — 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