festival-autumn.yaml 967 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. id: festival-autumn
  2. initial: inactive
  3. states:
  4. - id: inactive
  5. - id: active
  6. onEnter:
  7. - action: give-item
  8. itemId: festival-harvest-charm
  9. qty: 1
  10. - action: add
  11. path: player.gold
  12. value: 150
  13. - action: set-state
  14. path: player.flag.festivalAutumn
  15. value: true
  16. - action: play-bgm
  17. soundId: bgm-autumn
  18. fadeMs: 800
  19. - id: inactive2
  20. onEnter:
  21. - action: stop-bgm
  22. fadeMs: 500
  23. transitions:
  24. - from: inactive
  25. to: active
  26. on: day-start
  27. when:
  28. and:
  29. - { op: eq, path: time.day, value: 18 }
  30. - { op: eq, path: time.season, value: autumn }
  31. - not: { op: exists, path: player.flag.festivalAutumn }
  32. - from: active
  33. to: inactive2
  34. on: day-start
  35. when:
  36. and:
  37. - { op: exists, path: player.flag.festivalAutumn }
  38. - not: { op: eq, path: time.day, value: 18 }
  39. - from: inactive2
  40. to: inactive2
  41. on: day-start