Ledger v3 · C# · Godot 4.7 Get started

Self

What an ability gives its user.

✓ 3 plays, 35 steps, all passingFrom v2's cookbook

v2's cookbook, what an ability gives its user (G314-G316): a swing that half the time feeds its swinger whether or not it lands, a cry that puts on three stacks at once, and a second wind whose price is paid before its gain.

content/cookbook/self.ledgerthe content
1# v2's cookbook, what an ability gives its user (G314-G316): a swing that half the time feeds its swinger whether or
2# not it lands, a cry that puts on three stacks at once, and a second wind whose price is paid before its gain.
3
4rate 60
5stat MaxHealth
6stat Attack
7stat Might
8stat MaxStamina
9pool Health max MaxHealth
10pool Stamina max MaxStamina
11damage Health
13archetype Duelist
14 base MaxHealth 100
15 base Attack 12
16 base Might 100
17 base MaxStamina 100
18 full Health Stamina
19 grants Riposte WarCry SecondWind GainFirst
21archetype Dummy
22 base MaxHealth 1000
23 full Health
25effect Invulnerable
26 before Damage of holder
27 prevent
29# ---- G314 riposte: the swing deals the attack, and half the time it gives the swinger momentum, landed or not ----
31ability Riposte
32 target one
33 deal holder.Attack to target
34 if chance(50%)
35 apply Momentum to holder
37effect Momentum
38 stack add max 5
39 lasts 8s
41# ---- G315 war cry: three stacks of fervour at once, a tenth more might each, five at most; again in 12 seconds ----
43ability WarCry
44 cooldown 12s
45 apply Fervour 3 to holder
47effect Fervour
48 stack add max 5
49 lasts 10s
50 Might + 10%
52# ---- G316 second wind: 40 stamina paid, then 30 gained; gained first, the 30 would be thrown against the cap ----
54ability SecondWind
55 cost Stamina 40
56 gain Stamina 30
58ability GainFirst
59 gain Stamina 30
60 lose Stamina 40
content/cookbook/self.playwhat it must do
1catalog self.ledger
2row G314 Invulnerable Momentum Riposte Duelist Dummy
3row G315 Fervour WarCry Duelist
4row G316 SecondWind GainFirst Duelist
5
6play G314 "Each swing deals 12; the roll gives momentum on some swings and not others, and a swing on an invulnerable dummy that lands nothing still rolls"
7 seed 6 # a run's: the draws under it fall as the play says
8 make d Duelist
9 make t Dummy
10 act d Riposte at t
11 expect t.Health = 988 from G314: t.Health - d.Attack
12 expect d has Momentum 1 from G314: count "act d Riposte at t"
13 act d Riposte at t
14 expect t.Health = 976 from G314: t.Health - count "act d Riposte at t" * d.Attack
15 expect d has Momentum 1 from a run: seed 6's second half-chance roll, on the second swing, fails: momentum stays at one
16 save
17 apply Invulnerable to t
18 act d Riposte at t
19 expect t.Health = 976 from content: G314 gives no invulnerability; the content's prevents the swing's damage, so 976 stands
20 expect d has Momentum 2 from a run: seed 6's third half-chance roll, on the swing that lands nothing, succeeds: a second momentum stack
22play G315 "The war cry puts on three stacks, 130 might, and can't be cried again for 12 seconds; the stacks gone at 10, the cry is ready at 12; three more on three are five, 150"
23 make d Duelist
24 act d WarCry
25 expect d has Fervour 3 from G315: "three buff"
26 expect d.Might = 130 from content: G315 gives +10% a stack but not how stacks combine or the might they raise; the content's 100 with 3 x 10% added
27 act d WarCry
28 expect refused OnCooldown
29 save
30 advance 10s
31 expect d lacks Fervour
32 advance 2s
33 act d WarCry
34 expect done
35 apply Fervour 3 to d
36 expect d has Fervour 5 from G315: "maximum of 5"
37 expect d.Might = 150 from content: G315 leaves open how stacks combine; the content's 100 with 5 x 10% added
39play G316 "From a full 100, second wind pays 40 and gains 30, 90; the gain first is thrown against the cap and the 40 then paid, 60"
40 make d Duelist
41 make e Duelist
42 act d SecondWind
43 expect d.Stamina = 90 from G316: "100 stamina" - "40 stamina" + "back 30"
44 save
45 act e GainFirst
46 expect e.Stamina = 60 from G316: "100 stamina" - "40 stamina"
47 covers concept step

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/self.ledger Health
Health: a change to it meets 1 rule, in this order
before, at no stage
  Invulnerable: Damage of holder (content/cookbook/self.ledger:26)
    prevents it, stops the phase: no rule after it runs; held by no archetype and applied by no content: the game or a play puts it on
no archetype lacks a layer its like hold

Run it yourself

ledger check content/cookbook/self.ledger content/cookbook/self.play
ledger play content/cookbook/self.play
ledger pipeline content/cookbook/self.ledger Health