starter-quest.yaml 967 B

12345678910111213141516171819202122232425262728293031323334
  1. # Quest prototype (D20): harvest three parsnips. Activates on the first
  2. # day-start at day >= 2 (after the starter gift), completes on a crop-harvest
  3. # event once player.inventory.parsnip >= 3, and pays a seed restock on enter.
  4. # questProgress.<id> is the conventions quest-state slot from boundaries.md.
  5. id: starter-quest
  6. initial: inactive
  7. states:
  8. - id: inactive
  9. - id: active
  10. - id: complete
  11. onEnter:
  12. - action: give-item
  13. itemId: parsnip-seed
  14. qty: 2
  15. - action: play-sound
  16. sound: harvest
  17. - action: set-state
  18. path: player.questProgress.starter-quest
  19. value: complete
  20. transitions:
  21. - from: inactive
  22. to: active
  23. on: day-start
  24. when:
  25. and:
  26. - { op: gte, path: time.day, value: 2 }
  27. - not: { op: exists, path: player.questProgress.starter-quest }
  28. - from: active
  29. to: complete
  30. on: crop-harvest
  31. when:
  32. op: gte
  33. path: player.inventory.parsnip
  34. value: 3