feat(tyrant): add reign control panel
This commit is contained in:
@@ -6,6 +6,24 @@ description: Chronological record of material decisions affecting the Spigot Tyr
|
||||
|
||||
# Spigot Tyrant Design Log
|
||||
|
||||
## 2026-08-21 — Tyrant control panel completed
|
||||
|
||||
- Completed US-015 and the reopened US-003, US-004, and US-009 control-panel criteria with overview, unlock purchase confirmation, class assignment, and ability screens.
|
||||
- The active Tyrant can open the panel with `/tyrant` or `/tyrant menu`; existing command alternatives remain available and provide the authoritative mutations behind menu actions.
|
||||
- Added a 100-tick login delay with online, lifecycle, role, and already-opened session checks so only the current Tyrant receives one automatic panel per login.
|
||||
- Verified command routing, authorization, overview state, delayed opening safeguards, compiler warnings, tests, and packaging with `./gradlew clean check jar`.
|
||||
|
||||
## 2026-08-21 — Tyrant control panel implementation started
|
||||
|
||||
- US-003, US-004, US-009, and US-015 begin a test-first implementation of the Tyrant control panel and its delayed login opening.
|
||||
- The installed Spigot API does not expose a native dialog API, so the control panel will use a server-rendered inventory menu while preserving command alternatives.
|
||||
|
||||
## 2026-08-21 — Tyrant control panel planned
|
||||
|
||||
- Added US-015 for a graphical Tyrant control panel covering reign overview, unlock purchases, class assignments, and roster intelligence while retaining command alternatives.
|
||||
- Planned automatic control-panel opening five seconds after the active Tyrant joins a running event, with lifecycle, role, disconnect, and duplicate-opening safeguards.
|
||||
- Reopened US-003, US-004, and US-009 in the backlog to track their approved control-panel interactions.
|
||||
|
||||
## 2026-08-18 — Preserve ordinary potion effects
|
||||
|
||||
- Corrected Assassin effect maintenance so it refreshes active Tyrant abilities without removing invisibility, Speed, or Weakness supplied by potions, commands, or other plugins.
|
||||
|
||||
@@ -14,3 +14,4 @@
|
||||
12. [US-012: Configure and persist game state](us-012-configure-and-persist-state.md)
|
||||
13. [US-013: Build, test, and release the plugin](us-013-build-test-and-release.md)
|
||||
14. [US-014: Use class ability items](us-014-use-class-ability-items.md)
|
||||
15. [US-015: Manage a reign through the Tyrant control panel](us-015-manage-tyrant-control-panel.md)
|
||||
|
||||
@@ -19,9 +19,13 @@ As the **Tyrant**, I want to earn one meaningful choice for defeating the Vigila
|
||||
- [x] A purchase consumes exactly one unspent choice and cannot be duplicated by retries or concurrent input.
|
||||
- [x] Progress cannot be earned or spent while the game is paused.
|
||||
- [x] Levels, purchases, and unspent choices survive logout and restart but reset when the reign ends.
|
||||
- [x] The Tyrant can review and purchase unlocks through the Tyrant control panel.
|
||||
- [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.
|
||||
|
||||
## Related
|
||||
|
||||
- [Role and class model](../concepts/role-and-class-model.md)
|
||||
- [Assign unlocked classes](us-004-assign-unlocked-classes.md)
|
||||
- [Purchase and use Tyrant abilities](us-009-use-tyrant-abilities.md)
|
||||
- [Manage a reign through the Tyrant control panel](us-015-manage-tyrant-control-panel.md)
|
||||
|
||||
@@ -19,8 +19,12 @@ As the **Tyrant**, I want to assign unlocked specialist classes so that I can bu
|
||||
- [x] Assignment and removal are stored by UUID and communicated clearly to affected players.
|
||||
- [x] A class holder is reminded of the assignment and its controls on login.
|
||||
- [x] All class assignments end when the Tyrant's reign ends.
|
||||
- [x] The Tyrant can assign and reassign purchased classes through the Tyrant control panel.
|
||||
- [x] The control panel's player selector communicates eligibility and identifies the current class holder before confirmation.
|
||||
- [x] Control-panel and command-based assignments enforce identical rules.
|
||||
|
||||
## Related
|
||||
|
||||
- [Role and class model](../concepts/role-and-class-model.md)
|
||||
- [Use class ability items](us-014-use-class-ability-items.md)
|
||||
- [Manage a reign through the Tyrant control panel](us-015-manage-tyrant-control-panel.md)
|
||||
|
||||
@@ -19,8 +19,11 @@ As the **Tyrant**, I want permanent upgrades and limited roster intelligence so
|
||||
- [x] Intelligence counts the current Vigilante and living assigned Followers, whether online or offline, according to configurable counting rules.
|
||||
- [x] The Tyrant can inspect ability ownership and the remaining intelligence cooldown.
|
||||
- [x] Purchases and cooldowns survive restart and end with the Tyrant's reign.
|
||||
- [x] The Tyrant control panel shows purchased passive upgrades and the roster-intelligence readiness or remaining cooldown.
|
||||
- [x] The Tyrant can activate ready roster intelligence from the control panel and receive the result without revealing identities or locations.
|
||||
|
||||
## Related
|
||||
|
||||
- [Progress and purchase Tyrant unlocks](us-003-progress-and-purchase-unlocks.md)
|
||||
- [Configure and persist game state](us-012-configure-and-persist-state.md)
|
||||
- [Manage a reign through the Tyrant control panel](us-015-manage-tyrant-control-panel.md)
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
type: User Story
|
||||
title: "US-015: Manage a reign through the Tyrant control panel"
|
||||
description: Give the active Tyrant a graphical control panel for inspecting and managing the current reign.
|
||||
status: done
|
||||
---
|
||||
|
||||
# US-015: Manage a reign through the Tyrant control panel
|
||||
|
||||
As the **Tyrant**, I want a control panel for my reign so that I can inspect progress, purchase unlocks, assign classes, and use abilities without memorizing commands.
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- [x] The active Tyrant can open the control panel with `/tyrant menu`, and `/tyrant` with no arguments opens the same panel.
|
||||
- [x] A player who is not the active Tyrant cannot open or operate the control panel.
|
||||
- [x] When the active Tyrant joins while the event is running, the control panel opens automatically five seconds after login.
|
||||
- [x] Automatic opening is cancelled if the Tyrant disconnects, loses the Tyrant role, or the event pauses or stops during the five-second delay.
|
||||
- [x] Other players and pending Tyrant candidates do not receive the automatically opened control panel.
|
||||
- [x] Closing an automatically opened control panel does not cause it to reopen during the same login session.
|
||||
- [x] The Tyrant may open the control panel manually during the five-second delay without causing a second panel to open automatically.
|
||||
- [x] The main screen shows the Tyrant's level, unspent choices, purchased unlocks, class assignments, and roster-intelligence cooldown.
|
||||
- [x] Purchased, available, unavailable, and cooldown-gated actions are visually distinguishable and explain why they cannot currently be used.
|
||||
- [x] The Tyrant can navigate between overview, unlock, class-assignment, and ability screens and can close the panel without changing gameplay state.
|
||||
- [x] The Tyrant can review and purchase an available unlock after confirming the selected unlock and its choice cost.
|
||||
- [x] The Tyrant can select a purchased class and assign or reassign it to an eligible online player.
|
||||
- [x] The class player selector excludes the Tyrant and clearly identifies players who are opted out or otherwise ineligible.
|
||||
- [x] Class reassignment identifies the current holder and requires confirmation before replacing that holder.
|
||||
- [x] The Tyrant can activate roster intelligence from the panel when the ability is purchased and ready.
|
||||
- [x] A successful or rejected action refreshes the panel from authoritative current state and communicates the result clearly.
|
||||
- [x] Panel actions use the same domain rules and persistence behavior as their command equivalents.
|
||||
- [x] Stale, repeated, or concurrent panel interactions cannot duplicate purchases, bypass cooldowns, or create conflicting assignments.
|
||||
- [x] Panel actions become unavailable immediately if the game pauses, the reign ends, or the player is no longer the Tyrant.
|
||||
- [x] Existing `/tyrant choices`, `/tyrant buy`, `/tyrant assign`, and `/tyrant intelligence` commands remain available as alternatives.
|
||||
|
||||
## 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.
|
||||
|
||||
## Related
|
||||
|
||||
- [Progress and purchase Tyrant unlocks](us-003-progress-and-purchase-unlocks.md)
|
||||
- [Assign unlocked classes](us-004-assign-unlocked-classes.md)
|
||||
- [Purchase and use Tyrant abilities](us-009-use-tyrant-abilities.md)
|
||||
- [Inform players and manage participation](us-011-inform-and-manage-participation.md)
|
||||
Reference in New Issue
Block a user