Ledger v3 · C# · Godot 4.7 Get started

Stacks

Stacks counted and spent.

✓ 7 plays, 107 steps, all passingFrom v2's cookbook

v2's cookbook, stacks counted and spent (G317-G323): a dispel of one stack and one of everything magic, combo points a finisher spends three of or all of, an attack that lands only on five sunders, bark a blow strips a layer of, and three charges of cheating death.

content/cookbook/stacks.ledgerthe content
1# v2's cookbook, stacks counted and spent (G317-G323): a dispel of one stack and one of everything magic, combo points
2# a finisher spends three of or all of, an attack that lands only on five sunders, bark a blow strips a layer of, and
3# three charges of cheating death.
4
5rate 60
6stat MaxHealth
7stat Armor
8pool Health max MaxHealth
9damage Health
10stages Final
11tags Magic
12event Died Lifted
14effect Mortal
15 after Depleted Health of holder
16 raise Died of holder
17 destroy holder
19archetype Rogue
20 base MaxHealth 100
21 full Health
22 has Mortal
23 grants DispelOne MassDispel Jab Eviscerate Rupture SunderArmor Expose Barkskin Mend CheatDeath
25# ---- G317 G318 a dispel of one stack, the oldest magic first; and one of every magic effect, whatever its stacks ----
27effect Hex
28 tags Magic
29 stack add max 5
30 lasts 20s
31 Armor - 2
32 end
33 raise Lifted of holder
35effect Slow
36 tags Magic
37 stack add max 5
38 lasts 20s
40effect Taunted
41 lasts 20s
43ability DispelOne
44 target one
45 remove all Magic 1 from target
47ability MassDispel
48 target one
49 remove all Magic from target
51# ---- G319 G320 combo points: a jab builds one, ten seconds each, five at most; eviscerate spends three for 30, and
52# rupture spends every one for 15 each ----
54effect Combo
55 stack separate max 5
56 lasts 10s
58ability Jab
59 target one
60 deal 5 to target
61 apply Combo to holder
63ability Eviscerate
64 target one
65 requires stacks(holder, Combo) >= 3 else "not enough combo points"
66 remove Combo 3
67 deal 30 to target
69ability Rupture
70 target one
71 requires has(holder, Combo) else "no combo points"
72 let n = stacks(holder, Combo)
73 remove Combo
74 deal 15 * n to target
76# ---- G321 expose lands only on five sunders, and leaves them ----
78effect Sunder
79 stack add max 5
80 lasts 15s
81 Armor - 1
83effect Exposed
84 lasts 6s
86ability SunderArmor
87 target one
88 apply Sunder to target
90ability Expose
91 target one
92 if stacks(target, Sunder) >= 5
93 apply Exposed to target
95# ---- G322 barkskin: three layers of 10 armour for 20 seconds, each blow taking one; a heal takes none ----
97effect Bark
98 stack add max 3
99 lasts 20s
100 Armor + 10
101 each Damage of holder removes 1
103ability Barkskin
104 apply Bark 3 to holder
106ability Mend
107 heal 10 to holder
109# ---- G323 undying: for 30 seconds a blow that would kill leaves 1 health and spends a charge of three ----
111effect Undying
112 stack add max 3
113 lasts 30s
114 before Damage of holder at Final when event.amount >= holder.Health
115 at most holder.Health - 1
116 remove Undying 1
118ability CheatDeath
119 apply Undying 3 to holder
content/cookbook/stacks.playwhat it must do
1catalog stacks.ledger
2row G317 Hex Slow DispelOne Rogue
3row G318 Hex Slow Taunted MassDispel Rogue
4row G319 Combo Jab Eviscerate Rogue
5row G320 Combo Jab Rupture Rogue
6row G321 Sunder Exposed SunderArmor Expose Rogue
7row G322 Bark Barkskin Mend Rogue
8row G323 Mortal Undying CheatDeath Rogue
9
10play G317 "A hex of three, older than a slow, loses one stack to a dispel, 6 armour off down to 4, and nothing says it ended; two more and the third is its last, and it is lifted"
11 make r Rogue
12 make t Rogue
13 apply Hex 3 to t
14 apply Slow 2 to t
15 expect t.Armor = -6 from G317: t.Armor + "three stacks" * "each -2 armor"
16 act r DispelOne at t
17 expect t has Hex 2 from G317: "drops to two"
18 expect t has Slow 2 from G317: "Slow 2"
19 expect t.Armor = -4 from G317: t.Armor + "drops to two" * "each -2 armor"
20 expect no event Lifted
21 save
22 act r DispelOne at t
23 act r DispelOne at t
24 expect t lacks Hex
25 expect event Lifted of t 1 time from G317: count "apply Hex 3 to t"
26 act r DispelOne at t
27 expect t has Slow 1 from G317: "Slow 2" - "takes one stack"
29play G318 "A mass dispel takes a hex of three and a slow of two whole, and leaves the taunt"
30 make r Rogue
31 make t Rogue
32 apply Hex 3 to t
33 apply Slow 2 to t
34 apply Taunted to t
35 save
36 act r MassDispel at t
37 expect t lacks Hex
38 expect t lacks Slow
39 expect t has Taunted
41play G319 "Two jabs aren't enough for eviscerate, and nothing is spent; a third, and it deals 30 and spends three; a point jabbed ten seconds before is gone"
42 make r Rogue
43 make t Rogue
44 act r Jab at t
45 act r Jab at t
46 act r Eviscerate at t
47 expect refused Requirement "not enough combo points"
48 expect r has Combo 2 from G319: count "act r Jab at t"
49 act r Jab at t
50 act r Jab at t
51 save
52 act r Eviscerate at t
53 expect t.Health = 50 from content: G319 gives Eviscerate's 30 but no jab damage or health; the content's jabs of 5 four times and the 30, off its 100: 100 - 20 - 30 = 50
54 expect r has Combo 1 from G319: count "act r Jab at t" - "costs three points"
55 act r Jab at t
56 act r Jab at t
57 advance 10s
58 expect r lacks Combo
59 act r Jab at t
60 act r Jab at t
61 advance 9s
62 act r Jab at t
63 advance 1s
64 expect r has Combo 1 from content: G319's points last 10 seconds but the row leaves open whether one is gone at exactly 10 s; the content's is, so of the jabs at 0, 0 and 9 s only the last stands at 10 s: 1
65 act r Eviscerate at t
66 expect refused Requirement
68play G320 "Rupture spends three points for 45, and none are left; with none it is refused"
69 make r Rogue
70 make t Rogue
71 act r Jab at t
72 act r Jab at t
73 act r Jab at t
74 save
75 act r Rupture at t
76 expect t.Health = 40 from content: G320 gives the 45 for three points but no jab damage or health; the content's three jabs of 5 and the 45, off its 100: 100 - 15 - 45 = 40
77 expect r lacks Combo
78 act r Rupture at t
79 expect refused Requirement "no combo points"
80 covers concept step
82play G321 "Expose on four sunders does nothing and leaves them; on five it exposes for 6 seconds, and the five stay"
83 make r Rogue
84 make t Rogue
85 repeat 4
86 act r SunderArmor at t
87 act r Expose at t
88 expect t lacks Exposed
89 expect t has Sunder 4 from G321: "repeat 4"
90 act r SunderArmor at t
91 save
92 act r Expose at t
93 expect t remaining Exposed = 6s from G321: "6 seconds only"
94 expect t has Sunder 5 from G321: "already has five sunders"
95 expect t.Armor = -5 from content: G321 leaves open whether armor goes below 0; the content's doesn't stop at 0, so five sunders of 1 take t's 0 to -5
97play G322 "Barkskin is 30 armour; a blow takes a layer, 20; a heal takes none; two more blows and the bark is gone"
98 make r Rogue
99 act r Barkskin
100 expect r.Armor = 30 from G322: "30 armor"
101 deal 10 to r
102 expect r.Armor = 20 from G322: "30 armor" - "10 armor"
103 act r Mend
104 expect r.Health = 100 from content: G322 gives no heal or health; the content's Mend of 10 takes the rogue back to its full 100
105 expect r.Armor = 20 from G322: "30 armor" - "10 armor"
106 save
107 deal 10 to r
108 deal 10 to r
109 expect r lacks Bark
110 expect r.Armor = 0 from G322: "30 armor" - "10 armor" - "10 armor" - "10 armor"
112play G323 "Undying: a blow of 50, which doesn't kill, spends no charge; one of 150 leaves 1 and spends one; the second and third lethal blows leave 1 and spend the rest; the fourth kills"
113 make r Rogue
114 act r CheatDeath
115 deal 50 to r
116 expect r.Health = 50 from G323: r.Health - "deal 50"
117 expect r has Undying 3 from G323: "three charges"
118 deal 150 to r
119 expect r.Health = 1 from G323: "on 1 health"
120 expect r has Undying 2 from G323: "three charges" - "spends one"
121 save
122 deal 150 to r
123 expect r.Health = 1 from G323: "on 1 health"
124 deal 150 to r
125 expect r.Health = 1 from G323: "on 1 health"
126 expect r lacks Undying
127 deal 150 to r
128 expect r 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/stacks.ledger Health
Health: a change to it meets 1 rule, in this order
before, at Final
  Undying: Damage of holder at Final when event.amount >= holder.Health (content/cookbook/stacks.ledger:114)
    caps it, changes the world beyond it; applied by CheatDeath
no archetype lacks a layer its like hold

Run it yourself

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