Ledger v3 · C# · Godot 4.7 Get started

Pierce

A shot the game flies that passes through two foes and stops in the third

✓ 2 plays, 32 steps, all passingFrom ARPG, content\spear.ledger
flies ... up topierces Nreport

A shot that pierces, from the ARPG slice's content\spear.ledger. The game flies the head along the aim and reports each foe it overlaps, keeping no list: it passes two, 24 to each, and stops in the third; one passed is refused AlreadyMet. Ordered with no actor: the aim is the game's. Met nothing in its 0.8 s, it ends Missed.

content/cookbook/mechanics/pierce.ledgerthe content
1# A shot that pierces, from the ARPG slice's content\spear.ledger. The game flies the head along the aim and reports
2# each foe it overlaps, keeping no list: it passes two, 24 to each, and stops in the third; one passed is refused
3# AlreadyMet. Ordered with no actor: the aim is the game's. Met nothing in its 0.8 s, it ends Missed.
4
5rate 60
6stat MaxHealth
7pool Health max MaxHealth
8damage Health
9link team
10allegiance team
11tags Physical
13ability Spear
14 tags Physical
15 target one enemy
16 cooldown 0.6s
17 flies Spearhead up to 0.8s
18 pierces 2
19 deal 24 Physical to target
21# what flies, on its thrower's side
22archetype Spearhead
24archetype Side
26archetype Thrower
27 base MaxHealth 300
28 full Health
29 grants Spear
31archetype Dummy
32 base MaxHealth 1000
33 full Health
content/cookbook/mechanics/pierce.playwhat it must do
1catalog pierce.ledger
2
3# The spear's numbers, from Spear: 24 to each foe met, through two and into the third, flying up to 0.8 s. A thrower
4# of side r at (0, 0) throws east; the game flies the head and reports what it met. Dummies of side b stand at 1000.
5
6play "the game reports two foes passed, 24 each, and a third, 24, which ends the flight and its head"
7 make r Side
8 make b Side
9 make h Thrower with team = r at 0 0
10 make a Dummy with team = b at 2 0
11 make c Dummy with team = b at 4 0
12 make d Dummy with team = b at 6 0
13 make e Dummy with team = b at 8 0
14 act h Spear as s projectile head
15 expect done
16 expect head.team = r
17 expect s running elapsed 0t remaining 0.8s from content: flies up to 0.8s
18 report s met a
19 expect done
20 expect s running pierced 1 from content: pierces 2, one used
21 report s met c
22 expect done
23 save
24 report s met d
25 expect done
26 expect a.Health = 976 from content: 1000 less 24, pierced
27 expect c.Health = 976 from content: 1000 less 24, pierced
28 expect d.Health = 976 from content: 1000 less 24, where it stopped
29 expect s ended
30 expect head gone
31 expect e.Health = 1000 from content: past the third, nothing met
33play "met nothing by its 0.8 s, it ends Missed, and its head with it"
34 make r Side
35 make h Thrower with team = r at 0 0
36 act h Spear as s projectile head
37 expect done
38 advance 0.8s
39 expect h stopped Spear Missed
40 expect head gone

Run it yourself

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