mayor-talk-quest.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # Quest chain 3 (D29/D33): activated on the day-start after the carrot-quest
  2. # completes, completes when the mayor dialogue is finished (dialogue-end with
  3. # the mayor dialogue id — the terminal node auto-ends the dialogue, D21),
  4. # pays an egg + a +100 gold grant on completion. The gold reward uses the
  5. # `add` incremental action (D33) — the D29 language gap (set-state is absolute,
  6. # D20) is closed; questProgress stays an absolute set-state.
  7. id: mayor-talk-quest
  8. initial: inactive
  9. states:
  10. - id: inactive
  11. - id: active
  12. - id: complete
  13. onEnter:
  14. - action: give-item
  15. itemId: egg
  16. qty: 1
  17. - action: add
  18. path: player.gold
  19. value: 100
  20. - action: set-state
  21. path: player.questProgress.mayor-talk-quest
  22. value: complete
  23. transitions:
  24. - from: inactive
  25. to: active
  26. on: day-start
  27. when:
  28. and:
  29. - { op: eq, path: player.questProgress.carrot-quest, value: complete }
  30. - not: { op: exists, path: player.questProgress.mayor-talk-quest }
  31. - from: active
  32. to: complete
  33. on: dialogue-end
  34. when:
  35. op: eq
  36. path: payload.dialogueId
  37. value: mayor