Queries
Who a rule takes.
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.
1
# v2's cookbook, who a rule takes (G293-G297): a target rule that is a choice between two whole conditions, one that2
# bans a pair of tags rather than either, a cure that names the worse kind it leaves, an aura on everyone but its own3
# side, and a sword's bonus taken back with the sword.5
rate 606
link team7
allegiance team8
pile Equipped grants9
pile Pack10
stat MaxHealth11
stat Attack12
pool Health max MaxHealth13
damage Health14
tags Undead Demon Summon Champion Poison Poison.Grave16
archetype Team18
archetype Priest19
base MaxHealth 10020
full Health21
grants Banish Consecrate Antidote Purify23
archetype Wight24
tags Undead25
base MaxHealth 10026
full Health28
archetype Lich29
tags Undead Champion30
base MaxHealth 10031
full Health33
archetype Imp34
tags Summon35
base MaxHealth 10036
full Health38
archetype Demon39
tags Demon40
base MaxHealth 10041
full Health43
archetype DeathKnight44
tags Undead Champion45
base MaxHealth 10046
full Health48
effect Cursed50
effect Marked52
effect Blessed54
# ---- G293 banish: an undead that isn't a champion, or a summon something has cursed or marked ----56
ability Banish57
target one58
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 target61
effect Banished62
lasts 10s64
# ---- G294 consecrate: undead or demon, and cursed or marked, but never a blessed champion ----66
ability Consecrate67
target one68
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 target71
effect Consecrated72
lasts 10s74
# ---- G295 the antidote cures poison but leaves grave rot, which is still poison to everything else ----76
effect Venom77
tags Poison78
every 1s79
deal 5 to holder81
effect GraveRot82
tags Poison.Grave83
every 1s84
deal 5 to holder86
ability Antidote87
target one88
remove all Poison unless Poison.Grave from target90
ability Purify91
target one92
requires has(target, Poison) else "not poisoned"93
remove all Poison from target95
# ---- G296 the banner of dread: a quarter off the attack of everyone in reach who isn't on its side, neutrals too ----97
archetype Fighter98
base MaxHealth 10099
base Attack 20100
full Health102
archetype Banner103
base MaxHealth 100104
full Health105
has DreadBanner107
effect DreadBanner108
aura Dread on all within 8 except allies110
effect Dread111
Attack - 25%113
# ---- G297 the sword's 15 comes and goes with the sword; another's 5 stays ----115
archetype Sword116
gives SwordEdge118
effect SwordEdge119
Attack + 15121
archetype Bard122
base MaxHealth 100123
full Health125
effect Inspired126
Attack + 51
catalog queries.ledger2
row G293 Cursed Marked Banished Banish Priest Wight Lich Imp Demon3
row G294 Cursed Blessed Consecrated Consecrate Priest Wight Demon DeathKnight4
row G295 Venom GraveRot Antidote Purify Priest Wight5
row G296 DreadBanner Dread Team Fighter Banner6
row G297 SwordEdge Inspired Fighter Sword Bard8
play G293 "A wight can be banished, a lich can't; an imp only once marked; a cursed demon by neither half"9
make p Priest10
make w Wight11
make l Lich12
make i Imp13
make d Demon14
act p Banish at w15
expect done16
expect w remaining Banished = 10s from G293: "banished for 10 seconds"17
act p Banish at l18
expect refused Requirement "not banishable"19
act p Banish at i20
expect refused Requirement21
apply Marked to i22
save23
act p Banish at i24
expect done25
apply Cursed to d26
act p Banish at d27
expect refused Requirement29
play 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 Priest31
make d Demon32
make w Wight33
make k DeathKnight34
make w2 Wight35
apply Cursed to d36
act p Consecrate at d37
expect done38
act p Consecrate at w39
expect refused Requirement "not consecrable"40
apply Cursed to k41
act p Consecrate at k42
expect done43
apply Blessed to k44
save45
act p Consecrate at k46
expect refused Requirement47
apply Cursed to w248
apply Blessed to w249
act p Consecrate at w250
expect done52
play 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 Priest54
make w Wight55
apply Venom to w56
apply GraveRot to w57
advance 1s58
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 10059
act p Antidote at w60
expect w lacks Venom61
expect w has GraveRot62
save63
advance 1s64
expect w.Health = 85 from content: G295's antidote leaves the grave rot; the content's 5 a second for 1 s, 90 - 565
expect p can Purify at w66
act p Purify at w67
expect w lacks GraveRot68
expect p cannot Purify at w Requirement70
play 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 Team72
make b Team73
make banner Banner with team = a at 074
make knight Fighter with team = a at 275
make orc Fighter with team = b at 376
make wolf Fighter at 577
make far Fighter with team = b at 2078
expect knight.Attack = 20 from G296: knight.Attack79
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.Attack82
save83
place wolf 3084
expect wolf.Attack = 20 from G296: wolf.Attack85
place wolf 486
expect wolf.Attack = 15 from G296: wolf.Attack * (1 - "loses 25% of their attack")87
link wolf team a88
expect wolf.Attack = 20 from G296: wolf.Attack89
place far 690
expect far.Attack = 15 from G296: far.Attack * (1 - "loses 25% of their attack")91
covers strain 2093
play 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 Fighter95
make bard Bard96
make sw Sword97
move sw to me.Equipped98
apply Inspired to me from bard99
expect me.Attack = 40 from G297: me.Attack + "+15 attack" + "the +5"100
expect me has SwordEdge from sw101
save102
move sw to me.Pack103
expect me.Attack = 25 from G297: me.Attack + "the +5"104
expect me lacks SwordEdge105
expect me has Inspired from bard106
rewind107
expect me.Attack = 40 from G297: me.Attack + "+15 attack" + "the +5"108
expect me has SwordEdge from sw109
destroy sw110
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 20111
save112
expect me.Attack = 25 from G297: me.Attack + "the +5"113
expect me lacks SwordEdgeRun it yourself
ledger check content/cookbook/queries.ledger content/cookbook/queries.play
ledger play content/cookbook/queries.play