feat(potions): add restoration potion for default player size
This commit is contained in:
@@ -11,3 +11,4 @@ description: Catalog of user stories for the Spigot Heights plugin.
|
||||
3. [US-003: Launch tiny players through dispensers](us-003-launch-tiny-players.md)
|
||||
4. [US-004: Configure and persist stature behavior](us-004-configure-and-persist.md)
|
||||
5. [US-005: Build and release the plugin](us-005-build-and-release.md)
|
||||
6. [US-006: Restore default stature](us-006-restore-default-stature.md)
|
||||
|
||||
@@ -17,9 +17,10 @@ As a **server operator**, I want validated stature and launcher settings with du
|
||||
- [x] Player scales are stored by UUID using atomic file replacement where supported.
|
||||
- [x] Updating known state preserves unknown forward-compatible YAML fields.
|
||||
- [x] Missing state defaults safely to scale `1.0` clamped to the configured range.
|
||||
- [x] Saved out-of-range state is clamped before it is applied.
|
||||
- [x] Saved out-of-range state is clamped before it is applied, except exact scale `1.0`, which is preserved for restoration.
|
||||
- [x] Configuration and state behavior have automated tests.
|
||||
|
||||
## Related
|
||||
|
||||
- [User-story catalog](index.md)
|
||||
- [US-006: Restore default stature](us-006-restore-default-stature.md)
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
type: User Story
|
||||
title: "US-006: Restore default stature"
|
||||
description: Let players craft a potion that permanently restores their scale to 1.0.
|
||||
status: done
|
||||
---
|
||||
|
||||
# US-006: Restore default stature
|
||||
|
||||
As a **player**, I want a Potion of Restoration so that I can return to normal size.
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- [x] Drinking the potion sets scale to exactly `1.0`, regardless of configured limits.
|
||||
- [x] The potion uses distinct persistent metadata rather than its display name for identity.
|
||||
- [x] The new scale is reported and saved by UUID, and retained across reconnects and respawns.
|
||||
- [x] The recipe is `GAG/ASA/GUG`, where `G` is Gold Ingot, `A` is Amethyst Shard, `S` is an authenticated Potion of Shifting Stature, and `U` is Sugar.
|
||||
- [x] Automated tests cover restoration, saved-scale handling, recipe shape, and distinct identity; the README documents the recipe and behavior.
|
||||
|
||||
## Verification
|
||||
|
||||
- `./gradlew clean check jar` passed all 17 tests.
|
||||
- Automated coverage checks scale calculation, storage reload, range exceptions, recipe shape, and enum identity. Code inspection confirms metadata authentication, ingredient registration, and the shared consumption/join/respawn adapters; no live-server gameplay test was performed.
|
||||
|
||||
## Related
|
||||
|
||||
- [US-002: Make precise stature adjustments](us-002-adjust-stature.md)
|
||||
- [US-004: Configure and persist stature behavior](us-004-configure-and-persist.md)
|
||||
Reference in New Issue
Block a user