Ledger v3 · C# · Godot 4.7 Get started

Runs

Abilities that run on in time.

✓ 7 plays, 128 steps, all passingFrom v2's cookbook

v2's cookbook, abilities that run on in time (G307-G313): a combo kept alive by pressing in time, a leap that lands where the game says, a cast that hits push back, a reload that firing cancels, a mortar aimed and then confirmed, a held gun that fires faster and faster, and a beam that ramps while it stays on. The game writes the leap's touchdown (a mark where it came down, and Landed of the leaper by it), the mortar's final point (a mark it confirms at), and the trigger held and let go (Firing and Beaming put on and taken off).

content/cookbook/runs.ledgerthe content
1# v2's cookbook, abilities that run on in time (G307-G313): a combo kept alive by pressing in time, a leap that lands
2# where the game says, a cast that hits push back, a reload that firing cancels, a mortar aimed and then confirmed, a
3# held gun that fires faster and faster, and a beam that ramps while it stays on. The game writes the leap's touchdown
4# (a mark where it came down, and Landed of the leaper by it), the mortar's final point (a mark it confirms at), and
5# the trigger held and let go (Firing and Beaming put on and taken off).
6
7rate 60
8link team
9allegiance team
10stat MaxHealth
11stat MagSize
12pool Health max MaxHealth
13pool Ammo max MagSize
14damage Health
15tags Shot Spooled
16event Landed
18archetype Team
20archetype Fighter
21 base MaxHealth 1000
22 base MagSize 6
23 full Health Ammo
24 grants Rush Leap Chant Shot Reload Mortar Confirm Beam
26archetype Mark
28# ---- G307 rush: 10, then 10 more for each combo point, the points kept by pressing within 1.5 seconds ----
30ability Rush
31 target one
32 deal 10 + 10 * stacks(holder, Combo) to target
33 apply Combo to holder
35effect Combo
36 stack add max 2 then refresh
37 lasts 1.5s
39# ---- G308 the leap: airborne up to 2 seconds; the slam lands where the game says it came down ----
41ability Leap
42 target one
43 apply Airborne to holder
45effect Airborne
46 lasts 2s
47 after Landed of holder
48 deal 30 to all enemies within 3 of event.source
49 remove self
51# ---- G309 the chant: 3 seconds to cast, each hit taken half a second more, three at most ----
53ability Chant
54 target one
55 apply Casting to holder with victim = target
57effect Casting
58 stack extend
59 lasts 3s
60 var victim actor
61 var pushes = 0
62 after Damage of holder when self.pushes < 3
63 self.pushes += 1
64 apply Casting to holder for 0.5s
65 expire
66 deal 40 to self.victim
68# ---- G310 a reload of 2 seconds fills the magazine at its end; a shot partway through ends it ----
70ability Shot
71 tags Shot
72 target one
73 cost Ammo 1
74 deal 15 to target
76ability Reload
77 requires not has(holder, Reloading) else "reloading"
78 apply Reloading to holder
80effect Reloading
81 lasts 2s
82 ends on Activate by holder having Shot
83 expire
84 set Ammo holder.MagSize
86# ---- G311 the mortar: aimed, then confirmed within 5 seconds where the player last pointed ----
88ability Mortar
89 target one
90 apply Aiming to holder
92effect Aiming
93 lasts 5s
95ability Confirm
96 target one
97 requires has(holder, Aiming) else "not aiming"
98 remove Aiming from holder
99 deal 50 to all enemies within 2 of target
101# ---- G312 the spool: held, it fires at once and then after gaps of 0.5, 0.4, 0.3, 0.2 and then 0.1 seconds ----
103curve SpoolGap steps
104 0 0.5
105 1 0.4
106 2 0.3
107 3 0.2
108 4 0.1
110effect Firing
111 var shots = 0
112 grants Spool auto
113 after Activate by holder having Spooled
114 self.shots += 1
116ability Spool
117 tags Spooled
118 target one enemy
119 cooldown SpoolGap(grant.shots) * 1s
120 deal 10 to target
122# ---- G313 the beam: a hit at once and every half second, 5 times a charge that climbs to 4 ----
124ability Beam
125 target one
126 apply Beaming to holder with victim = target
128effect Beaming
129 var victim actor
130 var charge = 1
131 start
132 deal 5 * self.charge to self.victim
133 self.charge = min(4, self.charge + 1)
134 every 0.5s
135 deal 5 * self.charge to self.victim
136 self.charge = min(4, self.charge + 1)
content/cookbook/runs.playwhat it must do
1catalog runs.ledger
2row G307 Combo Rush Fighter
3row G308 Airborne Leap Team Fighter Mark
4row G309 Casting Chant Fighter
5row G310 Reloading Shot Reload Fighter
6row G311 Aiming Mortar Confirm Team Fighter Mark
7row G312 Firing Spool Team Fighter
8row G313 Beaming Beam Fighter
9
10play G307 "Three presses a second apart hit 10, 20 and 30; let the window close, and the next press is 10 again"
11 make f Fighter
12 make t Fighter
13 act f Rush at t
14 expect t.Health = 990 from G307: t.Health - "hit for 10"
15 advance 1s
16 act f Rush at t
17 expect t.Health = 970 from G307: t.Health - "hit for 10" - "20 and"
18 advance 1.4s
19 act f Rush at t
20 expect t.Health = 940 from G307: t.Health - "hit for 10" - "20 and" - "and 30"
21 save
22 act f Rush at t
23 expect t.Health = 910 from content: G307 leaves open whether a fourth press in time goes on after three hits; the content keeps the 2 points, 30 off the 940 left of its 1000
24 advance 1.5s
25 expect f lacks Combo
26 act f Rush at t
27 expect t.Health = 900 from content: G307 leaves open whether a press exactly 1.5 seconds on is in time; the content has closed the window, a fresh 10 off the 910 left of its 1000
29play G308 "Leapt at one foe, the fighter comes down by another: the slam takes 30 from the one by the touchdown and nothing from the one aimed at; a leap never landed hits nothing"
30 make a Team
31 make b Team
32 make f Fighter with team = a at 0
33 make aimed Fighter with team = b at 10
34 make near Fighter with team = b at 5
35 act f Leap at aimed
36 advance 1s
37 make spot Mark at 4
38 raise Landed of f by spot
39 expect near.Health = 970 from content: G308 gives no slam radius or health; the near foe, 1 from the touchdown, is inside the content's radius of 3 and takes 30 off its 1000
40 expect aimed.Health = 1000 from content: G308 gives no slam radius or health; the aimed foe, 6 from the touchdown, is beyond the content's radius of 3 and keeps its 1000
41 expect f lacks Airborne
42 save
43 act f Leap at aimed
44 advance 2s
45 expect f lacks Airborne
46 raise Landed of f by spot
47 expect near.Health = 970 from content: G308 leaves open whether a touchdown reported as the 2 seconds run out counts; the content has expired the leap, so the near foe keeps 970
49play G309 "Hit at 1 second and again at 2, the bolt lands at 4 seconds, not 3; hit four times, it is held 1.5 seconds and no more"
50 make f Fighter
51 make t Fighter
52 act f Chant at t
53 advance 1s
54 deal 5 to f
55 advance 1s
56 deal 5 to f
57 advance 1s
58 expect t.Health = 1000 from G309: t.Health
59 advance 1s
60 expect t.Health = 960 from G309: t.Health - "A bolt of 40"
61 save
62 act f Chant at t
63 deal 5 to f
64 deal 5 to f
65 deal 5 to f
66 deal 5 to f
67 expect f remaining Casting = 4.5s from G309: "3 seconds to cast" + "three pushes" * "half a second"
68 advance 4.5s
69 expect t.Health = 920 from G309: t.Health - "A bolt of 40" - "A bolt of 40"
71play G310 "Four shots leave 2 rounds; a reload can't be started twice; a shot a second in spends a round and ends it, so 2 seconds on there is still 1; a reload left alone fills the six"
72 make f Fighter
73 make t Fighter
74 repeat 4
75 act f Shot at t
76 expect f.Ammo = 2 from G310: "holds 6 rounds" - "repeat 4" * "costs one round"
77 act f Reload
78 act f Reload
79 expect refused Requirement "reloading"
80 advance 1s
81 act f Shot at t
82 expect f.Ammo = 1 from G310: "holds 6 rounds" - "repeat 4" * "costs one round" - "costs one round"
83 expect f lacks Reloading
84 advance 2s
85 expect f.Ammo = 1 from G310: "holds 6 rounds" - "repeat 4" * "costs one round" - "costs one round"
86 save
87 act f Reload
88 advance 2s
89 expect f.Ammo = 6 from G310: "6 rounds"
91play G311 "Aimed at one spot and confirmed at another, the shell lands where it was confirmed; an aim not confirmed in 5 seconds fires nothing"
92 make a Team
93 make b Team
94 make f Fighter with team = a at 0
95 make first Mark at 10
96 make last Mark at 20
97 make e1 Fighter with team = b at 10
98 make e2 Fighter with team = b at 21
99 act f Mortar at first
100 advance 2s
101 act f Confirm at last
102 expect e2.Health = 950 from content: G311 gives no blast radius or health; enemy 2, 1 from the confirmed spot, is inside the content's radius of 2 and takes 50 off its 1000
103 expect e1.Health = 1000 from content: G311 gives no blast radius or health; enemy 1, 10 from the confirmed spot, is beyond the content's radius of 2 and keeps its 1000
104 save
105 act f Mortar at first
106 advance 5s
107 act f Confirm at first
108 expect refused Requirement "not aiming"
110play G312 "Held, the gun fires at 0, 0.5, 0.9, 1.2, 1.4, 1.5 and 1.6 seconds, 10 a shot; let go, it stops"
111 make a Team
112 make b Team
113 make f Fighter with team = a at 0
114 make t Fighter with team = b at 5
115 apply Firing to f
116 expect t.Health = 990 from G312: t.Health - "fires 10 damage"
117 advance 0.5s
118 expect t.Health = 980 from G312: t.Health - "fires 10 damage" * (count "apply Firing" + count "advance")
119 advance 0.4s
120 expect t.Health = 970 from G312: t.Health - "fires 10 damage" * (count "apply Firing" + count "advance")
121 advance 0.3s
122 expect t.Health = 960 from G312: t.Health - "fires 10 damage" * (count "apply Firing" + count "advance")
123 save
124 advance 0.2s
125 expect t.Health = 950 from G312: t.Health - "fires 10 damage" * (count "apply Firing" + count "advance")
126 advance 0.1s
127 expect t.Health = 940 from G312: t.Health - "fires 10 damage" * (count "apply Firing" + count "advance")
128 advance 0.1s
129 expect t.Health = 930 from G312: t.Health - "fires 10 damage" * (count "apply Firing" + count "advance")
130 remove Firing from f
131 advance 1s
132 expect t.Health = 930 from G312: t.Health - "fires 10 damage" * (count "apply Firing" + count "advance 0.5s" + count "advance 0.4s" + count "advance 0.3s" + count "advance 0.2s" + count "advance 0.1s")
134play G313 "Held, the beam hits 5, 10, 15, 20, 20 at half-second steps, 70 in two seconds; let go, it stops"
135 make f Fighter
136 make t Fighter
137 act f Beam at t
138 expect t.Health = 995 from G313: t.Health - "hits are 5"
139 advance 0.5s
140 expect t.Health = 985 from content: G313 writes the hits of 5 and 10 in one list, no words holding either alone; their 15 off the content's 1000
141 advance 0.5s
142 expect t.Health = 970 from content: G313 writes the hits of 5, 10 and 15 in one list, no words holding one alone; their 30 off the content's 1000
143 save
144 advance 1s
145 expect t.Health = 930 from G313: t.Health - "(70 damage"
146 remove Beaming from f
147 advance 1s
148 expect t.Health = 930 from G313: t.Health - "(70 damage"

What a change to Health meets

Every rule in this recipe a change to Health passes through, in order. Each line is a link to the rule.

> ledger pipeline content/cookbook/runs.ledger Health
Health: a change to it meets 1 rule, in this order
after it lands
  Casting: Damage of holder when self.pushes < 3 (content/cookbook/runs.ledger:62)
    hears what landed; applied by Chant, Casting
no archetype lacks a layer its like hold

Run it yourself

ledger check content/cookbook/runs.ledger content/cookbook/runs.play
ledger play content/cookbook/runs.play
ledger pipeline content/cookbook/runs.ledger Health