Ledger v3 · C# · Godot 4.7 Get started

Armour

Armour that takes a share off physical hits, and none off poison

✓ 1 play, 6 steps, all passingFrom TD, content\td.ledger
before Damage ... having TAG at STAGEscale

Armour that takes a share off physical hits, lifted from the tower-defense slice's content\td.ledger (Armoured) and its brute from content\creeps.ledger. Armour takes Armor / (Armor + 100), at its own stage, off a hit carrying Physical, carried by an ability tagged so or a host's deal naming it; a poison's passes whole. 150 lets 40% through.

content/cookbook/mechanics/armour.ledgerthe content
1# Armour that takes a share off physical hits, lifted from the tower-defense slice's content\td.ledger (Armoured) and
2# its brute from content\creeps.ledger. Armour takes Armor / (Armor + 100), at its own stage, off a hit carrying
3# Physical, carried by an ability tagged so or a host's deal naming it; a poison's passes whole. 150 lets 40% through.
4
5rate 60
6stat MaxHealth
7stat Armor
8pool Health max MaxHealth
9damage Health
10stages Armor
11tags Physical carried
12tags Poison
13effect Armoured
14 before Damage of holder having Physical at Armor
15 scale 100 / (holder.Armor + 100)
17archetype Brute
18 base MaxHealth 90
19 base Armor 150
20 full Health
21 has Armoured
content/cookbook/mechanics/armour.playwhat it must do
1catalog armour.ledger
2
3# The armour's numbers, from Armoured and the Brute: 90 Health, Armor 150, a physical hit scaled by 100 / 250.
4
5play "a physical hit of 10 lands 4; a poison's 10 lands whole"
6 make bt Brute
7 deal 10 to bt Physical
8 expect bt.Health = 86 from content: 10 x 100 / (150 + 100) = 4 off 90
9 save
10 deal 10 to bt Poison
11 expect bt.Health = 76 from content: no Physical tag, so the armour takes none: 86 - 10

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/armour.ledger Health
Health: a change to it meets 1 rule, in this order
before, at Armor
  Armoured: Damage of holder having Physical at Armor (content/cookbook/mechanics/armour.ledger:14)
    scales it; held by Brute
no archetype lacks a layer its like hold

Run it yourself

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