Casting
A caster's slot holding off its instants, an interrupt reading the time left, a cast pushed back by hits, and a channel quickening each beat
phases ... slot alloff castremaining(ACTOR)pushed back D at most N byevery Fself.beatsA caster's cast time, from the raid's four witnesses (its slot.ledger, time-left.ledger, pushback.ledger and quicken.ledger): the catalog's slot holds every ability while a cast runs, but the interrupt saying off cast; the interrupt reads the time its target's cast has left, its length said once, in its windup; a hit steps a cast back half a second, three times a cast at most; and a channel's beats come each a tenth sooner than the last, its interval read again at each beat with the count of beats run. Every phase runs on its caster's CastSpeed.
1
# A caster's cast time, from the raid's four witnesses (its slot.ledger, time-left.ledger, pushback.ledger and2
# quicken.ledger): the catalog's slot holds every ability while a cast runs, but the interrupt saying off cast; the3
# interrupt reads the time its target's cast has left, its length said once, in its windup; a hit steps a cast back half4
# a second, three times a cast at most; and a channel's beats come each a tenth sooner than the last, its interval read5
# again at each beat with the count of beats run. Every phase runs on its caster's CastSpeed.7
rate 608
stat MaxHealth9
stat CastSpeed default 110
pool Health max MaxHealth11
damage Health12
link team13
allegiance team14
phases clock CastSpeed slot all15
archetype Side17
effect Locked18
lasts 4s20
ability Nova21
target self22
windup 3s24
ability Bolt25
target one enemy26
windup 2s27
pushed back 0.5s at most 3 by Damage of holder when event.landed > 028
deal 10 to target30
# an instant, held off by a cast as a second cast is31
ability Jab32
target one enemy33
deal 1 to target35
# the interrupt, off the cast, doing more on a cast nearly done36
ability Bash37
target one enemy38
off cast39
requires active(target) > 0 else "not casting"40
let left = remaining(target)41
stop target42
apply Locked to target for 1s * if(left <= 1s, 8, 4)44
ability Storm45
target self46
channel 4s47
every 1s / (1 + 0.1 * self.beats)48
deal 1 to all enemies within 40 of holder50
archetype Mage51
base MaxHealth 10052
full Health53
grants Nova Bolt Jab Bash Storm1
catalog casting.ledger3
# The raid's numbers: Nova 3 s, Bolt 2 s pushed back 0.5 s at most three times, Storm 4 s beating each a tenth sooner.5
play "mid-cast, a second cast and an instant are refused Busy; the interrupt, off the cast, goes"6
make r Side7
make b Side8
make m Mage with team = r at 09
make t Mage with team = b at 510
act m Bolt at t11
act m Bolt at t12
expect refused Busy13
act m Jab at t14
expect refused Busy15
expect m active Bolt16
act t Bash at m17
expect done18
expect m stopped Bolt Interrupted20
play "cut with 2 s left, locked 4 s; with 1 s left, 8 s"21
make r Side22
make b Side23
make m Mage with team = r at 024
make t Mage with team = b at 525
act t Nova26
advance 60t27
act m Bash at t28
expect t remaining Locked = 4s from content: 2 s of Nova's 3 left, over 60 ticks29
remove Locked from t30
act t Nova31
advance 120t32
act m Bash at t33
expect t remaining Locked = 8s from content: 1 s of Nova's 3 left, 60 ticks35
play "a 2 s cast hit at 1 s goes off at 2.5 s; hit four times, three push"36
make r Side37
make b Side38
make m Mage with team = r at 039
make t Mage with team = b at 540
act m Bolt at t41
advance 60t42
deal 1 to m43
expect m active Bolt elapsed 30t remaining 90t from content: 60 run, 30 stepped back, Bolt's 120 held44
advance 89t45
expect t.Health = 100 from content: Bolt's 2 s and a push of 0.5 s is 150 ticks; one short46
advance 1t47
expect t.Health = 90 from content: Bolt's 10 at 150 ticks48
act m Bolt at t49
advance 30t50
deal 1 to m51
advance 36t52
deal 1 to m53
advance 36t54
deal 1 to m55
advance 36t56
deal 1 to m57
expect m active Bolt elapsed 48t remaining 72t from content: pushed at 180, 216 and 252, 90 ticks back; the fourth, past at most 3, moves nothing58
advance 71t59
expect t.Health = 90 from content: 120 of cast and 90 pushed from 150 is 360; one short60
advance 1t61
expect t.Health = 80 from content: the second Bolt's 10 at 36063
play "beats at 60, 115, 165 and 211 ticks: each a tenth quicker than the last"64
make r Side65
make b Side66
make m Mage with team = r at 067
make t Mage with team = b at 568
act m Storm69
advance 114t70
expect t.Health = 99 from content: one beat at 60; the second 1 s / 1.1 on, 55 ticks71
advance 1t72
expect t.Health = 98 from content: the second beat at 11573
advance 96t74
expect t.Health = 96 from content: the third at 165 (1 / 1.2 s), the fourth at 211 (1 / 1.3 s)75
advance 29t76
expect m finished Storm77
expect t.Health = 96 from content: the fifth 1 / 1.4 s on, past Storm's 4 sRun it yourself
ledger check content/cookbook/mechanics/casting.ledger content/cookbook/mechanics/casting.play
ledger play content/cookbook/mechanics/casting.play