Ledger v3 · C# · Godot 4.7 Get started

Poison

A poison that stacks by its source and passes on at a death

✓ 2 plays, 33 steps, all passingFrom TD, content\towers.ledger
stack add max N per source then refreshvarafter Died of holderup to 1 others ... nearest

A 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).

content/cookbook/mechanics/poison.ledgerthe content
1# A poison that stacks by its source and passes on at a death, lifted from the tower-defense slice's
2# content\towers.ledger (Spit, Poisoned and the poison tower), with death from content\td.ledger (Mortal). A dose does
3# 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 the
5# nearest other creep within 1.5. In the slice the tower spits on its own by its priority (priority.ledger here).
6
7rate 60
8link team owner
9allegiance team
10stat MaxHealth
11stat Venom
12stat Reach
13stat Haste
14pool Health max MaxHealth
15damage Health
16tags Tower Creep Poison
17event Died
19effect Mortal
20 dies at no Health raising Died
22ability Spit
23 target one enemy within holder.Reach
24 cooldown 1s / holder.Haste
25 apply Poisoned to target with dose = holder.Venom
27effect Poisoned
28 tags Poison
29 stack add max 4 per source then refresh
30 lasts 4s
31 var dose = 2
32 every 1s
33 deal self.dose * self.stacks Poison to holder
34 after Died of holder
35 apply Poisoned to up to 1 others having Creep within 1.5 of holder nearest from source with dose = self.dose
37archetype PoisonTower
38 tags Tower
39 base Venom 2
40 base Reach 3.5
41 base Haste 1
42 grants Spit
44archetype Side
46archetype Creep
47 tags Creep
48 base MaxHealth 90
49 full Health
50 has Mortal
content/cookbook/mechanics/poison.playwhat it must do
1catalog poison.ledger
2
3# 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 at
4# most. Two poison towers of side a; creeps of side b at 90 Health.
5
6play "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 Side
8 make b Side
9 make va PoisonTower with team = a at 20
10 make vb PoisonTower with team = a at 30
11 make c Creep with team = b at 10
12 apply Poisoned to c from va
13 advance 1.1s
14 expect c.Health = 88 from content: one beat of 2 at 1 s: 90 - 2
15 apply Poisoned 3 to c from va
16 expect c has Poisoned 4 from content: four doses from va
17 apply Poisoned to c from va
18 expect c has Poisoned 4 from content: four at most from one tower, the fifth refreshing them
19 save
20 advance 1s
21 expect c.Health = 80 from content: the beat at 2 s, 2 x 4: 88 - 8
22 apply Poisoned to c from vb
23 expect c has Poisoned 5 from content: vb's dose apart from va's four
25play "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 Side
27 make b Side
28 make v PoisonTower with team = a at 0
29 make c Creep with team = b at 2
30 make near Creep with team = b at 3
31 make next Creep with team = b at 3.4
32 act v Spit at c
33 expect done
34 expect c has Poisoned 1 from v from content: one dose, the tower's
35 deal 89 to c
36 advance 1s
37 expect c gone
38 expect near has Poisoned 1 from v from content: one dose passed on, still the tower's
39 expect next lacks Poisoned
40 advance 1s
41 expect near.Health = 88 from content: the passed dose's 2 at its first beat: 90 - 2

Run it yourself

ledger check content/cookbook/mechanics/poison.ledger content/cookbook/mechanics/poison.play
ledger play content/cookbook/mechanics/poison.play