Burn
A burn over time, stacking to 5, each new stack starting its time again
stack add maxlastseverydeal ... from sourceself.stacksA burn over time, lifted from the ARPG slice's content\arena.ledger (Burning). Each stack deals 3 a half second, up to 5 stacks, credited to whoever lit it; a new stack starts the 3 seconds again, so a burn kept lit never ends. The slice's fireball lights it (windup.ledger here); the play lights it by hand.
1
# A burn over time, lifted from the ARPG slice's content\arena.ledger (Burning). Each stack deals 3 a half second, up2
# to 5 stacks, credited to whoever lit it; a new stack starts the 3 seconds again, so a burn kept lit never ends. The3
# slice's fireball lights it (windup.ledger here); the play lights it by hand.5
rate 606
stat MaxHealth7
pool Health max MaxHealth8
damage Health9
tags Fire11
effect Burning12
tags Fire13
stack add max 514
lasts 3s15
every 0.5s16
deal 3 * self.stacks Fire to holder from source18
archetype Dummy19
base MaxHealth 100020
full Health1
catalog burn.ledger3
# The burn's numbers, from Burning: 3 a stack every 0.5 s for 3 s, up to 5 stacks. A dummy stands at 1000 Health.5
play "one stack: 3 at each half second, six beats in its 3 seconds, 18 in all, and it is gone"6
make p Dummy7
make d Dummy8
apply Burning to d from p9
advance 0.5s10
expect d.Health = 997 from content: 1000 less one beat of 3 * 1 stack at 0.5 s11
expect event Change of d credited to p tagged Fire12
advance 2.5s13
expect d.Health = 982 from content: 1000 less six beats of 3, at 0.5 s to 3 s14
expect d lacks Burning16
play "stacked: five at most, each beat 3 a stack"17
make p Dummy18
make d Dummy19
repeat 520
apply Burning to d from p21
apply Burning to d from p22
expect already23
expect d has Burning 5 from content: stack add max 5, the sixth turned away24
advance 0.5s25
expect d.Health = 985 from content: 1000 less one beat of 3 * 5 stacks27
play "a stack more starts the 3 seconds again"28
make p Dummy29
make d Dummy30
apply Burning to d from p31
advance 2s32
expect d.Health = 988 from content: 1000 less four beats of 333
apply Burning to d from p34
expect d remaining Burning = 3s from content: lasts 3s, started again by the second stack35
save36
advance 0.5s37
expect d.Health = 982 from content: 988 less a beat of 3 * 2 stacksRun it yourself
ledger check content/cookbook/mechanics/burn.ledger content/cookbook/mechanics/burn.play
ledger play content/cookbook/mechanics/burn.play