Ledger v3 · C# · Godot 4.7 Get started

Gate

A shield gate: a hit that breaks the shield spends none of itself on the Health behind it

✓ 3 plays, 15 steps, all passingFrom the owner's ask, the online shooter's layers
absorb intoat most 0

A shield gate, the owner's ask for the online shooter's layers: a hit that breaks the shield spends none of itself on the Health behind it. The shield recipe carries what the shield can't hold on to Health; here, while the Shield holds any, the hit soaks into it and what is left goes nowhere. The rest is capped at none rather than prevented, so the hit still lands, as 0, and a rule after it hearing a hit (a recharge's delay) still hears this one.

content/cookbook/mechanics/gate.ledgerthe content
1# A shield gate, the owner's ask for the online shooter's layers: a hit that breaks the shield spends none of itself on
2# the Health behind it. The shield recipe carries what the shield can't hold on to Health; here, while the Shield holds
3# any, the hit soaks into it and what is left goes nowhere. The rest is capped at none rather than prevented, so the
4# hit still lands, as 0, and a rule after it hearing a hit (a recharge's delay) still hears this one.
5
6rate 60
7stat MaxHealth
8stat MaxShield
9pool Health max MaxHealth
10pool Shield max MaxShield
11damage Health
12stages Soak
14effect ShieldGate
15 before Damage of holder at Soak when holder.Shield > 0
16 absorb into Shield
17 at most 0
19archetype Trooper
20 base MaxHealth 100
21 base MaxShield 40
22 full Health Shield
23 has ShieldGate
25archetype Bare
26 base MaxHealth 100
27 full Health
28 pools Shield
29 has ShieldGate
content/cookbook/mechanics/gate.playwhat it must do
1catalog gate.ledger
2
3# The owner's numbers: 40 of shield and 100 of health; a hit of 70, then one of 30, and 30 on no shield.
4
5play "a hit of 70 breaks the 40 of shield and spends none of the rest on Health"
6 make t Trooper
7 deal 70 to t
8 expect t.Shield = 0 from content: the 40 of shield soaks 40 of the 70
9 expect t.Health = 100 from content: the 30 left is capped at none, so Health keeps its 100
10 save
11 deal 30 to t
12 expect t.Health = 70 from content: no shield left, the gate's when doesn't hold, 100 - 30
14play "a hit of 30 leaves 10 of the shield and Health whole"
15 make t Trooper
16 deal 30 to t
17 expect t.Shield = 10 from content: 40 less the hit's 30
18 expect t.Health = 100 from content: the hit soaked whole
20play "a hit of 30 on no shield leaves Health at 70"
21 make b Bare
22 deal 30 to b
23 expect b.Shield = 0 from content: the Bare keeps a Shield and starts it empty
24 expect b.Health = 70 from content: 100 less the hit's 30

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/gate.ledger Health
Health: a change to it meets 1 rule, in this order
before, at Soak
  ShieldGate: Damage of holder at Soak when holder.Shield > 0 (content/cookbook/mechanics/gate.ledger:15)
    absorbs from it into Shield, caps it; held by Trooper, Bare
no archetype lacks a layer its like hold

Run it yourself

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