| 123456789101112131415161718192021222324252627282930 |
- # Production rule (D9 / D19): the engine emits animal-produce per eligible day
- # for a mature chicken; this machine turns that event into an egg grant. The
- # machine alternates on successive animal-produce events, so the egg is granted
- # on every second produce — frequency is language-owned, not engine-owned.
- id: chicken-egg
- initial: waiting
- states:
- - id: waiting
- - id: laid
- onEnter:
- - action: give-item
- itemId: egg
- qty: 1
- - action: play-sound
- sound: coin
- transitions:
- - from: waiting
- to: laid
- on: animal-produce
- when:
- op: eq
- path: payload.animalDefId
- value: chicken
- - from: laid
- to: waiting
- on: animal-produce
- when:
- op: eq
- path: payload.animalDefId
- value: chicken
|