Ledger v3 · C# · Godot 4.7 Get started

Causes

What caused it, a bonus written once on the kind of skill.

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

v2's cookbook, what caused it (G248-G250). A bonus for a kind of skill is written once, on the kind: spell power reads the Spell tag that a fireball's hit and its burn both carry, the fireball's carried down its chain, so the burn's ticks are boosted and a slash isn't; a ring's ember follows each spell but is the ring's, so spell power passes it by. Fire on a wet target vaporizes it.

content/cookbook/causes.ledgerthe content
1# v2's cookbook, what caused it (G248-G250). A bonus for a kind of skill is written once, on the kind: spell power reads
2# the Spell tag that a fireball's hit and its burn both carry, the fireball's carried down its chain, so the burn's
3# ticks are boosted and a slash isn't; a ring's ember follows each spell but is the ring's, so spell power passes it by.
4# Fire on a wet target vaporizes it.
5
6rate 60
7stat MaxHealth
8pool Health max MaxHealth
9damage Health
10stages Add Reaction
11tags Spell carried
12tags Weapon Fire Water Ring
14archetype Mage
15 base MaxHealth 100
16 full Health
17 has SpellPower
18 grants Fireball Slash Splash
20archetype Dummy
21 base MaxHealth 500
22 full Health
24# ---- G248 spell power: 30% on every spell's hit, its burn's ticks too, since the burn its fireball put on carries
25# the fireball's Spell to them; a slash is no spell ----
27effect SpellPower
28 before Damage by holder having Spell at Add
29 scale 1.3
31ability Fireball
32 tags Spell
33 target one
34 deal 20 Fire to target
35 apply Burn to target
37effect Burn
38 tags Fire
39 lasts 3.5s
40 every 1s
41 deal 10 Fire to holder
43ability Slash
44 tags Weapon
45 target one
46 deal 20 Weapon to target
48# ---- G249 the ember ring: each spell its wearer casts sends 5 fire to the spell's target, the ring's and not a
49# spell's: sourceless, the wearer's spell carries its Spell no further than the wearer's own ----
51effect EmberRing
52 after Activate by holder having Spell
53 deal 5 Fire Ring to event.target sourceless
55# ---- G250 vaporize: fire on a wet target is half again, and dries it ----
57ability Splash
58 tags Spell
59 target one
60 apply Wet to target
62effect Wet
63 tags Water
64 stack refresh
65 lasts 5s
66 before Damage of holder having Fire at Reaction
67 scale 1.5
68 remove self
content/cookbook/causes.playwhat it must do
1catalog causes.ledger
2row G248 SpellPower Burn Fireball Slash Mage Dummy
3row G249 EmberRing Slash Mage
4row G250 Wet Fireball Splash Mage
5
6play G248 "Spell power is 30% on every spell: a fireball's 20 is 26, and its burn's 10 a second 13, three times in its 3.5 seconds; a slash of 20 stays 20"
7 make m Mage
8 make t Dummy
9 act m Fireball at t
10 expect t.Health = 474 from content: G248 leaves open when the burn first ticks; the content's ticks a second in, so at 0 s only the fireball's 20 x 1.3, 26, comes off the dummy's 500, the content's: 500 - 26
11 save
12 advance 3.5s
13 expect t.Health = 435 from content: G248 leaves open when the burn first ticks; the content's ticks a second in, so at 1, 2 and 3 s within 3.5 s, 13 each: 474 - 39
14 expect t lacks Burn
15 act m Slash at t
16 expect t.Health = 415 from content: the burn's three ticks of 13 (the content's first tick a second in, left open by G248) left 435, and G248's slash of 20 gets no bonus: 435 - 20
18play G249 "The ember ring sends 5 after each spell to its target, which spell power passes by: a fireball and its ember are 31; a slash sets off none"
19 make m Mage
20 apply EmberRing to m
21 make t Dummy
22 act m Fireball at t
23 expect t.Health = 469 from content: G248 leaves open when the burn first ticks; the content's ticks a second in, so at 0 s only G249's ember of 5 rides the fireball's 20 x 1.3 off the dummy's 500, the content's: 500 - 26 - 5
24 save
25 act m Slash at t
26 expect t.Health = 449 from content: G249 sets off no ember on a weapon attack, and the content's burn (its first tick a second in, left open by G248) hasn't ticked at 0 s; the slash's 20 (G248) off 469
28play G250 "A splash wets the target for 5 seconds; the next fireball, 26, is half again, 39, and dries it; the one after is 26"
29 make m Mage
30 make t Dummy
31 act m Splash at t
32 expect t has Wet
33 act m Fireball at t
34 expect t.Health = 461 from content: G250 leaves open when the fireball's burn first ticks; the content's ticks a second in, so only the vaporized 26 x 1.5 lands at 0 s, off the dummy's 500: 500 - 39
35 expect t lacks Wet
36 save
37 act m Fireball at t
38 expect t.Health = 435 from content: G250 dried the dummy, so the next fireball is 26, and the content's burns haven't ticked at 0 s: 461 - 26

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/causes.ledger Health
Health: a change to it meets 2 rules, in this order
before, at Add
  SpellPower: Damage by holder having Spell at Add (content/cookbook/causes.ledger:28)
    scales it; held by Mage
before, at Reaction
  Wet: Damage of holder having Fire at Reaction (content/cookbook/causes.ledger:66)
    scales it, changes the world beyond it; applied by Splash
no archetype lacks a layer its like hold

Run it yourself

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