Smoke
Making a thing at a place, lasting two rounds
create ... at targetlasts N EVENTendMaking 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.
1
# Making a thing at a place, for a lifetime counted in rounds, lifted from the tactics slice's content\smoke.ledger2
# (Smoke, Dissipating and SmokeCloud), with the pools and events of content\rules.ledger and its soldier from3
# content\units.ledger. Thrown at a point within 6 the side sees, for the unit's action and one smoke, it makes a cloud4
# standing at the point. The cloud lasts until the second round after it starts: a lifetime counted in events ends5
# expired, as one in time does, so its expire takes the cloud away. The game reads the cells round a cloud as smoke6
# and blocks sight through them.8
rate 109
link team10
allegiance team11
fact Seen12
pool Actions max 1 whole13
pool Smokes whole14
tags Cloud15
event TurnStarted RoundStarted16
turn TurnStarted18
ability Smoke19
target point within 620
requires fact(Seen, holder, target) > 0 else "can't see there"21
cost Actions 122
cost Smokes 123
create SmokeCloud at target25
effect Dissipating26
lasts 2 RoundStarted27
expire28
destroy holder30
archetype SmokeCloud31
tags Cloud32
has Dissipating34
archetype Side36
archetype Soldier37
with Actions = 1, Smokes = 138
grants Smoke1
catalog smoke.ledger3
# The smoke's numbers, from Smoke and Dissipating: one cloud at the throw's point, gone at the second RoundStarted.5
play "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 Side7
make s Soldier with team = squad at 0 08
fact Seen s 3 09
act s Smoke at 3 010
expect done11
expect s.Smokes = 0 from content: 1 less the throw's 112
expect s.Actions = 0 from content: 1 less the throw's 113
expect count SmokeCloud = 1 from content: the throw above14
find c SmokeCloud15
expect c at 3 0 from content: the throw's point16
raise RoundStarted of c17
expect c alive18
save19
raise RoundStarted of c20
expect c gone21
expect count SmokeCloud = 0 from content: gone at the second roundRun it yourself
ledger check content/cookbook/mechanics/smoke.ledger content/cookbook/mechanics/smoke.play
ledger play content/cookbook/mechanics/smoke.play