Ledger v3 · C# · Godot 4.7 Get started

Dodge

A dash with a moment of invulnerability, ahead of the shield

✓ 1 play, 21 steps, all passingFrom Shooter, content\player.ledger
stages Ward SoakpreventMoveSpeed x

A dash with a moment of invulnerability, lifted from the shooter slice's content\player.ledger (Dash and Dashing) and the shield it must beat from content\arena.ledger (ShieldSoak). For a quarter second the player moves three and a half times as fast and nothing lands on it. Its prevent stands at the stage Ward, before the shield's Soak: unstaged, the shield would soak the hit before the dash prevented it. The game drives the body at the dash's pace.

content/cookbook/mechanics/dodge.ledgerthe content
1# A dash with a moment of invulnerability, lifted from the shooter slice's content\player.ledger (Dash and Dashing) and
2# the shield it must beat from content\arena.ledger (ShieldSoak). For a quarter second the player moves three and a
3# half times as fast and nothing lands on it. Its prevent stands at the stage Ward, before the shield's Soak: unstaged,
4# the shield would soak the hit before the dash prevented it. The game drives the body at the dash's pace.
5
6rate 60
7stat MaxHealth
8stat MaxShield
9stat MoveSpeed
10pool Health max MaxHealth
11pool Shield max MaxShield
12damage Health
13stages Ward Soak
14tags Dash
16effect ShieldSoak
17 before Damage of holder at Soak when holder.Shield > 0
18 absorb into Shield
20ability Dash
21 tags Dash
22 cooldown 1s
23 apply Dashing to holder
25effect Dashing
26 tags Dash
27 stack refresh
28 lasts 0.25s
29 MoveSpeed x 3.5
30 before Damage of holder at Ward
31 prevent
33archetype Player
34 base MaxHealth 100
35 base MaxShield 50
36 base MoveSpeed 6
37 full Health Shield
38 has ShieldSoak
39 grants Dash
41archetype Dummy
42 base MaxHealth 1000
43 full Health
content/cookbook/mechanics/dodge.playwhat it must do
1catalog dodge.ledger
2
3# The dash's numbers, from Dash (1 s cooldown) and Dashing (0.25 s, MoveSpeed x 3.5); the Player's 100 Health, 50 shield
4# and MoveSpeed 6.
5
6play "dashing: 0.25 s at three and a half times the pace, nothing landing, the shield untouched; again only after its 1 s"
7 make h Player at 0
8 make d Dummy at 10
9 act h Dash
10 expect done
11 expect h.MoveSpeed = 21 from content: the Player's 6, Dashing's x 3.5
12 deal 50 to h from d
13 expect refused Prevented
14 expect h.Shield = 50 from content: the Player's MaxShield 50, nothing landed
15 expect h.Health = 100 from content: the Player's MaxHealth 100
16 save
17 advance 0.25s
18 expect h lacks Dashing
19 expect h.MoveSpeed = 6 from content: the Player's 6
20 deal 10 to h from d
21 expect done
22 expect h.Shield = 40 from content: 50 less 10 soaked by the shield
23 act h Dash
24 expect refused OnCooldown
25 advance 0.75s
26 act h Dash
27 expect done

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/mechanics/dodge.ledger Health
Health: a change to it meets 2 rules, in this order
before, at Ward
  Dashing: Damage of holder at Ward (content/cookbook/mechanics/dodge.ledger:30)
    prevents it, stops the phase: no rule after it runs; applied by Dash
before, at Soak
  ShieldSoak: Damage of holder at Soak when holder.Shield > 0 (content/cookbook/mechanics/dodge.ledger:17)
    absorbs from it into Shield; held by Player
no archetype lacks a layer its like hold

Run it yourself

ledger check content/cookbook/mechanics/dodge.ledger content/cookbook/mechanics/dodge.play
ledger play content/cookbook/mechanics/dodge.play
ledger pipeline content/cookbook/mechanics/dodge.ledger Health