Turns
Whose turn it is, a readiness meter.
v2's cookbook, whose turn it is (G335-G336): a readiness meter each fighter fills at its own speed, ready when full and emptied by the turn it takes; and haste and slow on that meter, felt at once. The game keeps the turn order: it hears Ready, and orders the turn.
1
# v2's cookbook, whose turn it is (G335-G336): a readiness meter each fighter fills at its own speed, ready when full2
# and emptied by the turn it takes; and haste and slow on that meter, felt at once. The game keeps the turn order: it3
# hears Ready, and orders the turn.5
rate 606
stat MaxHealth7
stat Speed8
stat ReadyRate9
pool Health max MaxHealth10
pool Readiness max 100 regen ReadyRate11
damage Health12
event Ready14
# ---- G335 the readiness meter: 10 a second at speed 1, ready at 100; a turn spends the 100 ----16
effect Waiting17
after Filled Readiness of holder18
raise Ready of holder20
ability TakeTurn21
cost Readiness 10023
archetype Swordsman24
base MaxHealth 10025
base Speed 126
base ReadyRate 10 * holder.Speed27
full Health28
pools Readiness29
has Waiting30
grants TakeTurn32
archetype Courier33
base MaxHealth 10034
base Speed 235
base ReadyRate 10 * holder.Speed36
full Health37
pools Readiness38
has Waiting39
grants TakeTurn41
# ---- G336 haste: half again the speed for 10 seconds; slow: half of it ----43
effect Hasted44
lasts 10s45
Speed + 50%47
effect Slowed48
lasts 10s49
Speed - 50%1
catalog turns.ledger2
row G335 Waiting TakeTurn Swordsman Courier3
row G336 Hasted Slowed TakeTurn Swordsman5
play G335 "The courier is ready at 5 seconds and the swordsman at 10; a turn taken empties the meter, which fills again from nothing; one not ready can't take a turn"6
make s Swordsman7
make c Courier8
act s TakeTurn9
expect refused CannotAfford10
advance 4.9s11
expect no event Ready of c12
advance 0.1s13
expect event Ready of c 1 time from G335: ("advance 4.9s" + "advance 0.1s") / "courier is ready at 5 seconds"14
act c TakeTurn15
expect c.Readiness = 0 from G335: "100 at its own" - "spends 100"16
save17
advance 5s18
expect event Ready of s 1 time from G335: ("advance 4.9s" + "advance 0.1s" + "advance 5s") / "swordsman at 10"19
expect event Ready of c 1 time from G335: "advance 5s" / "courier is ready at 5 seconds"20
act s TakeTurn21
expect s.Readiness = 0 from G335: "100 at its own" - "spends 100"23
play G336 "Two seconds of haste on a half-full swordsman put its meter at 80, beside another's 70; slowed after its turn, the other is at 50 ten seconds on, half a turn lost, and full 5 seconds later"24
make s Swordsman25
make t Swordsman26
advance 5s27
apply Hasted to s28
advance 2s29
expect s.Readiness = 80 from G336: "meter at 80"30
expect t.Readiness = 70 from G336: "10 per second" in G335 * ("advance 5s" + "advance 2s")31
advance 3s32
act t TakeTurn33
expect done34
apply Slowed to t35
save36
advance 10s37
expect t.Readiness = 50 from G336: "10 per second" in G335 * (1 - "takes 50% off") * "advance 10s"38
expect t lacks Slowed39
advance 5s40
expect t.Readiness = 100 from G336: "10 per second" in G335 * (1 - "takes 50% off") * "advance 10s" + "10 per second" in G335 * "advance 5s"Run it yourself
ledger check content/cookbook/turns.ledger content/cookbook/turns.play
ledger play content/cookbook/turns.play