Ledger v3 · C# · Godot 4.7 Get started

Relations

What an actor reads of those it is tied to.

✓ 6 plays, 94 steps, all passingFrom v2's cookbook

v2's cookbook, what an actor reads of those it is tied to (G302-G306): a side's research every unit on it reads, a blow between teammates that does nothing and a charm that changes a unit's side while it holds, a paladin's aura on its own side, a summon as strong as its master says and a master that grieves it, and rain the whole world holds.

content/cookbook/relations.ledgerthe content
1# v2's cookbook, what an actor reads of those it is tied to (G302-G306): a side's research every unit on it reads, a
2# blow between teammates that does nothing and a charm that changes a unit's side while it holds, a paladin's aura on
3# its own side, a summon as strong as its master says and a master that grieves it, and rain the whole world holds.
4
5rate 60
6link team
7link master
8link world global
9allegiance team
10stat MaxHealth
11stat Attack
12stat Armor
13stat MinionPower
14pool Health max MaxHealth
15pool Research max 3
16damage Health
17stages Multiply
18event Died
20effect Mortal
21 after Depleted Health of holder
22 raise Died of holder
23 destroy holder
25archetype Team
26 pools Research
27 grants ResearchWeapons
29archetype World
31# ---- G302 weapon research: 2 attack a level, up to 3, held by the side and read by each unit on it ----
33ability ResearchWeapons
34 requires holder.Research < 3 else "researched"
35 gain Research 1
37effect Upgraded
38 Attack + 2 * holder.team.Research live
40archetype Footman
41 base MaxHealth 100
42 base Attack 10
43 full Health
44 has Upgraded
45 has NoFriendlyFire
46 grants Hit Charm
48ability Hit
49 target one
50 deal holder.Attack to target
52# ---- G303 no friendly fire, and a charm that changes sides until it is released ----
54effect NoFriendlyFire
55 before Damage of holder by other allies at Multiply
56 prevent
58ability Charm
59 target one enemy
60 apply Charmed to target
62# Each charm is its own instance: two that overlap leave the newer's side, and the side given once both have ended.
63effect Charmed
64 stack separate
65 team = source.team
67# ---- G304 devotion: 10 armour to everyone on the paladin's side within 5, itself too ----
69archetype Paladin
70 base MaxHealth 100
71 full Health
72 has Devotion
74effect Devotion
75 aura Devoted on all allies within 5
77effect Devoted
78 Armor + 10
80# ---- G305 the spirit link: the wolf's attack is its master's minion power as it stands, and its death grieves the
81# master, a quarter off its attack for 10 seconds ----
83archetype Necromancer
84 base MaxHealth 100
85 base Attack 100
86 base MinionPower 30
87 full Health
89archetype Wolf
90 base MaxHealth 50
91 base Attack holder.master.MinionPower
92 full Health
93 has Mortal
94 has SpiritLink
96effect SpiritLink
97 after Died of holder
98 apply Grief to holder.master
100effect Grief
101 lasts 10s
102 Attack - 25%
104effect DarkPact
105 MinionPower + 10
107# ---- G306 swift swim: double attack while the world holds rain, wherever the swimmer stands ----
109effect Rain
110 lasts 30s
112effect SwiftSwim
113 Attack + 100% * has(world, Rain) live
115archetype Diver
116 base MaxHealth 100
117 base Attack 10
118 full Health
119 has SwiftSwim
content/cookbook/relations.playwhat it must do
1catalog relations.ledger
2row G302 Upgraded ResearchWeapons Team Footman
3row G303 Upgraded NoFriendlyFire Charmed Hit Charm Team Footman
4row G304 Devotion Devoted Team Footman Paladin
5row G305 Mortal SpiritLink Grief DarkPact Necromancer Wolf
6row G306 Rain SwiftSwim World Diver
7
8play G302 "Two levels of research take a red footman from 10 to 14, and one built after; a blue one is 10; a red footman moved to blue reads blue's research at once"
9 make red Team
10 make blue Team
11 make f1 Footman with team = red
12 make b1 Footman with team = blue
13 act red ResearchWeapons
14 act red ResearchWeapons
15 expect f1.Attack = 14 from G302: "14 attack"
16 make f2 Footman with team = red
17 expect f2.Attack = 14 from G302: "14 attack"
18 expect b1.Attack = 10 from G302: "footman from 10"
19 save
20 act blue ResearchWeapons
21 expect b1.Attack = 12 from G302: "footman from 10" + "+2 attack per level" * count "act blue ResearchWeapons"
22 link f1 team blue
23 expect f1.Attack = 12 from G302: "footman from 10" + "+2 attack per level" * count "act blue ResearchWeapons"
24 act red ResearchWeapons
25 act red ResearchWeapons
26 expect refused Requirement "researched"
27 expect f2.Attack = 16 from G302: "footman from 10" + "+2 attack per level" * "up to 3 levels"
29play G303 "A red footman's blow on red does nothing, on blue 10, on a teamless one 10; a blue one charmed onto red hits red for nothing and reads red's research until released"
30 make red Team
31 make blue Team
32 make r1 Footman with team = red
33 make r2 Footman with team = red
34 make b1 Footman with team = blue
35 make loner Footman
36 act r1 Hit at r2
37 expect r2.Health = 100 from G303: r2.Health
38 act r1 Hit at b1
39 expect b1.Health = 90 from G303: b1.Health - "deals the full 10"
40 act r1 Hit at loner
41 expect loner.Health = 90 from G303: loner.Health - "deals the full 10"
42 act red ResearchWeapons
43 act r1 Charm at b1
44 expect b1.team = red
45 expect b1.Attack = 12 from G302: "footman from 10" + "+2 attack per level" * count "act red ResearchWeapons"
46 save
47 act b1 Hit at r2
48 expect r2.Health = 100 from G303: r2.Health
49 remove Charmed from b1
50 expect b1.team = blue
51 expect b1.Attack = 10 from G302: "footman from 10"
52 act b1 Hit at r2
53 expect r2.Health = 90 from G303: r2.Health - "deals the full 10"
55play G304 "The paladin's devotion gives 10 armour to itself and a red footman within 5, none to a blue one beside it, a teamless one, or a red one 10 off"
56 make red Team
57 make blue Team
58 make p Paladin with team = red at 0
59 make ally Footman with team = red at 3
60 make foe Footman with team = blue at 3
61 make loner Footman at 2
62 make far Footman with team = red at 10
63 expect p.Armor = 10 from G304: "10 armor"
64 expect ally.Armor = 10 from G304: ally.Armor + "+10 armor"
65 expect foe.Armor = 0 from G304: foe.Armor
66 expect loner.Armor = 0 from G304: loner.Armor
67 expect far.Armor = 0 from G304: far.Armor
68 save
69 place far 4
70 expect far.Armor = 10 from G304: far.Armor + "+10 armor"
72play G305 "A necromancer's 30 minion power makes its wolf's attack 30, 40 when the power rises; the wolf killed, the necromancer's 100 attack is 75 for 10 seconds"
73 make n Necromancer
74 make w Wolf with master = n
75 expect w.Attack = 30 from G305: "30 makes"
76 apply DarkPact to n
77 expect w.Attack = 40 from content: G305 gives no figure for the dark pact; the content's +10 on the necromancer's 30
78 deal 50 to w
79 expect w gone
80 expect n.Attack = 75 from G305: n.Attack * (1 + "-25% attack")
81 save
82 advance 10s
83 expect n.Attack = 100 from G305: n.Attack
85play G306 "A diver's 10 attack is 20 while it rains, wherever it stands, and 10 again when the 30 seconds of rain end"
86 make world World
87 link world world
88 make d Diver at 100
89 expect d.Attack = 10 from G306: d.Attack
90 apply Rain to world
91 expect d.Attack = 20 from G306: d.Attack * (1 + "+100% attack")
92 save
93 advance 29s
94 expect d.Attack = 20 from G306: d.Attack * (1 + "+100% attack")
95 advance 1s
96 expect d.Attack = 10 from G306: d.Attack
98play G303 "Two charms that overlap on a blue footman leave it on the newer's side, still the newer's when the older ends first, and blue when both have ended"
99 make red Team
100 make blue Team
101 make green Team
102 make r1 Footman with team = red
103 make g1 Footman with team = green
104 make b1 Footman with team = blue
105 apply Charmed to b1 for 2s from r1
106 expect b1.team = red
107 apply Charmed to b1 for 4s from g1
108 expect b1.team = green
109 advance 3s
110 expect b1.team = green
111 advance 2s
112 expect b1.team = blue

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/relations.ledger Health
Health: a change to it meets 1 rule, in this order
before, at Multiply
  NoFriendlyFire: Damage of holder by other allies at Multiply (content/cookbook/relations.ledger:55)
    prevents it, stops the phase: no rule after it runs; held by Footman
no archetype lacks a layer its like hold

Run it yourself

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