Ledger v3 · C# · Godot 4.7 Get started

Queries

Who a rule takes.

✓ 5 plays, 96 steps, all passingFrom v2's cookbook

v2's cookbook, who a rule takes (G293-G297): a target rule that is a choice between two whole conditions, one that bans a pair of tags rather than either, a cure that names the worse kind it leaves, an aura on everyone but its own side, and a sword's bonus taken back with the sword.

content/cookbook/queries.ledgerthe content
1# v2's cookbook, who a rule takes (G293-G297): a target rule that is a choice between two whole conditions, one that
2# bans a pair of tags rather than either, a cure that names the worse kind it leaves, an aura on everyone but its own
3# side, and a sword's bonus taken back with the sword.
4
5rate 60
6link team
7allegiance team
8pile Equipped grants
9pile Pack
10stat MaxHealth
11stat Attack
12pool Health max MaxHealth
13damage Health
14tags Undead Demon Summon Champion Poison Poison.Grave
16archetype Team
18archetype Priest
19 base MaxHealth 100
20 full Health
21 grants Banish Consecrate Antidote Purify
23archetype Wight
24 tags Undead
25 base MaxHealth 100
26 full Health
28archetype Lich
29 tags Undead Champion
30 base MaxHealth 100
31 full Health
33archetype Imp
34 tags Summon
35 base MaxHealth 100
36 full Health
38archetype Demon
39 tags Demon
40 base MaxHealth 100
41 full Health
43archetype DeathKnight
44 tags Undead Champion
45 base MaxHealth 100
46 full Health
48effect Cursed
50effect Marked
52effect Blessed
54# ---- G293 banish: an undead that isn't a champion, or a summon something has cursed or marked ----
56ability Banish
57 target one
58 requires (has(target, Undead) and not has(target, Champion)) or (has(target, Summon) and (has(target, Cursed) or has(target, Marked))) else "not banishable"
59 apply Banished to target
61effect Banished
62 lasts 10s
64# ---- G294 consecrate: undead or demon, and cursed or marked, but never a blessed champion ----
66ability Consecrate
67 target one
68 requires (has(target, Undead) or has(target, Demon)) and (has(target, Cursed) or has(target, Marked)) and not (has(target, Champion) and has(target, Blessed)) else "not consecrable"
69 apply Consecrated to target
71effect Consecrated
72 lasts 10s
74# ---- G295 the antidote cures poison but leaves grave rot, which is still poison to everything else ----
76effect Venom
77 tags Poison
78 every 1s
79 deal 5 to holder
81effect GraveRot
82 tags Poison.Grave
83 every 1s
84 deal 5 to holder
86ability Antidote
87 target one
88 remove all Poison unless Poison.Grave from target
90ability Purify
91 target one
92 requires has(target, Poison) else "not poisoned"
93 remove all Poison from target
95# ---- G296 the banner of dread: a quarter off the attack of everyone in reach who isn't on its side, neutrals too ----
97archetype Fighter
98 base MaxHealth 100
99 base Attack 20
100 full Health
102archetype Banner
103 base MaxHealth 100
104 full Health
105 has DreadBanner
107effect DreadBanner
108 aura Dread on all within 8 except allies
110effect Dread
111 Attack - 25%
113# ---- G297 the sword's 15 comes and goes with the sword; another's 5 stays ----
115archetype Sword
116 gives SwordEdge
118effect SwordEdge
119 Attack + 15
121archetype Bard
122 base MaxHealth 100
123 full Health
125effect Inspired
126 Attack + 5
content/cookbook/queries.playwhat it must do
1catalog queries.ledger
2row G293 Cursed Marked Banished Banish Priest Wight Lich Imp Demon
3row G294 Cursed Blessed Consecrated Consecrate Priest Wight Demon DeathKnight
4row G295 Venom GraveRot Antidote Purify Priest Wight
5row G296 DreadBanner Dread Team Fighter Banner
6row G297 SwordEdge Inspired Fighter Sword Bard
7
8play G293 "A wight can be banished, a lich can't; an imp only once marked; a cursed demon by neither half"
9 make p Priest
10 make w Wight
11 make l Lich
12 make i Imp
13 make d Demon
14 act p Banish at w
15 expect done
16 expect w remaining Banished = 10s from G293: "banished for 10 seconds"
17 act p Banish at l
18 expect refused Requirement "not banishable"
19 act p Banish at i
20 expect refused Requirement
21 apply Marked to i
22 save
23 act p Banish at i
24 expect done
25 apply Cursed to d
26 act p Banish at d
27 expect refused Requirement
29play G294 "A cursed demon can be consecrated and a plain wight can't; a cursed champion can until it is blessed; a blessed wight that is cursed still can"
30 make p Priest
31 make d Demon
32 make w Wight
33 make k DeathKnight
34 make w2 Wight
35 apply Cursed to d
36 act p Consecrate at d
37 expect done
38 act p Consecrate at w
39 expect refused Requirement "not consecrable"
40 apply Cursed to k
41 act p Consecrate at k
42 expect done
43 apply Blessed to k
44 save
45 act p Consecrate at k
46 expect refused Requirement
47 apply Cursed to w2
48 apply Blessed to w2
49 act p Consecrate at w2
50 expect done
52play G295 "The antidote takes the venom and leaves the grave rot, which still counts as poison: a purify can still be cast, and takes it"
53 make p Priest
54 make w Wight
55 apply Venom to w
56 apply GraveRot to w
57 advance 1s
58 expect w.Health = 90 from content: G295 gives the poisons no damage; the content's venom and grave rot at 5 a second each for 1 s, off the wight's 100
59 act p Antidote at w
60 expect w lacks Venom
61 expect w has GraveRot
62 save
63 advance 1s
64 expect w.Health = 85 from content: G295's antidote leaves the grave rot; the content's 5 a second for 1 s, 90 - 5
65 expect p can Purify at w
66 act p Purify at w
67 expect w lacks GraveRot
68 expect p cannot Purify at w Requirement
70play G296 "The banner takes a quarter of the attack of an enemy and a teamless wolf in reach, not of an ally beside it or an enemy out of reach; the wolf walked off, or taken in, has it back"
71 make a Team
72 make b Team
73 make banner Banner with team = a at 0
74 make knight Fighter with team = a at 2
75 make orc Fighter with team = b at 3
76 make wolf Fighter at 5
77 make far Fighter with team = b at 20
78 expect knight.Attack = 20 from G296: knight.Attack
79 expect orc.Attack = 15 from G296: orc.Attack * (1 - "loses 25% of their attack")
80 expect wolf.Attack = 15 from G296: wolf.Attack * (1 - "loses 25% of their attack")
81 expect far.Attack = 20 from G296: far.Attack
82 save
83 place wolf 30
84 expect wolf.Attack = 20 from G296: wolf.Attack
85 place wolf 4
86 expect wolf.Attack = 15 from G296: wolf.Attack * (1 - "loses 25% of their attack")
87 link wolf team a
88 expect wolf.Attack = 20 from G296: wolf.Attack
89 place far 6
90 expect far.Attack = 15 from G296: far.Attack * (1 - "loses 25% of their attack")
91 covers strain 20
93play G297 "The sword's 15 and a bard's 5 make 40; put away, the sword takes back its 15 and leaves the 5; a rewind to before brings the sword back with its bonus, and a broken sword's is gone for good"
94 make me Fighter
95 make bard Bard
96 make sw Sword
97 move sw to me.Equipped
98 apply Inspired to me from bard
99 expect me.Attack = 40 from G297: me.Attack + "+15 attack" + "the +5"
100 expect me has SwordEdge from sw
101 save
102 move sw to me.Pack
103 expect me.Attack = 25 from G297: me.Attack + "the +5"
104 expect me lacks SwordEdge
105 expect me has Inspired from bard
106 rewind
107 expect me.Attack = 40 from G297: me.Attack + "+15 attack" + "the +5"
108 expect me has SwordEdge from sw
109 destroy sw
110 expect me.Attack = 25 from content: G297 leaves open whether destroying the sword takes its bonus at once; the content takes it, leaving the bard's 5 on the content's 20
111 save
112 expect me.Attack = 25 from G297: me.Attack + "the +5"
113 expect me lacks SwordEdge

Run it yourself

ledger check content/cookbook/queries.ledger content/cookbook/queries.play
ledger play content/cookbook/queries.play