Ledger v3 · C# · Godot 4.7 Get started

Windup

A cast with a windup at a point, broken by a heavy hit; a burst round the point

✓ 2 plays, 37 steps, all passingFrom ARPG, content\fireball.ledger
windupbroken by ... when event.landedtarget point withinall enemies within ... of targetcostcooldown

A cast with a windup at a point, lifted from the ARPG slice's content\fireball.ledger (Fireball), with the burn it lights from content\arena.ledger. Nothing lands and nothing is paid until the windup's 0.8 s are through; a hit of 25 or more to the caster meanwhile breaks it. It bursts for 30 Fire on every foe within 2.5 of the point and sets each one burning. The slice's hero regenerates mana; this one doesn't, so the price reads plainly.

content/cookbook/mechanics/windup.ledgerthe content
1# A cast with a windup at a point, lifted from the ARPG slice's content\fireball.ledger (Fireball), with the burn it
2# lights from content\arena.ledger. Nothing lands and nothing is paid until the windup's 0.8 s are through; a hit of
3# 25 or more to the caster meanwhile breaks it. It bursts for 30 Fire on every foe within 2.5 of the point and sets
4# each one burning. The slice's hero regenerates mana; this one doesn't, so the price reads plainly.
5
6rate 60
7stat MaxHealth
8stat MaxMana
9pool Health max MaxHealth
10pool Mana max MaxMana
11damage Health
12link team
13allegiance team
14tags Spell Fire
16effect Burning
17 tags Fire
18 stack add max 5
19 lasts 3s
20 every 0.5s
21 deal 3 * self.stacks Fire to holder from source
23ability Fireball
24 tags Spell Fire
25 target point within 14
26 cost Mana 20
27 cooldown 1s
28 windup 0.8s
29 broken by Damage of holder when event.landed >= 25
30 deal 30 Fire to all enemies within 2.5 of target
31 apply Burning to all enemies within 2.5 of target
33archetype Side
35archetype Hero
36 base MaxHealth 300
37 base MaxMana 200
38 full Health Mana
39 grants Fireball
41archetype Dummy
42 base MaxHealth 1000
43 full Health
content/cookbook/mechanics/windup.playwhat it must do
1catalog windup.ledger
2
3# The fireball's numbers, from Fireball: a 0.8 s windup, 20 Mana at the commit, 30 to each foe within 2.5 of the point.
4# A hero of side r at (0, 0) casts; dummies of side b stand at 1000 Health.
5
6play "wound up at (10, 0): nothing lands or is paid until 0.8 s; then 30 to each foe within 2.5, none to one 3 away, 20 Mana paid, each one hit burning"
7 make r Side
8 make b Side
9 make h Hero with team = r at 0 0
10 make a Dummy with team = b at 10 0
11 make c Dummy with team = b at 11.5 1
12 make far Dummy with team = b at 13 0
13 act h Fireball at 10 0
14 expect done
15 expect h active Fireball
16 advance 0.5s
17 expect a.Health = 1000 from content: the Dummy's 1000, nothing landed before the windup's 0.8 s
18 expect h.Mana = 200 from content: the Hero's MaxMana 200, nothing paid before the commit
19 advance 0.3s
20 expect h idle
21 expect a.Health = 970 from content: 1000 less Fireball's 30 at 0.8 s
22 expect c.Health = 970 from content: 1.80 from the point, within 2.5: 1000 less 30
23 expect far.Health = 1000 from content: 3 from the point, past 2.5
24 expect h.Mana = 180 from content: the Hero's 200 less Fireball's 20 at the commit
25 expect a has Burning 1 from content: Fireball's apply Burning to each foe within 2.5
26 expect far lacks Burning
27 act h Fireball at 10 0
28 expect refused OnCooldown
30play "a hit of 25 to the caster mid-windup breaks it: nothing paid, nothing landed; 24 doesn't"
31 make r Side
32 make b Side
33 make h Hero with team = r at 0 0
34 make a Dummy with team = b at 10 0
35 act h Fireball at 10 0
36 expect done
37 advance 0.25s
38 deal 24 to h
39 expect h active Fireball
40 deal 25 to h
41 expect h stopped Fireball Broken
42 save
43 advance 1s
44 expect a.Health = 1000 from content: nothing landed
45 expect h.Mana = 200 from content: nothing paid

Run it yourself

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