Ledger v3 · C# · Godot 4.7 Get started

Bolt

A cast bar that looses a bolt landing by its range at its speed, missing past it, and a mirror turning it back

✓ 4 plays, 45 steps, all passingFrom the raid, its content\party.ledger, boss.ledger and flights.play
windup Dfliesflies ARCHETYPE at F up to Dprojectile.STATreflects TAG

A caster's bolt, from the raid's flights (its content\party.ledger's Firebolt and FireMote, boss.ledger's Mirrored and flights.play): a 2 s cast bar, broken by its caster moving, that looses a bolt at its mote's Speed; the world works out when it lands, the distance as it is loosed over that speed, and the game only draws it there. Past its range, 4 s of flight, it misses; a mirror turns it back at its caster, timed again from the mirror.

content/cookbook/mechanics/bolt.ledgerthe content
1# A caster's bolt, from the raid's flights (its content\party.ledger's Firebolt and FireMote, boss.ledger's Mirrored and
2# flights.play): a 2 s cast bar, broken by its caster moving, that looses a bolt at its mote's Speed; the world works
3# out when it lands, the distance as it is loosed over that speed, and the game only draws it there. Past its range, 4 s
4# of flight, it misses; a mirror turns it back at its caster, timed again from the mirror.
5
6rate 60
7stat MaxHealth
8stat MaxMana
9stat CastSpeed default 1
10stat Speed
11pool Health max MaxHealth
12pool Mana max MaxMana
13damage Health
14link team
15allegiance team
16tags Spell Bolt
17event Moved
18phases clock CastSpeed
19archetype Side
21# what flies: its speed is its own, a stat its archetype gives
22archetype FireMote
23 base Speed 18
25effect Mirrored
26 lasts 6s
27 reflects Bolt
29ability Firebolt
30 tags Spell Bolt
31 target one enemy
32 cost Mana 15
33 windup 2s
34 broken by Moved of holder
35 flies FireMote at projectile.Speed up to 4s
36 deal 50 to target
38archetype Mage
39 base MaxHealth 400
40 base MaxMana 800
41 full Health Mana
42 grants Firebolt
44archetype Dummy
45 base MaxHealth 100000
46 full Health
content/cookbook/mechanics/bolt.playwhat it must do
1catalog bolt.ledger
2
3# The raid's numbers: Firebolt winds up 2 s and looses a FireMote at its Speed, 18 a second, for up to 4 s: 72 its
4# range. 9 away it lands 0.5 s after its loosing; a mirror turns it back at its caster, 10 back at 18.
5
6play "a Firebolt winds up 2 s, then lands 9 away 0.5 s on: 50 landed, the game drawing it, not landing it"
7 make r Side
8 make b Side
9 make m Mage with team = r at 0 0
10 make d Dummy with team = b at 9 0
11 act m Firebolt at d as fb
12 expect m active Firebolt remaining 2s from content: windup 2s
13 advance 2s
14 expect fb running remaining 0.5s from content: 9 away at FireMote's Speed 18
15 advance 0.5s
16 expect d.Health = 99950 from content: 100000 less Firebolt's 50, landed as it arrived
17 expect fb ended
19play "a Firebolt broken by its caster moving looses nothing and costs nothing"
20 make r Side
21 make b Side
22 make m Mage with team = r at 0 0
23 make d Dummy with team = b at 9 0
24 act m Firebolt at d
25 advance 1s
26 raise Moved of m
27 expect m stopped Firebolt Broken
28 expect m.Mana = 800 from content: Firebolt's cost is paid as it looses
29 expect count FireMote = 0 from content: a broken cast looses no bolt
31play "past its range, 80 away, it misses at its 4 s"
32 make r Side
33 make b Side
34 make m Mage with team = r at 0 0
35 make d Dummy with team = b at 80 0
36 act m Firebolt at d as fb
37 advance 2s
38 expect fb running remaining 4s from content: 80 at 18 a second is 4.4 s, past its 4 s cap
39 advance 4s
40 expect m stopped Firebolt Missed
41 expect d.Health = 100000 from content: nothing landed past its range
43play "a mirror turns it back at its caster, timed again: out 10 at 18, back 10 at 18, its 50 on the mage credited to the boss"
44 make r Side
45 make b Side
46 make m Mage with team = r at 0 0
47 make k Dummy with team = b at 10 0
48 apply Mirrored to k
49 act m Firebolt at k as fb
50 advance 2s
51 advance 34t
52 expect fb running remaining 34t from content: turned at 10 away, 10 back at 18 a second, 34 ticks rounded up
53 expect k.Health = 100000 from content: the mirror takes nothing
54 advance 34t
55 expect m.Health = 350 from content: the Mage's 400 less its own Firebolt's 50
56 expect event Change of m credited to k tagged Damage
57 expect fb ended

Run it yourself

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