Ledger v3 · C# · Godot 4.7 Get started

Procs

A chance on each hit behind an internal cooldown.

✓ 2 plays, 34 steps, all passingFrom v2's cookbook

v2's cookbook, procs (G290-G291): a chance on each hit behind an internal cooldown, held by the enemy struck in one case and by the wielder in the other; a failed roll starts no cooldown, and the wielder's survives its death.

content/cookbook/procs.ledgerthe content
1# v2's cookbook, procs (G290-G291): a chance on each hit behind an internal cooldown, held by the enemy struck in one
2# case and by the wielder in the other; a failed roll starts no cooldown, and the wielder's survives its death.
3
4rate 60
5stat MaxHealth
6stat Power
7pool Health max MaxHealth
8damage Health
9tags Melee Nature Buff Cooldown
10event Died
12archetype Warrior
13 base MaxHealth 100
14 base Power 10
15 full Health
16 has Mortal
17 grants Strike
19archetype Ogre
20 base MaxHealth 1000
21 base Power 10
22 full Health
23 grants Strike
25ability Strike
26 tags Melee
27 target one
28 deal holder.Power Melee to target
30# ---- G290 Thunderfury: each melee hit has a 30% chance to call a 30 bolt on the one struck, which then can't be bolted
31# again for 6 seconds; another can, and a roll that fails starts nothing ----
33effect Thunderfury
34 after Damage by holder having Melee when not has(event.subject, ThunderICD) and chance(30%)
35 deal 30 Nature to event.subject
36 apply ThunderICD to event.subject
38effect ThunderICD
39 tags Cooldown
40 stack refresh per source
41 lasts 6s
43# ---- G291 a weapon's rage: a 25% chance a hit enrages its wielder, half again on its blows for 8 seconds, twice at
44# most, no more than one proc in 4 seconds; the wielder holds that cooldown, and its death doesn't take it ----
46effect Raging
47 after Damage by holder when not has(holder, RageICD) and chance(25%)
48 apply Enraged
49 apply RageICD
51effect Enraged
52 tags Buff
53 stack add max 2 then refresh
54 lasts 8s
55 Power + 50%
57effect RageICD
58 tags Cooldown
59 lasts 4s
61effect Mortal
62 after Depleted Health of holder
63 raise Died of holder
64 remove all Buff
65 heal holder.MaxHealth to holder
content/cookbook/procs.playwhat it must do
1catalog procs.ledger
2row G290 Thunderfury ThunderICD Strike Warrior Ogre
3row G291 Raging Enraged RageICD Mortal Strike Warrior Ogre
4
5play G290 "Thunderfury's bolt, 30, falls on an ogre struck; struck again in 6 seconds it can't be bolted, though another can at once; a miss starts no cooldown"
6 seed 6 # a run's: the draws under it fall as the play says
7 make w Warrior
8 apply Thunderfury to w
9 make a Ogre
10 make b Ogre
11 act w Strike at a
12 expect a.Health = 960 from a run: under seed 6 the 30% roll on the first strike succeeds, so G290's bolt of 30 follows the content's strike of 10 off the ogre's 1000: 1000 - 10 - 30
13 expect a has ThunderICD
14 act w Strike at a
15 expect a.Health = 950 from a run: under seed 6 the first strike's roll bolted ogre a, so the second, inside G290's 6 seconds, lands only the content's strike of 10: 960 - 10
16 save
17 act w Strike at b
18 expect b.Health = 990 from a run: under seed 6 the 30% roll on the first strike at ogre b fails, so it takes only the content's strike of 10: 1000 - 10
19 expect b lacks ThunderICD
20 act w Strike at b
21 expect b.Health = 950 from a run: under seed 6 the 30% roll on the second strike at ogre b succeeds, and no failed roll started a cooldown, so G290's 30 follows the strike of 10: 990 - 10 - 30
23play G291 "A hit enrages the warrior, its strike of 10 then 15, and for 4 seconds no more rage comes; killed and got up again, the rage is gone and the cooldown kept"
24 seed 63 # a run's: the draws under it fall as the play says
25 make w Warrior
26 apply Raging to w
27 make o Ogre
28 act w Strike at o
29 expect w has Enraged 1 from a run: under seed 63 the warrior's first chance draw falls within G291's 25%, so one stack of enrage
30 expect w has RageICD
31 act w Strike at o
32 expect o.Health = 975 from a run: under seed 63 the first strike enrages, so the second is the content's 10 made 15 by G291's 50 percent: 1000 - 10 - 15
33 expect w has Enraged 1 from G291: "at most one proc"
34 save
35 deal 100 to w
36 expect w lacks Enraged
37 expect w has RageICD
38 expect w.Health = 100 from content: G291 says nothing of the revive's health; the content heals the dead warrior by its maximum of 100
39 act w Strike at o
40 expect w lacks Enraged
41 advance 4s
42 act w Strike at o
43 expect w has Enraged 1 from a run: under seed 63 the warrior's next draw, on the strike as G291's 4 seconds run out, falls within 25%, the earlier stack gone with the death: one stack

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/procs.ledger Health
Health: a change to it meets 2 rules, in this order
after it lands
  Thunderfury: Damage by holder having Melee when not has(event.subject, ThunderICD) and chance(30%) (content/cookbook/procs.ledger:34)
    hears what landed; held by no archetype and applied by no content: the game or a play puts it on
  Raging: Damage by holder when not has(holder, RageICD) and chance(25%) (content/cookbook/procs.ledger:47)
    hears what landed; 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/procs.ledger content/cookbook/procs.play
ledger play content/cookbook/procs.play
ledger pipeline content/cookbook/procs.ledger Health