Ledger v3 · C# · Godot 4.7 Get started

Lob

A lobbed shell that bursts where it lands, never at a flyer

✓ 2 plays, 31 steps, all passingFrom TD, content\towers.ledger
flies ... up tolandswith PROPevent.PROPof projectileunless TAG

A lobbed shell that bursts where it lands, lifted from the tower-defense slice's content\towers.ledger (the cannon's Lob and its Shell). It is lobbed at a creep on the ground, never a flyer; the shell flies 6 a second and lands at its cap, the distance over its speed, so it lands even where its creep died in the air; landing, it bursts on every creep within the shell's Splash of where it came down, flyers too, for the damage it was lobbed with. The game flies it on the plane. In the slice the cannon lobs on its own by its priority (priority.ledger here); here it is ordered.

content/cookbook/mechanics/lob.ledgerthe content
1# A lobbed shell that bursts where it lands, lifted from the tower-defense slice's content\towers.ledger (the cannon's
2# Lob and its Shell). It is lobbed at a creep on the ground, never a flyer; the shell flies 6 a second and lands at
3# its cap, the distance over its speed, so it lands even where its creep died in the air; landing, it bursts on every
4# creep within the shell's Splash of where it came down, flyers too, for the damage it was lobbed with. The game flies
5# it on the plane. In the slice the cannon lobs on its own by its priority (priority.ledger here); here it is ordered.
6
7rate 60
8link team owner
9allegiance team
10stat MaxHealth
11stat Damage
12stat Reach
13stat Haste
14stat Splash
15pool Health max MaxHealth
16damage Health
17prop Payload
18tags Tower Creep Flying Physical
20ability Lob
21 target one enemy unless Flying within holder.Reach
22 cooldown 2s / holder.Haste
23 with Payload = holder.Damage
24 flies Shell up to 1s * distance(holder, target) / 6
25 lands
26 deal event.Payload Physical to all enemies within projectile.Splash of projectile
28archetype Shell
29 base Splash 1.2
31archetype Cannon
32 tags Tower
33 base Damage 10
34 base Reach 3.5
35 base Haste 1
36 grants Lob
38effect Flight
39 tags Flying
41archetype Side
43archetype Creep
44 tags Creep
45 base MaxHealth 30
46 full Health
48archetype Flyer
49 tags Creep
50 base MaxHealth 30
51 full Health
52 has Flight
content/cookbook/mechanics/lob.playwhat it must do
1catalog lob.ledger
2
3# The shell's numbers, from Lob and Shell: 10 a shell, landing 1 / 6 of a second for each unit of distance, bursting
4# within 1.2 of where it lands. A cannon of side a stands at 0; creeps of side b at 30 Health. The game flies the shell,
5# so the play places it where the game would have by its landing.
6
7play "lobbed at a creep 3 off: it lands half a second on and bursts on the creep and a flyer 0.5 beside it, 10 each; a creep 2 off the landing is missed"
8 make a Side
9 make b Side
10 make c Creep with team = b at 3
11 make f Flyer with team = b at 3.5
12 make off Creep with team = b at 1
13 make cn Cannon with team = a at 0
14 act cn Lob at c as shot projectile sh
15 expect done
16 place sh 3
17 advance 0.25s
18 expect c.Health = 30 from content: still flying: it lands 3 / 6 = 0.5 s on
19 save
20 advance 0.25s
21 expect sh gone
22 expect c.Health = 20 from content: 30 less the shell's 10 at its landing
23 expect f.Health = 20 from content: 0.5 from the landing, within 1.2: 30 less 10
24 expect off.Health = 30 from content: 2 from the landing, past 1.2
26play "a flyer can't be lobbed at; a shell whose creep died in the air still lands and bursts"
27 make a Side
28 make b Side
29 make c Creep with team = b at 3
30 make f Flyer with team = b at 2
31 make cn Cannon with team = a at 0
32 act cn Lob at f
33 expect refused BadTarget
34 act cn Lob at c as shot projectile sh
35 expect done
36 place sh 3
37 destroy c
38 advance 0.5s
39 expect sh gone
40 expect f.Health = 20 from content: 1 from where the shell came down at 3, within 1.2: 30 less 10

Run it yourself

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