| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- # Endgame quest (D29/D33): activated on the day-start after the mayor-talk-quest
- # completes, completes on a later day-start once the player has earned at least
- # 500 gold (the restoration goal the Mayor reveals). On completion it pays a
- # bonus, sets the questProgress slot, and raises player.flag.victory — which
- # gates the Mayor's and Mia's victory dialogue branches. The gold reward uses
- # the `add` incremental action (D33); questProgress + flag are absolute set-state.
- id: restoration-quest
- initial: inactive
- states:
- - id: inactive
- - id: active
- - id: complete
- onEnter:
- - action: give-item
- itemId: egg
- qty: 3
- - action: add
- path: player.gold
- value: 200
- - action: play-bgm
- soundId: bgm-victory
- fadeMs: 500
- - action: play-sound
- sound: harvest
- - action: set-state
- path: player.questProgress.restoration-quest
- value: complete
- - action: set-state
- path: player.flag.victory
- value: true
- transitions:
- - from: inactive
- to: active
- on: day-start
- when:
- and:
- - { op: eq, path: player.questProgress.mayor-talk-quest, value: complete }
- - not: { op: exists, path: player.questProgress.restoration-quest }
- - from: active
- to: complete
- on: day-start
- when:
- op: gte
- path: player.gold
- value: 500
|