Ledger v3 · C# · Godot 4.7 Get started

Beam

A channel along a direction, paid a beat at a time, released or broken

✓ 4 plays, 48 steps, all passingFrom ARPG, content\frostbeam.ledger
channeleverycostwithin L wide W toward targetrelease

A channel, lifted from the ARPG slice's content\frostbeam.ledger (FrostBeam), with the slow it lays from content\arena.ledger (Chilled). Aimed along a direction, it runs up to 3 seconds, 5 Mana as it starts and 4 a beat; each quarter-second beat hurts and chills every foe in a line 9 long and 1.5 wide. Released, it ends at once; a hit of 40 or more to the caster breaks it. The slice's hero regenerates mana; this one doesn't.

content/cookbook/mechanics/beam.ledgerthe content
1# A channel, lifted from the ARPG slice's content\frostbeam.ledger (FrostBeam), with the slow it lays from
2# content\arena.ledger (Chilled). Aimed along a direction, it runs up to 3 seconds, 5 Mana as it starts and 4 a beat;
3# each quarter-second beat hurts and chills every foe in a line 9 long and 1.5 wide. Released, it ends at once; a hit
4# of 40 or more to the caster breaks it. The slice's hero regenerates mana; this one doesn't.
5
6rate 60
7stat MaxHealth
8stat MaxMana
9stat CastSpeed default 1
10stat MoveSpeed
11pool Health max MaxHealth
12pool Mana max MaxMana
13damage Health
14link team
15allegiance team
16tags Spell Frost
18# every phase of every ability runs on its caster's CastSpeed
19phases clock CastSpeed
21effect Chilled
22 tags Frost
23 stack refresh
24 lasts 2s
25 CastSpeed - 40%
26 MoveSpeed - 40%
28ability FrostBeam
29 tags Spell Frost
30 target direction
31 cost Mana 5
32 channel 3s
33 broken by Damage of holder when event.landed >= 40
34 every 0.25s
35 cost Mana 4
36 deal 5 Frost to all enemies within 9 wide 1.5 toward target
37 apply Chilled to all enemies within 9 wide 1.5 toward target
39archetype Side
41archetype Hero
42 base MaxHealth 300
43 base MaxMana 200
44 base MoveSpeed 6
45 full Health Mana
46 grants FrostBeam
48archetype Dummy
49 base MaxHealth 1000
50 full Health
content/cookbook/mechanics/beam.playwhat it must do
1catalog beam.ledger
2
3# The beam's numbers, from FrostBeam: 5 Mana to start, then every 0.25 s for up to 3 s, 4 Mana, 5 Frost and a chill to
4# each foe on a line 9 long and 1.5 wide. A hero of side r at (0, 0) beams east; dummies of side b stand at 1000.
5
6play "beamed east: 5 Mana as it starts; four beats by 1 s, 5 each to a foe on the line and none to one 2 off it; 4 Mana a beat; chilled"
7 make r Side
8 make b Side
9 make h Hero with team = r at 0 0
10 make on Dummy with team = b at 5 0
11 make off Dummy with team = b at 5 2
12 act h FrostBeam toward 1 0
13 expect done
14 expect h.Mana = 195 from content: the Hero's 200 less FrostBeam's 5 as it starts
15 expect h active FrostBeam elapsed 0s remaining 3s next beat 0.25s from content: channel 3s, every 0.25s
16 advance 1s
17 expect on.Health = 980 from content: 1000 less four beats' 5, at 0.25, 0.5, 0.75 and 1 s
18 expect off.Health = 1000 from content: 2 off the axis, past the line's 0.75 each side
19 expect h.Mana = 179 from content: 195 less four beats' 4
20 expect on has Chilled
21 expect off lacks Chilled
23play "held to its length: twelve beats, 60 off a foe on the line, and it finishes"
24 make r Side
25 make b Side
26 make h Hero with team = r at 0 0
27 make on Dummy with team = b at 5 0
28 act h FrostBeam toward 1 0
29 expect done
30 advance 3s
31 expect on.Health = 940 from content: 1000 less twelve beats' 5, every 0.25 s to 3 s
32 expect h.Mana = 147 from content: 195 less twelve beats' 4
33 expect h finished FrostBeam
35play "released at 0.6 s: two beats landed, and it finishes"
36 make r Side
37 make b Side
38 make h Hero with team = r at 0 0
39 make on Dummy with team = b at 5 0
40 act h FrostBeam toward 1 0 as beam
41 expect done
42 advance 0.6s
43 release beam
44 expect done
45 expect h finished FrostBeam
46 expect on.Health = 990 from content: 1000 less two beats' 5, at 0.25 and 0.5 s
48play "a hit of 40 to the caster breaks it; 39 doesn't"
49 make r Side
50 make b Side
51 make h Hero with team = r at 0 0
52 make on Dummy with team = b at 5 0
53 act h FrostBeam toward 1 0
54 expect done
55 advance 0.5s
56 deal 39 to h
57 expect h active FrostBeam
58 save
59 deal 40 to h
60 expect h stopped FrostBeam Broken

Run it yourself

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