Files
spigot-stealth/design/user-stories/us-001-accumulate-invisibility-and-unlock.md
T
dmg 91c9e7b9ad
CI / build (push) Successful in 2m31s
Release / release (push) Successful in 3m30s
feat(progression): unlock stealth from potion invisibility
2026-08-15 00:01:26 -04:00

33 lines
2.0 KiB
Markdown

---
type: User Story
title: "US-001: Accumulate invisibility time and unlock stealth"
description: Reward sustained use of directly consumed invisibility potions with the stealth ability.
status: done
---
# US-001: Accumulate invisibility time and unlock stealth
As a **player**, I want my qualifying invisibility time to accumulate so that sustained potion use eventually unlocks stealth.
## Acceptance criteria
- [x] Only time spent online under an invisibility effect produced by a potion the player directly drank contributes to progression.
- [x] Invisibility received from splash potions, lingering potions, tipped arrows, commands, plugins, or other sources does not contribute.
- [x] Qualifying time stops when the effect ends, is removed, is replaced by a non-qualifying source, the player disconnects, or the plugin disables.
- [x] Refreshed or overlapping qualifying effects never count elapsed time more than once.
- [x] Qualifying time accumulates across effects, sessions, and server restarts.
- [x] The ability unlocks when accumulated qualifying time reaches eight hours by default.
- [x] Reaching the threshold grants the unlock exactly once without discarding excess elapsed time.
- [x] When an online player unlocks stealth, they receive both a full-screen title and a chat message explaining the ability.
- [x] Progress and unlock ownership are associated with the player's UUID rather than their current name.
## Validation
Automated tests verify monotonic accumulation across intervals, refresh without duplicate time, exact-once threshold crossing with excess-time preservation, direct potion-drink cause filtering, non-qualifying replacement, UUID state, and online title and chat presentation. The complete `./gradlew clean check jar` lifecycle passes.
## Related
- [Rejoin without a visible identity](us-002-rejoin-without-visible-identity.md)
- [Check personal stealth progress](us-003-check-personal-progress.md)
- [Configure and persist stealth progression](us-005-configure-and-persist-progression.md)