skara-brae-common/docs/openup/analysis-design/sequences/uc-12-level-up.puml
Jan-Peter von Hunnius 193562cbc4 openup: doc restructure - template alignment + design sequences (non-PSP)
Align the OpenUP markdown set to the blank templates (process-data repo,
templates/openup/) per BUILD-CHECKLIST 7. Scenario step text unchanged;
the EA model needs no change (brief descriptions already live in the
model's UC/actor notes).

- vision.md: positioning tables, stakeholder summary, user environment,
  needs-and-features table (R1/R2), other product requirements
- use-case-model.md: per-UC specification sections (brief description,
  actor descriptions, named alternative/exception subsections with
  numbered steps, post-conditions, special requirements)
- supplementary-specifications.md: category tables with priority and
  use-case columns + reverse coverage matrix; IDs unchanged
- test/quality-check-procedure.md: migrated from Joplin (single content
  home); stale open items marked resolved (WI-1/WI-2)
- analysis-design/sequences/: 12 PlantUML design sequences (lifelines =
  analysis classes, messages = design elements; per the PlantUML layout
  style guide) + PNG renders; embedded in Architecture Notebook 9.3
- Joplin consolidated: project content notes deleted (all live in
  docs/game + docs/openup); Joplin keeps the status note only
2026-10-05 11:22:38 +02:00

26 lines
990 B
Text

@startuml uc-12-level-up
autonumber
title UC-12 Level Up at Review Board (design sequence)
actor Player
participant "ReviewBoundary\n«/api/characters/{id}/level-up»" as boundary <<boundary>>
participant "ReviewBoard\nsb-core::character::level_up" as control <<control>>
participant "Progression\nxp_for_level + level_up_cost" as entity <<entity>>
== Level up ==
Player -> boundary : POST level-up
boundary -> control : level_up(character)
control -> entity : xp_for_level(next) = 18*100*level^2
control -> entity : cost = 500 * next level
alt at max level 100
control --> boundary : 422 (DomainError)
else XP below threshold
control --> boundary : 422 (DomainError)
else gold < cost
control --> boundary : 422 (DomainError)
else ok
control -> entity : level += 1, gold -= cost
control -> entity : recompute + fully restore\nHP/energy/nerve/max SP, persist
control --> boundary : {success, message, character}
boundary --> Player : {success, message, character}
end
@enduml