Grenade
An area round a point that hurts friend and foe, at a cell the side sees
target point withinfact(Seen, holder, target)all actors within ... whenAn area round a point that hurts friend and foe, lifted from the tactics slice's content\grenade.ledger (Grenade), with the pools and the sight fact of content\rules.ledger and its units from content\units.ledger. Thrown at a point within 6 the thrower's side sees, for its action and one grenade, it never misses: 3 to every unit within 1.5 of the point, the cell and the eight round it, the thrower among them. Whether a side sees a cell is the game's fog, asked as a fact of the point.
1
# An area round a point that hurts friend and foe, lifted from the tactics slice's content\grenade.ledger (Grenade),2
# with the pools and the sight fact of content\rules.ledger and its units from content\units.ledger. Thrown at a point3
# within 6 the thrower's side sees, for its action and one grenade, it never misses: 3 to every unit within 1.5 of the4
# point, the cell and the eight round it, the thrower among them. Whether a side sees a cell is the game's fog,5
# asked as a fact of the point.7
rate 108
link team9
allegiance team10
fact Seen11
stat MaxHealth12
pool Health max MaxHealth whole13
pool Actions max 1 whole14
pool Grenades whole15
damage Health16
tags Dead Cloud18
ability Grenade19
target point within 620
requires fact(Seen, holder, target) > 0 else "can't see there"21
cost Actions 122
cost Grenades 123
deal 3 to all actors within 1.5 of target when not has(it, Dead) and not has(it, Cloud)25
archetype Side27
archetype Soldier28
base MaxHealth 729
full Health30
with Actions = 1, Grenades = 131
grants Grenade33
archetype Trooper34
base MaxHealth 535
full Health1
catalog grenade.ledger3
# The grenade's numbers, from Grenade: 3 to every unit within 1.5 of the point, thrown within 6 at a cell the side4
# sees, one action and one grenade.6
play "thrown at (4, 0): 3 to the trooper there, the one diagonal and the soldier beside, none to one 2 away"7
make squad Side8
make aliens Side9
make s Soldier with team = squad at 0 010
make ally Soldier with team = squad at 3 111
make a Trooper with team = aliens at 4 012
make b Trooper with team = aliens at 5 113
make c Trooper with team = aliens at 6 014
act s Grenade at 4 015
expect refused Requirement "can't see there"16
fact Seen s 4 017
act s Grenade at 4 018
expect done19
expect a.Health = 2 from content: the trooper's 5 less 3, at the point20
expect b.Health = 2 from content: 5 - 3, about 1.41 away, inside 1.521
expect ally.Health = 4 from content: the soldier's 7 less 3, about 1.41 away: friends too22
expect c.Health = 5 from content: 2 away, past 1.523
expect s.Health = 7 from content: the thrower is 4 away24
expect s.Grenades = 0 from content: 1 less the throw's 125
expect s.Actions = 0 from content: 1 less the throw's 127
play "7 away is past the throw's 6; the thrower in its own blast takes 3"28
make squad Side29
make s Soldier with team = squad at 0 030
fact Seen s 7 031
fact Seen s 1 032
act s Grenade at 7 033
expect refused OutOfReach34
save35
act s Grenade at 1 036
expect done37
expect s.Health = 4 from content: the soldier's 7 less 3, 1 from the pointRun it yourself
ledger check content/cookbook/mechanics/grenade.ledger content/cookbook/mechanics/grenade.play
ledger play content/cookbook/mechanics/grenade.play