Ledger v3 · C# · Godot 4.7 Get started

Backbone

The default way to write a build's affixes and resistances, from the owner's ask.

✓ 5 plays, 36 steps, all passingFrom the owner's ask

The owner's ask, taken in from an earlier build's damage channel: the stat-reading backbone as the default way to write a build's affixes, and one form reading the type of the portion a scale acts on, so a resistance to every type is one rule. An affix is a modifier on a stat, carried by an effect with no rule of its own; one rule a stage reads the stats. The attacker's damage by type is read at Attack, its increases summed and its "more" multiplied, as a stat's percents and factors are; the defender's resistance by type at Resistance; each read bare in its scale, so each portion meets its own type's member. The armour, on the physical alone, keeps a rule of its own. A hit's receipt leads to the affix: its line items name the rule, the rule's line names the stat, and the stat's receipt the affix.

content/cookbook/backbone.ledgerthe content
1# The owner's ask, taken in from an earlier build's damage channel: the stat-reading backbone as the default way to write
2# a build's affixes, and one form reading the type of the portion a scale acts on, so a resistance to every type is one
3# rule. An affix is a modifier on a stat, carried by an effect with no rule of its own; one rule a stage reads the
4# stats. The attacker's damage by type is read at Attack, its increases summed and its "more" multiplied, as a stat's
5# percents and factors are; the defender's resistance by type at Resistance; each read bare in its scale, so each
6# portion meets its own type's member. The armour, on the physical alone, keeps a rule of its own. A hit's receipt
7# leads to the affix: its line items name the rule, the rule's line names the stat, and the stat's receipt the affix.
8
9rate 60
10portions Physical Fire Cold Lightning
11stat MaxHealth
12stat Armour
13stat Damage by type default 1
14stat Resist by type max 0.75
15pool Health max MaxHealth
16damage Health
17stages Attack Armour Resistance
19effect Hits
20 before Damage by holder at Attack
21 scale holder.Damage
22 before Damage of holder having Physical at Armour
23 scale 100 / (100 + holder.Armour)
24 before Damage of holder at Resistance
25 scale 1 - holder.Resist
27archetype Exile
28 base MaxHealth 100
29 full Health
30 has Hits
31 grants Strike
33archetype Brute
34 base MaxHealth 1000
35 base Armour 100
36 base Resist.Fire 0.5
37 base Resist.Cold 0.25
38 full Health
39 has Hits
41ability Strike
42 target one
43 deal 40 Physical + 40 Fire + 40 Cold + 40 Lightning to target
45# ---- the affixes: modifiers, and no rule ----
47# + 20% fire damage
48effect Searing
49 Damage.Fire + 20%
51# + 10% damage of every type: a term on each member, summed with the fire's into one factor
52effect Sharpened
53 Damage + 10%
55# 50% more physical damage: a factor, multiplied
56effect Brutal
57 Damage.Physical x 1.5
59# + 25% to all resistances: one line
60effect Warded
61 Resist + 0.25
content/cookbook/backbone.playwhat it must do
1catalog backbone.ledger
2
3# The Brute's defences: Armour 100 halves the physical; Resist.Fire 0.5 and Resist.Cold 0.25; Physical and Lightning
4# none. A Strike is 40 of each of the four types.
5
6play "a strike in four types, each portion meeting its own type's resistance, one rule for all four"
7 make a Exile
8 make d Brute
9 act a Strike at d
10 expect done
11 expect d.Health = 890 from content: Physical 40 halved by armour, 20; Fire 40 at 0.5, 20; Cold 40 at 0.75, 30; Lightning 40 whole; 110 from 1000
13play "an affix added: + 20% fire damage moves the fire portion alone"
14 make a Exile
15 make d Brute
16 apply Searing to a
17 expect a.Damage.Fire = 1.2 from content: Damage's default 1, and Searing's + 20%
18 expect a.Damage.Cold = 1 from content: Searing names Fire's member alone
19 act a Strike at d
20 expect done
21 expect d.Health = 886 from content: Fire 40 x 1.2 = 48 at 0.5, 24; the rest as before, 20 + 30 + 40; 114 from 1000
23play "+ 10% damage beside it: two percents on Fire's member summed, x 1.3, as an ARPG sums its increases"
24 make a Exile
25 make d Brute
26 apply Searing to a
27 apply Sharpened to a
28 expect a.Damage.Fire = 1.3 from content: Damage's default 1, Searing's + 20% and Sharpened's + 10% summed into one factor
29 expect a.Damage.Lightning = 1.1 from content: Sharpened's + 10%, a term on every member
30 act a Strike at d
31 expect done
32 expect d.Health = 875 from content: Physical 44 halved, 22; Fire 52 at 0.5, 26; Cold 44 at 0.75, 33; Lightning 44; 125 from 1000
34play "50% more physical: a factor, multiplied after the summed percents"
35 make a Exile
36 apply Sharpened to a
37 apply Brutal to a
38 expect a.Damage.Physical = 1.65 from content: Damage's default 1, Sharpened's + 10%, then Brutal's x 1.5
40play "all resistances in one line, each member held at the declared max"
41 make a Exile
42 make d Brute
43 apply Searing to a
44 apply Sharpened to a
45 apply Warded to d
46 expect d.Resist.Fire = 0.75 from content: the Brute's base 0.5 and Warded's + 0.25, at the declared max 0.75
47 expect d.Resist.Physical = 0.25 from content: no base, and Warded's + 0.25
48 act a Strike at d
49 expect done
50 expect d.Health = 915.5 from content: Physical 22 at 0.75, 16.5; Fire 52 at 0.25, 13; Cold 44 at 0.5, 22; Lightning 44 at 0.75, 33; 84.5 from 1000

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/backbone.ledger Health
Health: a change to it meets 3 rules, in this order
before, at Attack
  Hits: Damage by holder at Attack (content/cookbook/backbone.ledger:20)
    scales it; held by Exile, Brute
before, at Armour
  Hits: Damage of holder having Physical at Armour (content/cookbook/backbone.ledger:22)
    scales it; held by Exile, Brute
before, at Resistance
  Hits: Damage of holder at Resistance (content/cookbook/backbone.ledger:24)
    scales it; held by Exile, Brute
no archetype lacks a layer its like hold

Run it yourself

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