Ledger v3 · C# · Godot 4.7 Get started

Rate

A layer's rate by damage type: electricity counts double on a shield, and not on the Health behind it

✓ 3 plays, 13 steps, all passingFrom the owner's ask, the online shooter's layers
portionshavingunlessabsorb up to ... aslose ... on holder

A layer's rate by damage type, the owner's ask for the online shooter's layers: electricity counts double on a shield, and not on the Health behind it. The portions recipe scales a portion by its type at a defence, a rate on the whole hit; here the rate is the shield's alone. The electric portion is soaked at half what the shield holds, and the shield loses twice what it soaked; what it couldn't soak goes on to Health at its own size. The other portions soak whole, after it, from what the shield has left. The two rules are one effect's, heard on one actor, so they run as written.

content/cookbook/mechanics/rate.ledgerthe content
1# A layer's rate by damage type, the owner's ask for the online shooter's layers: electricity counts double on a shield,
2# and not on the Health behind it. The portions recipe scales a portion by its type at a defence, a rate on the whole
3# hit; here the rate is the shield's alone. The electric portion is soaked at half what the shield holds, and the shield
4# loses twice what it soaked; what it couldn't soak goes on to Health at its own size. The other portions soak whole,
5# after it, from what the shield has left. The two rules are one effect's, heard on one actor, so they run as written.
6
7rate 60
8stat MaxHealth
9stat MaxShield
10pool Health max MaxHealth
11pool Shield max MaxShield
12damage Health
13stages Soak
14portions Physical Electric
16effect ShieldRate
17 before Damage of holder having Electric at Soak when holder.Shield > 0
18 absorb up to holder.Shield / 2 as soaked
19 lose Shield soaked * 2 on holder
20 before Damage of holder unless Electric at Soak when holder.Shield > 0
21 absorb into Shield
23archetype Trooper
24 base MaxHealth 100
25 base MaxShield 40
26 full Health Shield
27 has ShieldRate
29ability Arc
30 target one
31 deal 20 Physical + 10 Electric to target
33archetype Gunner
34 grants Arc
content/cookbook/mechanics/rate.playwhat it must do
1catalog rate.ledger
2
3# The owner's numbers: 40 of shield and 100 of health; an electric 30, and a physical 30.
4
5play "an electric 30 spends 20 of itself on the shield, doubled to its 40, and 10 on Health"
6 make t Trooper
7 deal 30 to t Electric
8 expect t.Shield = 0 from content: 20 of the hit soaked at 40 / 2, the shield losing twice that, 40
9 expect t.Health = 90 from content: the 10 the shield couldn't soak, at its own size, 100 - 10
11play "a physical 30 spends 30 of the shield and none of Health"
12 make t Trooper
13 deal 30 to t Physical
14 expect t.Shield = 10 from content: 40 less the hit's 30, soaked whole
15 expect t.Health = 100 from content: the hit soaked whole
17play "a hit of 20 physical and 10 electric: the electric soaks first, at 20 of the shield, and the physical takes the 20 left"
18 make g Gunner
19 make t Trooper
20 act g Arc at t
21 expect t.Shield = 0 from content: 10 electric soaked, the shield losing 20, then 20 physical soaked from the 20 left
22 expect t.Health = 100 from content: both portions soaked whole

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/rate.ledger Health
Health: a change to it meets 2 rules, in this order
before, at Soak
  ShieldRate: Damage of holder having Electric at Soak when holder.Shield > 0 (content/cookbook/mechanics/rate.ledger:17)
    absorbs from it, changes Shield; held by Trooper
  ShieldRate: Damage of holder unless Electric at Soak when holder.Shield > 0 (content/cookbook/mechanics/rate.ledger:20)
    absorbs from it into Shield; held by Trooper
no archetype lacks a layer its like hold

Run it yourself

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