Ledger v3 · C# · Godot 4.7 Get started

Casting

A caster's slot holding off its instants, an interrupt reading the time left, a cast pushed back by hits, and a channel quickening each beat

✓ 4 plays, 66 steps, all passingFrom the raid, its witnesses slot, time-left, pushback and quicken
phases ... slot alloff castremaining(ACTOR)pushed back D at most N byevery Fself.beats

A caster's cast time, from the raid's four witnesses (its slot.ledger, time-left.ledger, pushback.ledger and quicken.ledger): the catalog's slot holds every ability while a cast runs, but the interrupt saying off cast; the interrupt reads the time its target's cast has left, its length said once, in its windup; a hit steps a cast back half a second, three times a cast at most; and a channel's beats come each a tenth sooner than the last, its interval read again at each beat with the count of beats run. Every phase runs on its caster's CastSpeed.

content/cookbook/mechanics/casting.ledgerthe content
1# A caster's cast time, from the raid's four witnesses (its slot.ledger, time-left.ledger, pushback.ledger and
2# quicken.ledger): the catalog's slot holds every ability while a cast runs, but the interrupt saying off cast; the
3# interrupt reads the time its target's cast has left, its length said once, in its windup; a hit steps a cast back half
4# a second, three times a cast at most; and a channel's beats come each a tenth sooner than the last, its interval read
5# again at each beat with the count of beats run. Every phase runs on its caster's CastSpeed.
6
7rate 60
8stat MaxHealth
9stat CastSpeed default 1
10pool Health max MaxHealth
11damage Health
12link team
13allegiance team
14phases clock CastSpeed slot all
15archetype Side
17effect Locked
18 lasts 4s
20ability Nova
21 target self
22 windup 3s
24ability Bolt
25 target one enemy
26 windup 2s
27 pushed back 0.5s at most 3 by Damage of holder when event.landed > 0
28 deal 10 to target
30# an instant, held off by a cast as a second cast is
31ability Jab
32 target one enemy
33 deal 1 to target
35# the interrupt, off the cast, doing more on a cast nearly done
36ability Bash
37 target one enemy
38 off cast
39 requires active(target) > 0 else "not casting"
40 let left = remaining(target)
41 stop target
42 apply Locked to target for 1s * if(left <= 1s, 8, 4)
44ability Storm
45 target self
46 channel 4s
47 every 1s / (1 + 0.1 * self.beats)
48 deal 1 to all enemies within 40 of holder
50archetype Mage
51 base MaxHealth 100
52 full Health
53 grants Nova Bolt Jab Bash Storm
content/cookbook/mechanics/casting.playwhat it must do
1catalog casting.ledger
2
3# The raid's numbers: Nova 3 s, Bolt 2 s pushed back 0.5 s at most three times, Storm 4 s beating each a tenth sooner.
4
5play "mid-cast, a second cast and an instant are refused Busy; the interrupt, off the cast, goes"
6 make r Side
7 make b Side
8 make m Mage with team = r at 0
9 make t Mage with team = b at 5
10 act m Bolt at t
11 act m Bolt at t
12 expect refused Busy
13 act m Jab at t
14 expect refused Busy
15 expect m active Bolt
16 act t Bash at m
17 expect done
18 expect m stopped Bolt Interrupted
20play "cut with 2 s left, locked 4 s; with 1 s left, 8 s"
21 make r Side
22 make b Side
23 make m Mage with team = r at 0
24 make t Mage with team = b at 5
25 act t Nova
26 advance 60t
27 act m Bash at t
28 expect t remaining Locked = 4s from content: 2 s of Nova's 3 left, over 60 ticks
29 remove Locked from t
30 act t Nova
31 advance 120t
32 act m Bash at t
33 expect t remaining Locked = 8s from content: 1 s of Nova's 3 left, 60 ticks
35play "a 2 s cast hit at 1 s goes off at 2.5 s; hit four times, three push"
36 make r Side
37 make b Side
38 make m Mage with team = r at 0
39 make t Mage with team = b at 5
40 act m Bolt at t
41 advance 60t
42 deal 1 to m
43 expect m active Bolt elapsed 30t remaining 90t from content: 60 run, 30 stepped back, Bolt's 120 held
44 advance 89t
45 expect t.Health = 100 from content: Bolt's 2 s and a push of 0.5 s is 150 ticks; one short
46 advance 1t
47 expect t.Health = 90 from content: Bolt's 10 at 150 ticks
48 act m Bolt at t
49 advance 30t
50 deal 1 to m
51 advance 36t
52 deal 1 to m
53 advance 36t
54 deal 1 to m
55 advance 36t
56 deal 1 to m
57 expect m active Bolt elapsed 48t remaining 72t from content: pushed at 180, 216 and 252, 90 ticks back; the fourth, past at most 3, moves nothing
58 advance 71t
59 expect t.Health = 90 from content: 120 of cast and 90 pushed from 150 is 360; one short
60 advance 1t
61 expect t.Health = 80 from content: the second Bolt's 10 at 360
63play "beats at 60, 115, 165 and 211 ticks: each a tenth quicker than the last"
64 make r Side
65 make b Side
66 make m Mage with team = r at 0
67 make t Mage with team = b at 5
68 act m Storm
69 advance 114t
70 expect t.Health = 99 from content: one beat at 60; the second 1 s / 1.1 on, 55 ticks
71 advance 1t
72 expect t.Health = 98 from content: the second beat at 115
73 advance 96t
74 expect t.Health = 96 from content: the third at 165 (1 / 1.2 s), the fourth at 211 (1 / 1.3 s)
75 advance 29t
76 expect m finished Storm
77 expect t.Health = 96 from content: the fifth 1 / 1.4 s on, past Storm's 4 s

Run it yourself

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