35 lines
584 B
Plaintext
35 lines
584 B
Plaintext
|
|
// Test comparison expressions in life arcs
|
||
|
|
|
||
|
|
life_arc AgeProgression {
|
||
|
|
state child {
|
||
|
|
on age > 12 -> teen
|
||
|
|
}
|
||
|
|
state teen {
|
||
|
|
on age >= 18 -> adult
|
||
|
|
}
|
||
|
|
state adult {
|
||
|
|
on age > 65 -> senior
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
life_arc EnergyStates {
|
||
|
|
state rested {
|
||
|
|
on energy < 0.3 -> tired
|
||
|
|
}
|
||
|
|
state tired {
|
||
|
|
on energy <= 0.1 -> exhausted
|
||
|
|
}
|
||
|
|
state exhausted {
|
||
|
|
on energy >= 0.5 -> rested
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
life_arc HealthStates {
|
||
|
|
state healthy {
|
||
|
|
on health < 50 -> sick
|
||
|
|
}
|
||
|
|
state sick {
|
||
|
|
on health >= 80 -> healthy
|
||
|
|
}
|
||
|
|
}
|