| 1234567891011121314151617181920212223242526272829 |
- # Stamina/skills demonstration (D29): stamina is a plain seeded player field
- # (D19 verdict — no StaminaSystem); the language owns the rules. This machine
- # (a) restores stamina on day-start (set-state) and (b) alerts when the
- # fishing Mod drains it below 30 (a transition CONDITION on player.stamina).
- # initial differs from the day-start target so the ready onEnter restore runs.
- id: daily-stamina
- initial: idle
- states:
- - id: idle
- - id: ready
- onEnter:
- - action: set-state
- path: player.stamina
- value: 100
- - id: low
- onEnter:
- - action: play-sound
- sound: coin
- transitions:
- - from: ready
- to: low
- on: player-intent
- when:
- op: lte
- path: player.stamina
- value: 30
- onSchedule:
- - at: day-start
- to: ready
|