spring-quest.yaml 833 B

1234567891011121314151617181920212223242526272829303132
  1. # Example state machine (D15/D20: behavior language v2) — quest prototype.
  2. # State = quest stage (inactive -> active -> complete); transitions = event +
  3. # condition; rewards/state = actions. Demonstrates onEnter actions (give-item,
  4. # set-state) and the player.questProgress.<id> convention from boundaries.md.
  5. id: spring-quest
  6. initial: inactive
  7. states:
  8. - id: inactive
  9. - id: active
  10. onEnter:
  11. - action: give-item
  12. itemId: parsnip-seed
  13. qty: 1
  14. - id: complete
  15. onEnter:
  16. - action: set-state
  17. path: player.questProgress.spring-quest
  18. value: complete
  19. transitions:
  20. - from: inactive
  21. to: active
  22. on: day-start
  23. when:
  24. op: gte
  25. path: time.day
  26. value: 3
  27. - from: active
  28. to: complete
  29. when:
  30. op: gte
  31. path: player.inventory.parsnip
  32. value: 5