Sometimes
Bonuses that count only sometimes.
v2's cookbook, only sometimes (G251-G256): bonuses that count for one kind of skill, one kind of target, one kind of roll or one state of the target. A bonus a stat doesn't hold leaves the character sheet alone, and a preview of the skill shows it; flat bonuses come before percentages; a critical hit leaves out the bad stages by tag.
1
# v2's cookbook, only sometimes (G251-G256): bonuses that count for one kind of skill, one kind of target, one kind of2
# roll or one state of the target. A bonus a stat doesn't hold leaves the character sheet alone, and a preview of the3
# skill shows it; flat bonuses come before percentages; a critical hit leaves out the bad stages by tag.5
rate 606
stat MaxHealth7
stat Attack8
stat AttackStage min -6 max 69
stat DefenseStage min -6 max 610
pool Health max MaxHealth11
damage Health12
stages Add Multiply13
tags Frost Undead Lowered Raised Critical15
curve Stage16
-6 0.2517
-5 0.28571418
-4 0.33333319
-3 0.420
-2 0.521
-1 0.66666722
0 123
1 1.524
2 225
3 2.526
4 327
5 3.528
6 430
archetype Fighter31
base MaxHealth 10032
base Attack 2033
full Health34
grants Frostbite Cleave SwordsDance StormThrow Blow Finisher36
archetype Ghoul37
tags Undead38
base MaxHealth 30039
full Health41
archetype Golem42
base MaxHealth 33043
full Health45
# ---- G251 the frost codex: half again on the frost kind's hits, which the sheet's attack doesn't show and a preview of46
# frostbite does ----48
effect FrostCodex49
before Damage by holder having Frost at Multiply50
scale 1.552
ability Frostbite53
tags Frost54
target one55
deal holder.Attack Frost to target57
ability Cleave58
target one59
deal holder.Attack to target61
# ---- G252 the silver blade: 10 more against the undead, added before any percentage ----63
effect SilverBlade64
before Damage by holder at Add when has(event.subject, Undead)65
add 1067
# ---- G253 stages: an attack stage is half again a step up, a third off a step down, six at most either way; swords68
# dance is two up. A blow is the attacker's attack by its stage over the target's defence stage ----70
effect AttackUp71
stack add72
AttackStage + 174
effect DefenseUp75
tags Raised76
stack add77
DefenseStage + 179
ability SwordsDance80
target self81
apply AttackUp 283
ability Blow84
target one85
deal holder.Attack * Stage(holder.AttackStage) / Stage(target.DefenseStage) to target87
# ---- G254 a critical hit goes past the attacker's lowered stages and the target's raised ones, effect by effect:88
# the stage it reads leaves out the terms of effects carrying those tags ----90
effect Intimidated91
tags Lowered92
AttackStage - 194
ability StormThrow95
tags Critical96
target one97
deal 1.5 * holder.Attack * Stage(holder.AttackStage except Lowered) / Stage(target.DefenseStage except Raised) Critical to target99
# ---- G255 G256 a blow does double on a target at or below a third of its health; the finisher's own 100 lands only100
# there, while the swing before it lands anyway ----102
effect Cruel103
before Damage by holder at Multiply when event.subject.Health <= event.subject.MaxHealth / 3104
scale 2106
ability Finisher107
target one108
deal holder.Attack to target109
if target.Health <= target.MaxHealth / 3110
deal 100 to target1
catalog sometimes.ledger2
row G251 FrostCodex Frostbite Cleave Fighter3
row G252 SilverBlade Frostbite Cleave Fighter Ghoul4
row G253 AttackUp DefenseUp SwordsDance Blow Fighter Golem5
row G254 DefenseUp Intimidated Blow StormThrow Golem6
row G255 Cruel Golem7
row G256 Cruel Finisher Golem9
play G251 "The frost codex makes frostbite's 20 a 30, and a cleave stays 20; the sheet's attack is still 20, and a preview of frostbite shows the 30"10
make f Fighter11
apply FrostCodex to f12
make g Golem13
expect f.Attack = 20 from G251: "20-damage"14
expect preview f Frostbite at g g.Health = 300 from G251: g.Health - "Frostbite hits for 30"15
act f Frostbite at g16
expect g.Health = 300 from G251: g.Health - "Frostbite hits for 30"17
save18
act f Cleave at g19
expect g.Health = 280 from G251: g.Health - "Frostbite hits for 30" - "cleave stays 20"21
play G252 G251 "The silver blade's 10 against the undead: a cleave on a ghoul is 30; with the codex, frostbite on it is 20 and 10, half again, 45; on a golem a cleave is 20"22
make f Fighter23
apply SilverBlade to f24
apply FrostCodex to f25
make h Ghoul26
make g Golem27
act f Cleave at h28
expect h.Health = 270 from G252: h.Health - "Cleave hits a ghoul for 30"29
act f Frostbite at h30
expect h.Health = 225 from G252: h.Health - "Cleave hits a ghoul for 30" - "45, flat"31
save32
act f Cleave at g33
expect g.Health = 310 from G252: g.Health - "cleave stays 20" in G25135
play G253 "Swords dance is two stages up: twice is four, and a blow of 20 is 60; four times is capped at six, 80. Two stages of defence halve it"36
make f Fighter37
make g Golem38
act f SwordsDance39
act f SwordsDance40
expect f.AttackStage = 4 from G253: "+4 steps"41
act f Blow at g42
expect g.Health = 270 from G253: g.Health - "becomes 60"43
act f SwordsDance44
act f SwordsDance45
expect f.AttackStage = 6 from G253: "capped at +6"46
save47
act f Blow at g48
expect g.Health = 190 from G253: g.Health - "becomes 60" - "so 80"49
apply DefenseUp 2 to g50
act f Blow at g51
expect g.Health = 150 from content: G253 divides by two defense steps the same way, but none of its words hold the 2 that +2 steps divide by; the blow's 80 halved to 40, off the content's 19053
play G254 "Intimidated, an attacker's blow of 20 is 13.33; a golem's iron defence, two stages, makes another's 10; the intimidated attacker's critical storm throw on the iron golem, 30, goes past both"54
make f Fighter55
make e Fighter56
make g Golem57
make k Golem58
apply Intimidated to f59
act f Blow at g60
expect g.Health = 316.66666 from content: G254 gives the intimidated blow's 13.3 but leaves open its rounding and the golem's health; the content's 330 less 20 x 0.66666761
apply DefenseUp 2 to k62
act e Blow at k63
expect k.Health = 320 from G254: k.Health - "golem takes 10"64
save65
act f StormThrow at k66
expect k.Health = 290 from G254: k.Health - "golem takes 10" - "does 30"68
play G255 G256 "Cruel, a blow is doubled on a target at or below a third of its health. The finisher on a golem of 330 at 300 is a swing of 20 and nothing; at 110 it is a swing of 40 and 200 more"69
make f Fighter70
apply Cruel to f71
make g Golem72
deal 30 to g73
act f Finisher at g74
expect g.Health = 280 from G256: "330-health" - "deal 30" - "20 x"75
save76
deal 170 to g77
act f Finisher at g78
expect g.Health = 0 from content: G256 gives the 240 against the 110 left but leaves open whether health stops at none; the content's doesWhat 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.
Health: a change to it meets 3 rules, in this order before, at Add SilverBlade: Damage by holder at Add when has(event.subject, Undead) (content/cookbook/sometimes.ledger:64) adds to it; held by no archetype and applied by no content: the game or a play puts it on before, at Multiply FrostCodex: Damage by holder having Frost at Multiply (content/cookbook/sometimes.ledger:49) scales it; held by no archetype and applied by no content: the game or a play puts it on Cruel: Damage by holder at Multiply when event.subject.Health <= event.subject.MaxHealth / 3 (content/cookbook/sometimes.ledger:103) scales it; held by no archetype and applied by no content: the game or a play puts it on no archetype lacks a layer its like hold
Run it yourself
ledger check content/cookbook/sometimes.ledger content/cookbook/sometimes.play
ledger play content/cookbook/sometimes.play
ledger pipeline content/cookbook/sometimes.ledger Health