Ledger v3 · C# · Godot 4.7 Get started

Recharge

A shield that refills after a pause each hit starts again

✓ 1 play, 20 steps, all passingFrom Shooter, content\arena.ledger
pool ... regen STATSTAT = 0stack refreshafter Damage of holder

A shield that refills after a pause, lifted from the shooter slice's content\arena.ledger (the Shield pool and its regen, ShieldSoak, Struck and Guarded) and its player from content\player.ledger. Hits go into the 50 shield first and the rest to Health; any hit stops the refill for 2 seconds, each hit starting the 2 again; then it refills 25 a second to its most.

content/cookbook/mechanics/recharge.ledgerthe content
1# A shield that refills after a pause, lifted from the shooter slice's content\arena.ledger (the Shield pool and its
2# regen, ShieldSoak, Struck and Guarded) and its player from content\player.ledger. Hits go into the 50 shield first
3# and the rest to Health; any hit stops the refill for 2 seconds, each hit starting the 2 again; then it refills 25 a
4# second to its most.
5
6rate 60
7stat MaxHealth
8stat MaxShield
9stat ShieldRate
10pool Health max MaxHealth
11pool Shield max MaxShield regen ShieldRate
12damage Health
13stages Soak
15effect ShieldSoak
16 before Damage of holder at Soak when holder.Shield > 0
17 absorb into Shield
19effect Struck
20 stack refresh
21 lasts 2s
22 ShieldRate = 0
24effect Guarded
25 after Damage of holder
26 apply Struck to holder
28archetype Player
29 base MaxHealth 100
30 base MaxShield 50
31 base ShieldRate 25
32 full Health Shield
33 has ShieldSoak
34 has Guarded
36archetype Dummy
37 base MaxHealth 1000
38 full Health
content/cookbook/mechanics/recharge.playwhat it must do
1catalog recharge.ledger
2
3# The shield's numbers, from the Player (100 Health, a 50 shield refilling 25 a second) and Struck's 2 s pause.
4
5play "hits land on the shield first and the rest on Health; it stands still 2 s after the last hit, then refills 25 a second"
6 make h Player
7 make d Dummy
8 deal 30 to h from d
9 expect h.Shield = 20 from content: 50 less 30 soaked
10 expect h.Health = 100 from content: nothing past the shield
11 deal 30 to h from d
12 expect h.Shield = 0 from content: 20 soaked of the 30
13 expect h.Health = 90 from content: 100 less the 10 past the shield
14 advance 1s
15 expect h.Shield = 0 from content: Struck's ShieldRate = 0 for 2 s
16 deal 5 to h from d
17 expect h.Health = 85 from content: 90 less 5, the shield empty
18 advance 1.9s
19 expect h.Shield = 0 from content: the 2 s started again at the third hit, 1.9 s in
20 save
21 advance 0.1s
22 advance 1s
23 expect h.Shield = 25 from content: 1 s at ShieldRate 25 once Struck ended
24 advance 2s
25 expect h.Shield = 50 from content: full at MaxShield 50

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/recharge.ledger Health
Health: a change to it meets 2 rules, in this order
before, at Soak
  ShieldSoak: Damage of holder at Soak when holder.Shield > 0 (content/cookbook/mechanics/recharge.ledger:16)
    absorbs from it into Shield; held by Player
after it lands
  Guarded: Damage of holder (content/cookbook/mechanics/recharge.ledger:25)
    hears what landed; held by Player
no archetype lacks a layer its like hold

Run it yourself

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