Ledger v3 · C# · Godot 4.7 Get started

Summons

Summons as strong as their summoner, as many as it has room for

✓ 4 plays, 50 steps, all passingFrom ARPG, content\skeletons.ledger
create ... with team, ownerrepeatholder.owner.STATrequires stacks(...)

Summons as strong as their summoner, and as many as it has room for, lifted from the ARPG slice's content\skeletons.ledger (RaiseSkeletons, Skeleton, the count and its bond), with the hero's room from content\hero.ledger and a gift of power from the same skeletons file (Empowering). Each raise makes two on the hero's side and owned by it; a skeleton's Health and Attack read its owner's MinionPower live; the hero counts its skeletons, each death taking one off, and a raise past its room is refused in words. The game stands and steers them.

content/cookbook/mechanics/summons.ledgerthe content
1# Summons as strong as their summoner, and as many as it has room for, lifted from the ARPG slice's
2# content\skeletons.ledger (RaiseSkeletons, Skeleton, the count and its bond), with the hero's room from
3# content\hero.ledger and a gift of power from the same skeletons file (Empowering). Each raise makes two on the
4# hero's side and owned by it; a skeleton's Health and Attack read its owner's MinionPower live; the hero counts its
5# skeletons, each death taking one off, and a raise past its room is refused in words. The game stands and steers them.
6
7rate 60
8stat MaxHealth
9stat MaxMana
10stat Attack
11stat MinionPower
12stat MaxSkeletons
13pool Health max MaxHealth
14pool Mana max MaxMana
15damage Health
16link team owner
17allegiance team
18tags Unit Spell Summon Physical
19event Died
21effect Mortal
22 dies at no Health raising Died
24effect SkeletonCount
25 stack add
27effect SkeletonBond
28 after Died of holder
29 remove SkeletonCount 1 from holder.owner
31ability RaiseSkeletons
32 tags Spell Summon
33 target point within 10
34 cost Mana 40
35 cooldown 4s
36 requires stacks(holder, SkeletonCount) + 2 <= holder.MaxSkeletons else "no room for two more skeletons"
37 repeat 2
38 create Skeleton with team = holder.team, owner = holder
39 apply SkeletonCount 2
41archetype Skeleton
42 tags Unit Summon
43 base MaxHealth 30 + 3 * holder.owner.MinionPower
44 base Attack holder.owner.MinionPower
45 full Health
46 has Mortal
47 has SkeletonBond
48 grants Slash
50ability Slash
51 tags Physical
52 target one enemy having Unit within 1.6
53 cooldown 0.8s
54 deal holder.Attack Physical to target
56# a banner-bearer's gift: 10 more MinionPower
57effect Empowering
58 MinionPower + 10
60archetype Side
62archetype Hero
63 tags Unit
64 base MaxHealth 300
65 base MaxMana 200
66 base MinionPower 10
67 base MaxSkeletons 6
68 full Health Mana
69 has Mortal
70 grants RaiseSkeletons
72archetype Dummy
73 tags Unit
74 base MaxHealth 1000
75 full Health
76 has Mortal
content/cookbook/mechanics/summons.playwhat it must do
1catalog summons.ledger
2
3# The summons' numbers, from RaiseSkeletons and Skeleton: two a raise for 40 Mana, each 30 + 3 * MinionPower Health and
4# MinionPower Attack, six at most. A hero of side r at (0, 0) with MinionPower 10 raises at (5, 0).
5
6play "two skeletons, each 60 Health and 10 Attack, on the hero's side and owned by it; 40 Mana; the hero counts 2"
7 make r Side
8 make h Hero with team = r at 0 0
9 act h RaiseSkeletons at 5 0
10 expect done
11 expect count Skeleton = 2 from content: repeat 2
12 find s Skeleton
13 expect s.team = r
14 expect s.owner = h
15 expect s.MaxHealth = 60 from content: 30 + 3 * the hero's MinionPower 10
16 expect s.Health = 60 from content: full at its MaxHealth 60
17 expect s.Attack = 10 from content: the hero's MinionPower 10
18 expect h.Mana = 160 from content: 200 less 40
19 expect h has SkeletonCount 2 from content: apply SkeletonCount 2
21play "a skeleton strikes for its Attack; its death takes one from the hero's count"
22 make r Side
23 make b Side
24 make h Hero with team = r at 0 0
25 make d Dummy with team = b at 6 0
26 act h RaiseSkeletons at 5 0
27 expect done
28 find s Skeleton
29 place s 5 0
30 act s Slash at d
31 expect done
32 expect d.Health = 990 from content: 1000 less the skeleton's Attack 10
33 save
34 deal 60 to s from d
35 expect s gone
36 expect h has SkeletonCount 1 from content: 2 less SkeletonBond's remove 1
38play "three raises fill the room of six; a fourth is refused with its words"
39 make r Side
40 make h Hero with team = r at 0 0
41 act h RaiseSkeletons at 5 0
42 expect done
43 advance 4s
44 act h RaiseSkeletons at 5 0
45 expect done
46 advance 4s
47 act h RaiseSkeletons at 5 0
48 expect done
49 advance 4s
50 act h RaiseSkeletons at 5 0
51 expect refused Requirement "no room for two more skeletons"
52 expect count Skeleton = 6 from content: three raises of 2
54play "a skeleton follows its owner's power as it changes"
55 make r Side
56 make h Hero with team = r at 0 0
57 act h RaiseSkeletons at 5 0
58 expect done
59 find s Skeleton
60 apply Empowering to h
61 expect s.Attack = 20 from content: the hero's MinionPower 10 and Empowering's 10, read live
62 expect s.MaxHealth = 90 from content: 30 + 3 * 20

Run it yourself

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