feat(gear): add final unbreakable Elytra reward
Release / release (push) Successful in 2m51s
CI / build (push) Successful in 1m10s

This commit is contained in:
dmg
2026-09-09 22:28:40 -04:00
parent 0c4a95801a
commit afd8a03f1b
29 changed files with 494 additions and 61 deletions
+3 -1
View File
@@ -12,10 +12,12 @@ Durable player state includes participation status, opt-out deadline, login hist
Elapsed-time rules use UTC instants. Paused time is excluded from timers. Saves use atomic replacement where supported, preserve unknown fields where practical, and reject corrupt records rather than granting powers, assignments, or duplicated entities.
The historical `game.claimed-armor` list stores all nine legacy reward enum values. Original armor values remain unchanged; absent state means no claims. Claim state resets with the reign, not when an item is transferred or lost. Delivered equipment has no role binding and remains in ordinary Minecraft item storage.
The historical `game.claimed-armor` list stores the nine regular legacy reward enum values plus `ELYTRA` for the final collection reward. Elytra eligibility uses exactly the nine regular current-reign claims, never item possession or Elytra itself. Original armor values remain unchanged; absent state means no claims. Claim state resets with the reign, not when an item is transferred or lost. Delivered equipment has no role binding and remains in ordinary Minecraft item storage.
## Related stories
- [Complete the legacy collection with Elytra](../user-stories/us-023-complete-legacy-collection-with-elytra.md)
- [Purchase legacy tools and weapons](../user-stories/us-022-purchase-legacy-tools-and-weapons.md)
- [Inform players and manage participation](../user-stories/us-011-inform-and-manage-participation.md)
+6 -2
View File
@@ -23,9 +23,11 @@ The Tyrant starts each reign at level zero with one starting unlock choice. Pers
- Permanent Resistance
- Permanent Strength
## Legacy armor
## Legacy rewards
After purchasing all six standard reign unlocks, the Tyrant may spend later choices on one each of four legacy armor slots. These named Netherite rewards are tracked only to prevent duplicate claims during the current reign; the resulting armor remains ordinary transferable equipment and survives role succession in player inventories.
After purchasing all six standard reign unlocks, the Tyrant may spend one choice each on four armor pieces and five tools/weapons independently, in any order. Once all nine regular rewards have been claimed in the current reign, one additional choice buys a final unbreakable Elytra once per reign. Earlier items need not still be possessed. Elytra is excluded from the explicit prerequisite set.
All ten rewards remain ordinary transferable equipment after succession; only claim eligibility resets. The Elytra carries Minecraft's Unbreakable flag without redundant enchantments, a gold Tyrant/player name, and gray collection lore. Loss or destruction does not permit replacement.
## Proximity
@@ -37,6 +39,8 @@ Vigilante Follower scaling is capped by default at Strength V and Resistance IV,
## Related stories
- [Complete the legacy collection with Elytra](../user-stories/us-023-complete-legacy-collection-with-elytra.md)
- [Progress and purchase Tyrant unlocks](../user-stories/us-003-progress-and-purchase-unlocks.md)
- [Assign unlocked classes](../user-stories/us-004-assign-unlocked-classes.md)
- [Support the Vigilante and Followers](../user-stories/us-008-support-vigilante-and-followers.md)
+1
View File
@@ -14,6 +14,7 @@ This bundle documents the asymmetric Tyrant game, its role succession, class abi
- [User stories](user-stories/index.md)
- [Vigilante arena challenge](user-stories/us-019-claim-vigilante-in-arena.md)
- [Tyrant arena challenge](user-stories/us-020-claim-tyrant-in-arena.md)
- [Final unbreakable legacy Elytra](user-stories/us-023-complete-legacy-collection-with-elytra.md)
- [Tyrant legacy tools and weapons](user-stories/us-022-purchase-legacy-tools-and-weapons.md)
- [Tyrant legacy armor](user-stories/us-021-claim-tyrant-legacy-armor.md)
- [Game state machine](concepts/game-state-machine.md)
+9
View File
@@ -6,6 +6,15 @@ description: Chronological record of material decisions affecting the Spigot Tyr
# Spigot Tyrant Design Log
## 2026-09-09 — Final unbreakable legacy Elytra completed
- Completed approved [US-023](user-stories/us-023-complete-legacy-collection-with-elytra.md) and related progression, persistence, panel, completion, armor, and tool stories; updated catalogs and concepts.
- Added one final Elytra for one additional choice after all six standard unlocks and exactly the nine regular current-reign claims, with no possession requirement and no Elytra self-prerequisite.
- Applied Minecraft Unbreakable metadata without enchantments, exact gold name and gray collection lore, ordinary transferable item behavior, `/tyrant gear elytra`, contextual completion, prerequisite explanations, and unbreakability/cost confirmation.
- Preserved historical `game.claimed-armor` storage, backward-compatible loading, reign reset, regular reward independence, and authoritative claim/delivery safety.
- Verified `./gradlew clean check jar`: 221 passing tests, zero failures/errors/skips, warnings-as-errors compilation, and JAR packaging. OKF structural validation covers all 30 design Markdown documents and local links; `git diff --check` passed.
- Documented no live-server smoke test, separate mocked UI/item/command verification, and the preexisting synchronous persistence and non-atomic YAML/inventory crash risks. No commit, push, deployment, or local-testing configuration change was performed.
## 2026-09-09 — Tyrant legacy tools and weapons completed
- Completed approved US-022 and related progression, persistence, panel, completion, and armor story updates; cataloged five Netherite tool/weapon rewards alongside four armor rewards.
+1
View File
@@ -22,3 +22,4 @@
20. [US-020: Claim the Tyrant role in the arena](us-020-claim-tyrant-in-arena.md)
21. [US-021: Claim Tyrant legacy armor](us-021-claim-tyrant-legacy-armor.md)
22. [US-022: Purchase legacy tools and weapons](us-022-purchase-legacy-tools-and-weapons.md)
23. [US-023: Complete the legacy collection with an unbreakable Elytra](us-023-complete-legacy-collection-with-elytra.md)
@@ -26,6 +26,12 @@ As the **Tyrant**, I want to earn one meaningful choice for defeating the Vigila
- [x] A confirmation displays the selected unlock and choice cost before purchase.
- [x] The control panel refreshes the available choices immediately after a successful purchase.
## US-023 extension
Verified with 221 passing tests via `./gradlew clean check jar`; see [US-023 verification and limitations](us-023-complete-legacy-collection-with-elytra.md#verification-scope-and-limitations).
- [x] After those nine independent claims, one further choice buys the final once-per-reign [unbreakable Elytra](us-023-complete-legacy-collection-with-elytra.md); prior item possession is irrelevant.
## US-022 validation
Verified all nine independent one-choice legacy purchases and duplicate prevention with `./gradlew clean check jar` (177 passing tests); see [US-022 verification](us-022-purchase-legacy-tools-and-weapons.md#validation-scope).
@@ -23,6 +23,12 @@ As a **server operator**, I want configurable and durable game behavior so that
- [x] Tool and weapon claims persist alongside existing armor claims with backward-compatible loading and per-reign reset; see [US-022](us-022-purchase-legacy-tools-and-weapons.md).
## US-023 extension
Verified with 221 passing tests via `./gradlew clean check jar`; see [US-023 verification and limitations](us-023-complete-legacy-collection-with-elytra.md#verification-scope-and-limitations).
- [x] Final [Elytra claims](us-023-complete-legacy-collection-with-elytra.md) use `game.claimed-armor`, load older missing/armor/tool claim state, survive restart, and reset with the reign without changing delivered items.
## US-022 validation
Verified older armor-only YAML, absent claim state, mixed armor/tool restart round trips, and nine-item reign reset with `./gradlew clean check jar` (177 passing tests); see [US-022 verification and limitations](us-022-purchase-legacy-tools-and-weapons.md#validation-scope).
@@ -34,6 +34,12 @@ As the **Tyrant**, I want a control panel for my reign so that I can inspect pro
- [x] Existing `/tyrant choices`, `/tyrant buy`, `/tyrant assign`, and `/tyrant intelligence` commands remain available as alternatives.
- [x] The active Tyrant can open the control panel by using the bound Tyrant control item.
## US-023 extension
Verified with 221 passing tests via `./gradlew clean check jar`; see [US-023 verification and limitations](us-023-complete-legacy-collection-with-elytra.md#verification-scope-and-limitations).
- [x] The tenth reward is the final [Elytra](us-023-complete-legacy-collection-with-elytra.md); its menu explains missing standard unlocks, nine current-reign regular claims, and choices, and confirms unbreakability and one-choice cost through the authoritative command path.
## Validation
Automated tests verify command entry points, active-Tyrant authorization, authoritative overview state, the exact 100-tick login delay, lifecycle cancellation, and duplicate-opening prevention. The complete `./gradlew clean check jar` lifecycle passes.
@@ -13,7 +13,7 @@ As a **player or administrator**, I want contextual command suggestions so that
- [x] `/tyrant` suggests its available subcommands instead of arbitrary player names.
- [x] `/tyrant buy` suggests Tyrant unlock names.
- [x] `/tyrant gear` suggests `axe`, `pickaxe`, `sword`, `hoe`, and `shovel` and accepts no further arguments; see [US-022](us-022-purchase-legacy-tools-and-weapons.md).
- [x] `/tyrant gear` suggests `axe`, `pickaxe`, `sword`, `hoe`, `shovel`, and `elytra` and accepts no further arguments; see [US-022](us-022-purchase-legacy-tools-and-weapons.md) and [US-023](us-023-complete-legacy-collection-with-elytra.md).
- [x] `/tyrant armor` suggests `helmet`, `chestplate`, `leggings`, and `boots` and accepts no further arguments.
- [x] `/tyrant assign` suggests `assassin`, `fixer`, and `tamer`, followed by eligible online players.
- [x] `/tyrant relinquish` suggests `confirm`.
@@ -34,6 +34,10 @@ As a **player or administrator**, I want contextual command suggestions so that
Automated tests verify root syntax, unlocks, legacy armor pieces, classes, confirmations, eligible recruits, current Followers, permission gating, online administrative candidates, the argument-free `grantpoint` command, argument positions, and case-insensitive prefix filtering. The complete `./gradlew clean check jar` lifecycle passes.
## US-023 validation
Verified Elytra completion, case-insensitive prefix matching, argument positions, and unchanged armor completion with 221 passing tests via `./gradlew clean check jar`; see [US-023 verification and limitations](us-023-complete-legacy-collection-with-elytra.md#verification-scope-and-limitations).
## US-022 validation
Verified gear discovery, all five alphabetically sorted tool names, case-insensitive prefix matching, no extra arguments, and unchanged armor-only suggestions with `./gradlew clean check jar` (177 passing tests); see [US-022 verification](us-022-purchase-legacy-tools-and-weapons.md#validation-scope).
@@ -24,7 +24,13 @@ As a **fully unlocked Tyrant**, I want to turn later progression choices into na
- [x] The Tyrant can select and confirm an available armor piece through the existing control panel, using the same domain and persistence rules as the command path.
- [x] `/tyrant armor <helmet|chestplate|leggings|boots>` remains available as an alternative and supports contextual completion.
- [x] The four armor claims coexist with five independent [tool and weapon claims](us-022-purchase-legacy-tools-and-weapons.md), for nine total rewards without any armor-first requirement; armor commands, enchantments, and saved claims remain compatible.
- [x] The four armor claims coexist with five independent [tool and weapon claims](us-022-purchase-legacy-tools-and-weapons.md), for nine regular rewards without any armor-first requirement; armor commands, enchantments, and saved claims remain compatible.
## US-023 extension
Verified with 221 passing tests via `./gradlew clean check jar`; see [US-023 verification and limitations](us-023-complete-legacy-collection-with-elytra.md#verification-scope-and-limitations).
- [x] Armor remains independently purchasable and unchanged; its four current-reign claims count toward the final [Elytra](us-023-complete-legacy-collection-with-elytra.md), which is not an armor prerequisite or armor-command option.
## US-022 validation
@@ -20,6 +20,12 @@ As the **fully unlocked Tyrant**, I want to purchase named tools and weapons so
- [x] 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.
- [x] `/tyrant gear <axe|pickaxe|sword|hoe|shovel>` offers contextual, case-insensitive completion with no extra arguments; `/tyrant armor` remains unchanged.
## US-023 extension
Verified with 221 passing tests via `./gradlew clean check jar`; see [US-023 verification and limitations](us-023-complete-legacy-collection-with-elytra.md#verification-scope-and-limitations).
- [x] The nine regular rewards remain independent and unchanged; all nine current-reign claims unlock eligibility for the tenth [unbreakable Elytra](us-023-complete-legacy-collection-with-elytra.md), purchased separately for one choice through the expanded gear command/menu.
## 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.
@@ -0,0 +1,52 @@
---
type: User Story
title: "US-023: Complete the legacy collection with an unbreakable Elytra"
description: Reward a completed current-reign legacy collection with one final transferable Elytra.
status: done
---
# US-023: Complete the legacy collection with an unbreakable Elytra
As the **active Tyrant**, I want a final unbreakable Elytra after completing my reign's collection so that continued victories earn a lasting trophy.
## Acceptance criteria
- [x] After all six standard unlocks and all nine regular armor, tool, and weapon claims in the current reign, the active Tyrant can spend one additional choice on one Elytra; possession of earlier rewards is not required.
- [x] The nine regular rewards remain independent of one another and of Elytra; Elytra is not its own prerequisite.
- [x] The reward is Minecraft Elytra with the Unbreakable flag and no enchantments, including no Mending or Unbreaking.
- [x] The gold display name is `Tyrant's <player name> Elytra`; gray lore is `Forged for Tyrant <name>.`, `A lasting reward from <name>'s reign.`, and `Earned by completing the Tyrant's legacy collection.`.
- [x] The ordinary item can be traded, stored, repaired, retained after the reign, lost, or destroyed; no binding or replacement is provided.
- [x] The menu explains unmet prerequisites and confirms Elytra, unbreakability, and the one-choice cost before using the authoritative command path.
- [x] `/tyrant gear elytra` purchases the reward and contextual completion includes Elytra, case-insensitive prefixes, and no extra arguments; armor commands remain unchanged.
- [x] Claims persist under backward-compatible storage and reset each reign without touching delivered items.
- [x] Full inventory, paused/inactive games, unauthorized claimants, incomplete prerequisites, no choices, and duplicate or stale requests cannot issue rewards or consume choices.
## Implementation
Reuse historical armor-named reward types and the `game.claimed-armor` key. Use an explicit nine-item prerequisite set, not all reward enum values. The approved Unbreakable design replaces the initial enchantment proposal.
### Implementation references
- [Explicit reward set and parsing](../../src/main/java/games/dmg/spigottyrant/TyrantArmorPiece.java) and [claim rules](../../src/main/java/games/dmg/spigottyrant/TyrantArmorService.java)
- [Item specification](../../src/main/java/games/dmg/spigottyrant/TyrantArmorSpec.java) and [Bukkit metadata creation](../../src/main/java/games/dmg/spigottyrant/BukkitTyrantArmorItemFactory.java)
- [Command delivery](../../src/main/java/games/dmg/spigottyrant/TyrantCommand.java), [contextual completion](../../src/main/java/games/dmg/spigottyrant/TyrantTabCompleter.java), [menu policy](../../src/main/java/games/dmg/spigottyrant/TyrantControlPanelModel.java), and [renderer/confirmation dispatch](../../src/main/java/games/dmg/spigottyrant/BukkitTyrantControlPanelRenderer.java)
- [Historical-key persistence](../../src/main/java/games/dmg/spigottyrant/YamlTyrantStateRepository.java) and [restart/reset tests](../../src/test/java/games/dmg/spigottyrant/YamlTyrantStateRepositoryTest.java)
## Verification scope and limitations
Verified on 2026-09-09: `./gradlew clean check jar` passed with 221 tests, zero failures/errors/skips, Java 17 warnings-as-errors compilation, and JAR packaging. OKF v0.1 structural validation passed for all 30 design Markdown documents (YAML frontmatter, required story fields/statuses/criteria, reserved index/log structure, and local links); `git diff --check` passed.
Automated coverage includes each missing regular claim and standard unlock, no prior item possession, one-choice purchase, repeated command input, full inventory, lifecycle/authorization guards, malformed and cross-category requests, contextual completion, exact item metadata and confirmation text, ten distinct menu slots, missing-prerequisite menu explanations, older saves, Elytra restart round trips, and succession reset. The initial test run failed to compile because the partial implementation lacked the Elytra enum value; the first complete build also caught three obsolete nine-reward regression assumptions.
No live Spigot smoke test has been performed. Item metadata calls are verified with Mockito; actual flight, durability, trading, storage, loss/destruction, and post-reign inventory behavior rely on ordinary Minecraft item semantics and are not live-server tested. Renderer layout, menu policy, confirmation specification, and command delivery are tested separately rather than through a real client click sequence. Bukkit serializes these command and inventory handlers on the server thread; this does not provide arbitrary asynchronous callers with thread safety.
The existing persistence/delivery path is retained: YAML claims and Minecraft inventory saves are not a cross-store atomic transaction. Abrupt crashes or disk failures during delivery retain the preexisting risk of loss or duplication, and the existing state manager performs synchronous saves. No persistence architecture change or crash-atomicity guarantee is introduced. Backward compatibility means loading old saves in the new plugin, not downgrading to older binaries that do not recognize `ELYTRA`.
## Related
- [Progression](us-003-progress-and-purchase-unlocks.md)
- [Persistence](us-012-configure-and-persist-state.md)
- [Control panel](us-015-manage-tyrant-control-panel.md)
- [Completion](us-018-complete-commands-contextually.md)
- [Armor](us-021-claim-tyrant-legacy-armor.md)
- [Tools and weapons](us-022-purchase-legacy-tools-and-weapons.md)