Ledger v3 · C# · Godot 4.7 Get started

Ward

A ward that stops the first hit and goes

✓ 1 play, 11 steps, all passingFrom Cards, content\shield.ledger
before Damage ... when event.amount > 0preventremove self

A ward that stops the first hit and goes, lifted from the card slice's content\shield.ledger (Shielded and the squire), with the board's units from content\rules.ledger (Mortal and the Body template). The first damage of more than 0 to the holder is prevented whole and takes the ward off; a hit of 0 leaves it.

content/cookbook/mechanics/ward.ledgerthe content
1# A ward that stops the first hit and goes, lifted from the card slice's content\shield.ledger (Shielded and the
2# squire), with the board's units from content\rules.ledger (Mortal and the Body template). The first damage of more
3# than 0 to the holder is prevented whole and takes the ward off; a hit of 0 leaves it.
4
5rate 10
6link team owner
7allegiance team
8
9stat MaxHealth
10stat Attack
11pool Health max MaxHealth whole
12damage Health
14tags Body Unit Shield
15event Died
17effect Mortal
18 dies at no Health raising Died
20effect Shielded
21 tags Shield
22 before Damage of holder when event.amount > 0
23 prevent
24 remove self
26template archetype Body(attack, health)
27 tags Body Unit
28 base MaxHealth health
29 base Attack attack
30 full Health
31 has Mortal
33archetype Squire from Body(2, 1)
34 has Shielded
content/cookbook/mechanics/ward.playwhat it must do
1catalog ward.ledger
2
3# The ward's numbers, from Shielded and the Squire, a 2/1.
4
5play "a squire's ward stops a hit of 5 and goes; the next hit of 1 kills it; a hit of 0 leaves the ward"
6 make s Squire
7 make t Squire
8 deal 0 to t
9 expect t has Shielded
10 deal 5 to s
11 expect refused Prevented
12 expect s.Health = 1 from content: the Squire's 1, the hit prevented
13 expect s lacks Shielded
14 save
15 deal 1 to s
16 expect s gone

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/ward.ledger Health
Health: a change to it meets 1 rule, in this order
before, at no stage
  Shielded: Damage of holder when event.amount > 0 (content/cookbook/mechanics/ward.ledger:22)
    prevents it, stops the phase: no rule after it runs, changes the world beyond it; held by Squire
no archetype lacks a layer its like hold

Run it yourself

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