Ledger v3 · C# · Godot 4.7 Get started

Smoke

Making a thing at a place, lasting two rounds

✓ 1 play, 16 steps, all passingFrom Tactics, content\smoke.ledger
create ... at targetlasts N EVENTend

Making a thing at a place, for a lifetime counted in rounds, lifted from the tactics slice's content\smoke.ledger (Smoke, Dissipating and SmokeCloud), with the pools and events of content\rules.ledger and its soldier from content\units.ledger. Thrown at a point within 6 the side sees, for the unit's action and one smoke, it makes a cloud standing at the point. The cloud lasts until the second round after it starts: a lifetime counted in events ends expired, as one in time does, so its expire takes the cloud away. The game reads the cells round a cloud as smoke and blocks sight through them.

content/cookbook/mechanics/smoke.ledgerthe content
1# Making a thing at a place, for a lifetime counted in rounds, lifted from the tactics slice's content\smoke.ledger
2# (Smoke, Dissipating and SmokeCloud), with the pools and events of content\rules.ledger and its soldier from
3# content\units.ledger. Thrown at a point within 6 the side sees, for the unit's action and one smoke, it makes a cloud
4# standing at the point. The cloud lasts until the second round after it starts: a lifetime counted in events ends
5# expired, as one in time does, so its expire takes the cloud away. The game reads the cells round a cloud as smoke
6# and blocks sight through them.
7
8rate 10
9link team
10allegiance team
11fact Seen
12pool Actions max 1 whole
13pool Smokes whole
14tags Cloud
15event TurnStarted RoundStarted
16turn TurnStarted
18ability Smoke
19 target point within 6
20 requires fact(Seen, holder, target) > 0 else "can't see there"
21 cost Actions 1
22 cost Smokes 1
23 create SmokeCloud at target
25effect Dissipating
26 lasts 2 RoundStarted
27 expire
28 destroy holder
30archetype SmokeCloud
31 tags Cloud
32 has Dissipating
34archetype Side
36archetype Soldier
37 with Actions = 1, Smokes = 1
38 grants Smoke
content/cookbook/mechanics/smoke.playwhat it must do
1catalog smoke.ledger
2
3# The smoke's numbers, from Smoke and Dissipating: one cloud at the throw's point, gone at the second RoundStarted.
4
5play "the throw spends the action and the smoke and makes one cloud at its point, which lasts through one round's start and is gone at the second"
6 make squad Side
7 make s Soldier with team = squad at 0 0
8 fact Seen s 3 0
9 act s Smoke at 3 0
10 expect done
11 expect s.Smokes = 0 from content: 1 less the throw's 1
12 expect s.Actions = 0 from content: 1 less the throw's 1
13 expect count SmokeCloud = 1 from content: the throw above
14 find c SmokeCloud
15 expect c at 3 0 from content: the throw's point
16 raise RoundStarted of c
17 expect c alive
18 save
19 raise RoundStarted of c
20 expect c gone
21 expect count SmokeCloud = 0 from content: gone at the second round

Run it yourself

ledger check content/cookbook/mechanics/smoke.ledger content/cookbook/mechanics/smoke.play
ledger play content/cookbook/mechanics/smoke.play