Time
How long things last.
v2's cookbook, how long things last (G326-G334): tenacity shortening a stun, stuns diminishing within a window, a cap on a stun's length, a stun counted in its holder's turns, haste on a cooldown, potions with their own clocks and a shared one, givers who lengthen what they give, a damage over time that ticks faster for a hasted caster, and a refresh that keeps some of the time left. The game raises TurnEnded of each actor as its turn ends. Then an actor's own time: a frost field slowing the enemies around its holder, every timer on them with them.
1
# v2's cookbook, how long things last (G326-G334): tenacity shortening a stun, stuns diminishing within a window, a2
# cap on a stun's length, a stun counted in its holder's turns, haste on a cooldown, potions with their own clocks and a3
# shared one, givers who lengthen what they give, a damage over time that ticks faster for a hasted caster, and a4
# refresh that keeps some of the time left. The game raises TurnEnded of each actor as its turn ends. Then an actor's5
# own time: a frost field slowing the enemies around its holder, every timer on them with them.7
rate 608
stat MaxHealth9
stat Tenacity10
stat AbilityHaste11
stat Haste12
stat TimeRate13
time TimeRate14
link team15
allegiance team16
pool Health max MaxHealth17
damage Health18
# v2's time channel, in its order: tenacity and diminishing returns ahead of ability haste, since shortening a stun and19
# refusing one are about the stun; a giver's longer buffs and extra turns after; the stun cap last.20
stages Tenacity Diminishing Haste Buff Turns Cap21
tags Stun Buff22
event TurnEnded23
turn TurnEnded25
archetype Hero26
base MaxHealth 100027
full Health28
has CooldownHaste29
grants Bash Imprison Flash HealingPotion ManaPotion Inspire Rally Corrupt Wither31
effect CooldownHaste32
before Apply having Cooldown of holder at Haste33
scale duration 100 / (100 + holder.AbilityHaste)35
effect Stunned36
tags Stun37
stack replace39
ability Bash40
target one41
apply Stunned to target for 2s43
# ---- G326 tenacity: mercury treads' 35% take that much off every stun ----45
effect MercuryTreads46
Tenacity + 0.3548
effect Tenacious49
before Apply of holder having Stun at Tenacity50
scale duration 1 - holder.Tenacity floor52
# ---- G327 diminishing returns: each stun in the last 18 seconds halves the next; the fourth is refused, until the53
# window, restarted by each stun, lapses ----55
curve Diminish steps56
0 157
1 0.558
2 0.2560
effect StunDR61
stack add62
lasts 18s64
effect Diminishing65
before Apply of holder having Stun at Diminishing when stacks(holder, StunDR) >= 366
prevent67
before Apply of holder having Stun Timed at Diminishing68
scale duration Diminish(stacks(holder, StunDR))69
after Apply of holder having Stun70
apply StunDR72
# ---- G328 hibernate: no stun lasts more than 5 seconds ----74
effect StunCap75
before Apply having Stun of holder at Cap76
at most duration 5s78
# ---- G329 the frost prison: a stun of two of its holder's turns, which tenacity shortens to a whole number of them,79
# 1.3 rounded down to one ----81
effect FrostPrison82
tags Stun83
lasts 2 turns85
ability Imprison86
target one87
apply FrostPrison to target89
# ---- G330 ionian boots: 25 haste makes a cooldown 100 / 125 of itself, flash's 20 seconds 16 ----91
effect IonianBoots92
AbilityHaste + 2594
ability Flash95
cooldown 20s97
# ---- G331 potions: each its own 60 seconds, which haste shortens, and a shared 30 that it doesn't ----99
effect PotionShared100
lasts 30s102
ability HealingPotion103
cooldown 60s104
requires not has(holder, PotionShared) else "potions shared"105
heal 100 to holder106
apply PotionShared to holder108
ability ManaPotion109
cooldown 60s110
requires not has(holder, PotionShared) else "potions shared"111
apply PotionShared to holder113
# ---- G332 a bard's buffs last half again as long, and a tactician's a turn longer; each touches only its own kind ----115
effect Inspired116
tags Buff117
lasts 10s119
effect Rallied120
tags Buff121
lasts 2 turns123
ability Inspire124
target one125
apply Inspired to target127
ability Rally128
target one129
apply Rallied to target131
effect BardicLore132
before Apply by holder having Buff Timed at Buff133
scale duration 1.5135
effect Tactics136
before Apply by holder having Buff at Turns137
add duration 1 turn139
# ---- G333 a hasted caster's corruption: 5 every 2 seconds for 12, the gap shortened by the caster's haste as it was140
# when cast ----142
effect Corruption143
lasts 12s144
var gap = 2 * 100 / (100 + source.Haste)145
every self.gap * 1s146
deal 5 to holder148
ability Corrupt149
target one150
apply Corruption to target152
effect Bloodlust153
Haste + 25155
# ---- G334 pandemic: a refresh keeps what was left, up to 30% of the length ----157
effect Withering158
stack refresh keep up to 30%159
lasts 12s160
every 1s161
deal 1 to holder163
ability Wither164
target one165
apply Withering to target167
# ---- an actor's time: an outside author's mechanic (design round, A1). A frost field slows the enemies within 5 of its168
# holder to half their pace while they stand in it, and with them every timer on them: a burn's ticks and its end come169
# at their pace, not the world's, and one walked out of the field runs on at its own, keeping what it had run ----171
archetype Team173
archetype Ghoul174
base MaxHealth 100175
full Health177
effect FrostField178
aura Chilled on all enemies within 5180
effect Chilled181
TimeRate x 0.5183
effect Scorched184
lasts 2s185
every 1s186
deal 10 to holder1
catalog time.ledger2
row G326 Stunned MercuryTreads Tenacious Bash Hero3
row G327 Stunned MercuryTreads Tenacious StunDR Diminishing Bash Hero4
row G328 Stunned StunCap Hero5
row G329 MercuryTreads Tenacious FrostPrison Imprison Hero6
row G330 CooldownHaste IonianBoots Flash Hero7
row G331 CooldownHaste IonianBoots PotionShared HealingPotion ManaPotion Hero8
row G332 Inspired Rallied BardicLore Tactics Inspire Rally Hero9
row G333 Corruption Bloodlust Corrupt Hero10
row G334 Withering Wither Hero12
play G326 "In mercury treads a 2 second bash stuns for 1.3"13
make h Hero14
make t Hero15
apply MercuryTreads to t16
apply Tenacious to t17
act h Bash at t18
expect t remaining Stunned = 1.3s from G326: "stuns for 1.3 seconds"19
save20
advance 1.3s21
expect t lacks Stunned23
play G327 "With tenacity, bashes two seconds apart stun 1.3, 0.65 and a third of a second; the fourth is refused; 18 seconds after the third, a bash stuns 1.3 again"24
make h Hero25
make t Hero26
apply MercuryTreads to t27
apply Tenacious to t28
apply Diminishing to t29
act h Bash at t30
expect t remaining Stunned = 1.3s from G327: "tenacity, 1.3"31
advance 2s32
act h Bash at t33
expect t remaining Stunned = 0.65s from G327: "0.65 and"34
advance 2s35
act h Bash at t36
expect t remaining Stunned = 20t from content: G327 halves 0.65 to 0.325 s, written 0.33; the content's clock of 60 ticks a second rounds the 19.5 ticks up to 2037
save38
advance 2s39
act h Bash at t40
expect t lacks Stunned41
expect t has StunDR 3 from content: G327 halves each stun within its window but keeps no count of them; the content holds one StunDR stack for each of the three stuns, the refused fourth adding none42
advance 15.9s43
act h Bash at t44
expect t lacks Stunned45
advance 2.1s46
expect t lacks StunDR47
act h Bash at t48
expect t remaining Stunned = 1.3s from G327: "tenacity, 1.3"50
play G328 "Hibernating, an 8 second stun lasts 5"51
make h Hero52
apply StunCap to h53
apply Stunned to h for 8s54
expect h remaining Stunned = 5s from G328: "cut to 5 seconds"55
save56
apply Stunned to h for 3s57
expect h remaining Stunned = 3s from content: G328's cap leaves the 3 s stun whole, and the content's new stun replaces the 5 s left rather than keeping the longer59
play G329 "The frost prison holds a hero for two of its turns, and one in mercury treads for one, 1.3 rounded down"60
make h Hero61
make t Hero62
make u Hero63
apply MercuryTreads to u64
apply Tenacious to u65
act h Imprison at t66
expect t remaining FrostPrison = 2 turns from G329: "lasting two of the holder's turns"67
act h Imprison at u68
expect u remaining FrostPrison = 1 turn from G329: "so one turn"69
raise TurnEnded of t70
raise TurnEnded of u71
expect t remaining FrostPrison = 1 turn from G329: "lasting two of the holder's turns" - count "TurnEnded of t"72
expect u lacks FrostPrison73
save74
advance 60s75
expect t has FrostPrison76
raise TurnEnded of t77
expect t lacks FrostPrison79
play G330 "In ionian boots flash's 20 second cooldown is 16"80
make h Hero81
apply IonianBoots to h82
act h Flash83
expect h remaining Flash.cooldown = 16s from G330: "becomes 16 seconds"84
save85
advance 15.9s86
expect h cannot Flash OnCooldown87
advance 0.1s88
expect h can Flash90
play G331 "Hasted, a healing potion's own clock is 48 and the shared one 30: the mana potion waits for the 30, and the healing one for its 48 and then the mana potion's 30"91
make h Hero92
apply IonianBoots to h93
act h HealingPotion94
expect h remaining HealingPotion.cooldown = 48s from G331: "48 seconds and the shared"95
expect h remaining PotionShared = 30s from G331: "30 second clock"96
advance 10s97
act h ManaPotion98
expect refused Requirement "potions shared"99
advance 20s100
act h ManaPotion101
expect done102
save103
advance 18s104
expect h cannot HealingPotion Requirement105
advance 12s106
act h HealingPotion107
expect done109
play G332 "A bard's inspire lasts 15 seconds and its rally the plain 2 turns; a tactician's inspire the plain 10 seconds and its rally 3 turns"110
make bard Hero111
make tac Hero112
make a Hero113
make b Hero114
apply BardicLore to bard115
apply Tactics to tac116
act bard Inspire at a117
expect a remaining Inspired = 15s from G332: "15 seconds from a bard"118
act bard Rally at a119
expect a remaining Rallied = 2 turns from G332: "2 turn"120
act tac Inspire at b121
expect b remaining Inspired = 10s from G332: "10 second inspire"122
act tac Rally at b123
expect b remaining Rallied = 3 turns from G332: "lasts 3"124
save125
raise TurnEnded of b126
raise TurnEnded of b127
expect b has Rallied128
raise TurnEnded of b129
expect b lacks Rallied130
covers strain 19132
play G333 "Corruption ticks every 2 seconds, six times in 12; from a caster in bloodlust every 1.6, seven times, kept as cast when the bloodlust goes"133
make h Hero134
make t Hero135
make u Hero136
act h Corrupt at t137
advance 12s138
expect t.Health = 970 from G333: t.Health - "5 damage" * "for 12 seconds" / "every 2 seconds"139
apply Bloodlust to h140
act h Corrupt at u141
save142
advance 1.6s143
expect u.Health = 995 from G333: u.Health - "5 damage"144
remove Bloodlust from h145
advance 10.4s146
expect u.Health = 965 from content: G333 doesn't say whether a running damage over time keeps its pace when the haste goes; the content's keeps 1.6 s, seven ticks of 5 off its 1000148
play G334 "A 12 second wither refreshed with 2 left lasts 14, and refreshed again at once 15.6"149
make h Hero150
make t Hero151
act h Wither at t152
advance 10s153
act h Wither at t154
expect t remaining Withering = 14s from G334: "lasts 14 seconds"155
save156
act h Wither at t157
expect t remaining Withering = 15.6s from G334: "back (15.6 seconds)"159
play "A frost field slows a ghoul 3 off to half its pace: its 2 second burn ticks every 2 seconds of the world's, where one 10 off is burnt every second and done at 2; walked out of the field at 2 seconds, the slowed one's burn runs on at its own pace, its second tick and its end a second later"160
make a Team161
make b Team162
make p Hero with team = a at 0163
make g Ghoul with team = b at 3164
make far Ghoul with team = b at 10165
apply FrostField to p166
apply Scorched to g167
apply Scorched to far168
advance 1s169
expect far.Health = 90 from content: the play names no row; the content's burn takes 10 a second of the world's off its ghoul's 100, one tick by 1 s170
expect g.Health = 100 from content: the play names no row; the content's frost field halves the slowed ghoul's pace, so its burn's first 2 s tick hasn't come, keeping its 100171
advance 1s172
expect far.Health = 80 from content: the play names no row; the content's burn takes a second 10 at 2 s, two off its ghoul's 100, and is done173
expect far lacks Scorched174
expect g.Health = 90 from content: the play names no row; the slowed ghoul's first burn tick of 10 at 2 s of the world's, off its 100175
expect g has Scorched176
save177
place g 20178
advance 1s179
expect g.Health = 80 from content: the play names no row; out of the field the ghoul's burn runs at its own pace, its second 10 a second later onto 90, and ends180
expect g lacks ScorchedRun it yourself
ledger check content/cookbook/time.ledger content/cookbook/time.play
ledger play content/cookbook/time.play