Poison
A poison that stacks by its source and passes on at a death
stack add max N per source then refreshvarafter Died of holderup to 1 others ... nearestA poison that stacks by its source and passes on at a death, lifted from the tower-defense slice's content\towers.ledger (Spit, Poisoned and the poison tower), with death from content\td.ledger (Mortal). A dose does its strength a second for 4 seconds, through armour; one tower's doses stack to four and a dose more refreshes them, and each tower's are apart. A creep that dies poisoned passes one dose, as strong and still the tower's, to the nearest other creep within 1.5. In the slice the tower spits on its own by its priority (priority.ledger here).
1
# A poison that stacks by its source and passes on at a death, lifted from the tower-defense slice's2
# content\towers.ledger (Spit, Poisoned and the poison tower), with death from content\td.ledger (Mortal). A dose does3
# its strength a second for 4 seconds, through armour; one tower's doses stack to four and a dose more refreshes them,4
# and each tower's are apart. A creep that dies poisoned passes one dose, as strong and still the tower's, to the5
# nearest other creep within 1.5. In the slice the tower spits on its own by its priority (priority.ledger here).7
rate 608
link team owner9
allegiance team10
stat MaxHealth11
stat Venom12
stat Reach13
stat Haste14
pool Health max MaxHealth15
damage Health16
tags Tower Creep Poison17
event Died19
effect Mortal20
dies at no Health raising Died22
ability Spit23
target one enemy within holder.Reach24
cooldown 1s / holder.Haste25
apply Poisoned to target with dose = holder.Venom27
effect Poisoned28
tags Poison29
stack add max 4 per source then refresh30
lasts 4s31
var dose = 232
every 1s33
deal self.dose * self.stacks Poison to holder34
after Died of holder35
apply Poisoned to up to 1 others having Creep within 1.5 of holder nearest from source with dose = self.dose37
archetype PoisonTower38
tags Tower39
base Venom 240
base Reach 3.541
base Haste 142
grants Spit44
archetype Side46
archetype Creep47
tags Creep48
base MaxHealth 9049
full Health50
has Mortal1
catalog poison.ledger3
# The poison's numbers, from Poisoned and Spit: a dose of the tower's Venom 2 a second for 4 s, four from one tower at4
# most. Two poison towers of side a; creeps of side b at 90 Health.6
play "one dose does 2 a second; four from one tower do 8, a fifth adds none; another tower's dose is apart"7
make a Side8
make b Side9
make va PoisonTower with team = a at 2010
make vb PoisonTower with team = a at 3011
make c Creep with team = b at 1012
apply Poisoned to c from va13
advance 1.1s14
expect c.Health = 88 from content: one beat of 2 at 1 s: 90 - 215
apply Poisoned 3 to c from va16
expect c has Poisoned 4 from content: four doses from va17
apply Poisoned to c from va18
expect c has Poisoned 4 from content: four at most from one tower, the fifth refreshing them19
save20
advance 1s21
expect c.Health = 80 from content: the beat at 2 s, 2 x 4: 88 - 822
apply Poisoned to c from vb23
expect c has Poisoned 5 from content: vb's dose apart from va's four25
play "spat: a dose of the tower's Venom; a creep dying poisoned passes one dose to the nearest creep within 1.5, not to one further"26
make a Side27
make b Side28
make v PoisonTower with team = a at 029
make c Creep with team = b at 230
make near Creep with team = b at 331
make next Creep with team = b at 3.432
act v Spit at c33
expect done34
expect c has Poisoned 1 from v from content: one dose, the tower's35
deal 89 to c36
advance 1s37
expect c gone38
expect near has Poisoned 1 from v from content: one dose passed on, still the tower's39
expect next lacks Poisoned40
advance 1s41
expect near.Health = 88 from content: the passed dose's 2 at its first beat: 90 - 2Run it yourself
ledger check content/cookbook/mechanics/poison.ledger content/cookbook/mechanics/poison.play
ledger play content/cookbook/mechanics/poison.play