Ledger v3 · C# · Godot 4.7 Get started

Chains

Auras that begin auras, a death walking down a line.

✓ 2 plays, 20 steps, all passingFrom v2's cookbook

v2's cookbook, auras that begin auras (G288-G289): a line of husks, each dying into a burn that kills the next a tick later, so the death walks down the line a husk a tick however time is advanced; and a patron's sampled aura handing a miser a coin each tick, which the miser drops each time.

content/cookbook/chains.ledgerthe content
1# v2's cookbook, auras that begin auras (G288-G289): a line of husks, each dying into a burn that kills the next a tick
2# later, so the death walks down the line a husk a tick however time is advanced; and a patron's sampled aura handing a
3# miser a coin each tick, which the miser drops each time.
4
5rate 60
6stat MaxHealth
7pool Health max MaxHealth
8damage Health
9tags Coin
10event Died
12# ---- G288 a husk dying burns: a tick later, and every second after, 1000 to everyone in its reach; each it kills
13# burns in turn ----
15effect Wick
16 after Depleted Health of holder
17 raise Died of holder
18 after Died of holder
19 apply Burning
21effect Burning
22 stack ignore
23 every 1s
24 deal 1000 to all others within 1 of holder
25 start
26 apply Kindling
28effect Kindling
29 lasts 1t
30 expire
31 deal 1000 to all others within 1 of holder
33archetype Husk
34 base MaxHealth 100
35 full Health
36 has Wick
38# ---- G289 the patron's coin: its aura gives anyone within 3 a coin, sampled each tick; the miser drops each coin as it
39# is given, so each tick gives another ----
41effect Coin
42 tags Coin
44effect Patronage
45 aura Coin on all others within 3 every 1t
47effect Purse
48 after Apply of holder having Coin
49 remove Coin
51archetype Patron
52 base MaxHealth 100
53 full Health
54 has Patronage
56archetype Miser
57 base MaxHealth 100
58 full Health
59 has Purse
content/cookbook/chains.playwhat it must do
1catalog chains.ledger
2row G288 Wick Burning Kindling Husk
3row G289 Coin Patronage Purse Patron Miser
4
5play G288 "Four husks in a line, each in reach of the next: the first killed burns, and a tick later the second dies and burns, a husk a tick, stepped a tick at a time or jumped a second at once"
6 make a Husk at 0
7 make b Husk at 1
8 make c Husk at 2
9 make d Husk at 3
10 deal 1000 to a
11 expect a has Burning
12 expect b.Health = 100 from G288: b.Health
13 advance 1t
14 expect b.Health = 0 from content: G288's lethal 1000 kills b at the tick; the content's health stops at 0, a floor the row writes no word for
15 expect b has Burning
16 expect c.Health = 100 from G288: c.Health
17 save
18 advance 1s
19 expect c.Health = 0 from content: G288's lethal 1000 kills c within the second; the content's health stops at 0, a floor the row writes no word for
20 expect d.Health = 0 from content: G288's lethal 1000 kills d within the second; the content's health stops at 0, a floor the row writes no word for
22play G289 "A patron's aura gives a miser in reach a coin each tick; the miser drops each, so five ticks give five coins and none is kept"
23 make p Patron at 0
24 make m Miser at 2
25 advance 5t
26 expect event Apply of m tagged Coin 5 times from G289: "five ticks"
27 expect m lacks Coin

Run it yourself

ledger check content/cookbook/chains.ledger content/cookbook/chains.play
ledger play content/cookbook/chains.play