Fuse
Charges that come back, and a grenade on a fuse
pool ... refill N every Dtarget directionflies ... landsof projectileCharges that come back, and a throw on a fuse, lifted from the shooter slice's content\grenade.ledger (the Grenade ability and its archetype) and the player's charges from content\player.ledger (the Grenades pool). The player holds three grenades, one back every 4 seconds. Thrown along the aim, a grenade blows up on its 1.5 second fuse: 40 to every foe within 3 of where it lies, credited to its thrower. The game throws it as a body and tells the world its place each tick; the world's radius sees no walls.
1
# Charges that come back, and a throw on a fuse, lifted from the shooter slice's content\grenade.ledger (the Grenade2
# ability and its archetype) and the player's charges from content\player.ledger (the Grenades pool). The player holds3
# three grenades, one back every 4 seconds. Thrown along the aim, a grenade blows up on its 1.5 second fuse: 40 to every4
# foe within 3 of where it lies, credited to its thrower. The game throws it as a body and tells the world its place5
# each tick; the world's radius sees no walls.7
rate 608
stat MaxHealth9
pool Health max MaxHealth10
pool Grenades max 3 whole refill 1 every 4s11
damage Health12
link team owner13
allegiance team14
tags Unit Blast16
ability Grenade17
target direction18
cost Grenades 119
cooldown 0.5s20
flies Grenade up to 1.5s21
lands22
deal 40 Blast to all enemies having Unit within 3 of projectile24
archetype Grenade26
archetype Side28
archetype Player29
tags Unit30
base MaxHealth 10031
full Health Grenades32
grants Grenade34
archetype Dummy35
tags Unit36
base MaxHealth 100037
full Health1
catalog fuse.ledger3
# The grenade's numbers, from Grenade (a 1.5 s fuse, 40 within 3) and the Grenades pool (3, one back every 4 s). A4
# player of side r at 0 throws east; the game places the grenade where its body lies.6
play "thrown: on its fuse at 1.5 s it blows 40 into a foe 2 from where it lies, and none into one 4 off"7
make r Side8
make b Side9
make h Player with team = r at 010
make d Dummy with team = b at 711
make far Dummy with team = b at 912
act h Grenade toward 1 0 as g projectile nade13
expect done14
expect h.Grenades = 2 from content: 3 less the throw's 115
place nade 516
advance 1.4s17
expect d.Health = 1000 from content: the fuse's 1.5 s not through18
save19
advance 0.1s20
expect d.Health = 960 from content: 1000 less 40, 2 from where it lay21
expect far.Health = 1000 from content: 4 from it, past 322
expect event Change of d credited to h tagged Blast24
play "three thrown empty the charges; one comes back 4 s on"25
make r Side26
make h Player with team = r at 027
act h Grenade toward 1 028
advance 0.5s29
act h Grenade toward 1 030
advance 0.5s31
act h Grenade toward 1 032
advance 0.5s33
act h Grenade toward 1 034
expect refused CannotAfford35
expect h.Grenades = 0 from content: 3 less three throws36
advance 2.5s37
expect h.Grenades = 1 from content: one back 4 s after the first throwRun it yourself
ledger check content/cookbook/mechanics/fuse.ledger content/cookbook/mechanics/fuse.play
ledger play content/cookbook/mechanics/fuse.play