Files
spigot-tyrant/design/user-stories/us-022-purchase-legacy-tools-and-weapons.md
T
dmg 0c4a95801a
Release / release (push) Successful in 2m56s
CI / build (push) Successful in 1m12s
feat(gear): add Tyrant legacy tools and weapons
2026-09-09 22:02:59 -04:00

4.3 KiB

type, title, description, status
type title description status
User Story US-022: Purchase legacy tools and weapons Let a fully unlocked Tyrant spend choices on lasting Netherite tools and weapons alongside legacy armor. done

US-022: Purchase legacy tools and weapons

As the fully unlocked Tyrant, I want to purchase named tools and weapons so that continued victories create useful, transferable reign trophies.

Acceptance criteria

  • After all six standard unlocks, the active Tyrant may spend one choice each on Axe, Pickaxe, Sword, Hoe, and Shovel in any order alongside armor, with no armor prerequisites.
  • All five items are Netherite: Axe has Sharpness VI, Efficiency VI, Mending I; Pickaxe, Hoe, and Shovel have Efficiency VI, Mending I; Sword has Sharpness VI, Mending I.
  • Each item uses the armor naming/lore convention and remains ordinary transferable, persistent, repairable equipment without role binding or recovery.
  • Each of nine distinct legacy rewards can be purchased once per reign; losing or transferring an item does not restore eligibility.
  • Claims survive restart, preserve existing saved armor claims, and reset with the reign while delivered items remain untouched.
  • Full inventory, paused games, unauthorized players, incomplete unlocks, no choices, malformed requests, and repeated interactions cannot consume choices or issue rewards.
  • The control panel lists all nine rewards and confirms the selected item, enchantments, and one-choice cost before executing the authoritative claim path and refreshing.
  • /tyrant gear <axe|pickaxe|sword|hoe|shovel> offers contextual, case-insensitive completion with no extra arguments; /tyrant armor remains unchanged.

Implementation

Extend the existing legacy reward service and historical armor-named state types to share one durable claim set. Preserve the game.claimed-armor storage key and original enum values for compatibility; new tool values are additional claims, not armor prerequisites.

Validation scope

Verified ./gradlew clean check jar: 177 tests passed, zero failures/errors/skips, Java compilation with -Xlint:all -Werror, and JAR packaging. OKF v0.1 validation checks all 29 Markdown documents for YAML frontmatter, story statuses and acceptance criteria, reserved index/log structure, and repository-local links. Initial red tests failed on missing tool rewards and gear completion before implementation.

Automated coverage includes all nine inventory deliveries and full-inventory rejections, tool-first claims and duplicate prevention, lifecycle/authorization/progression guards, repeated gear command execution against updated state, malformed and cross-category requests, sorted case-insensitive completion, exact item specifications and confirmation lore, unique panel slots, backward-compatible YAML loading and mixed-claim restart round trips, and succession reset.

No live-server smoke test has been performed. Persistence uses the existing state manager: saving YAML and saving Minecraft inventory are not a cross-store atomic transaction, so abrupt crashes or disk failures during delivery retain the preexisting armor-path risk. Older plugin binaries do not understand new tool enum values; backward compatibility means loading older armor saves in this version, not safe downgrade after new claims.