Summons
Summons as strong as their summoner, as many as it has room for
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.
1
# Summons as strong as their summoner, and as many as it has room for, lifted from the ARPG slice's2
# content\skeletons.ledger (RaiseSkeletons, Skeleton, the count and its bond), with the hero's room from3
# content\hero.ledger and a gift of power from the same skeletons file (Empowering). Each raise makes two on the4
# hero's side and owned by it; a skeleton's Health and Attack read its owner's MinionPower live; the hero counts its5
# skeletons, each death taking one off, and a raise past its room is refused in words. The game stands and steers them.7
rate 608
stat MaxHealth9
stat MaxMana10
stat Attack11
stat MinionPower12
stat MaxSkeletons13
pool Health max MaxHealth14
pool Mana max MaxMana15
damage Health16
link team owner17
allegiance team18
tags Unit Spell Summon Physical19
event Died21
effect Mortal22
dies at no Health raising Died24
effect SkeletonCount25
stack add27
effect SkeletonBond28
after Died of holder29
remove SkeletonCount 1 from holder.owner31
ability RaiseSkeletons32
tags Spell Summon33
target point within 1034
cost Mana 4035
cooldown 4s36
requires stacks(holder, SkeletonCount) + 2 <= holder.MaxSkeletons else "no room for two more skeletons"37
repeat 238
create Skeleton with team = holder.team, owner = holder39
apply SkeletonCount 241
archetype Skeleton42
tags Unit Summon43
base MaxHealth 30 + 3 * holder.owner.MinionPower44
base Attack holder.owner.MinionPower45
full Health46
has Mortal47
has SkeletonBond48
grants Slash50
ability Slash51
tags Physical52
target one enemy having Unit within 1.653
cooldown 0.8s54
deal holder.Attack Physical to target56
# a banner-bearer's gift: 10 more MinionPower57
effect Empowering58
MinionPower + 1060
archetype Side62
archetype Hero63
tags Unit64
base MaxHealth 30065
base MaxMana 20066
base MinionPower 1067
base MaxSkeletons 668
full Health Mana69
has Mortal70
grants RaiseSkeletons72
archetype Dummy73
tags Unit74
base MaxHealth 100075
full Health76
has Mortal1
catalog summons.ledger3
# The summons' numbers, from RaiseSkeletons and Skeleton: two a raise for 40 Mana, each 30 + 3 * MinionPower Health and4
# MinionPower Attack, six at most. A hero of side r at (0, 0) with MinionPower 10 raises at (5, 0).6
play "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 Side8
make h Hero with team = r at 0 09
act h RaiseSkeletons at 5 010
expect done11
expect count Skeleton = 2 from content: repeat 212
find s Skeleton13
expect s.team = r14
expect s.owner = h15
expect s.MaxHealth = 60 from content: 30 + 3 * the hero's MinionPower 1016
expect s.Health = 60 from content: full at its MaxHealth 6017
expect s.Attack = 10 from content: the hero's MinionPower 1018
expect h.Mana = 160 from content: 200 less 4019
expect h has SkeletonCount 2 from content: apply SkeletonCount 221
play "a skeleton strikes for its Attack; its death takes one from the hero's count"22
make r Side23
make b Side24
make h Hero with team = r at 0 025
make d Dummy with team = b at 6 026
act h RaiseSkeletons at 5 027
expect done28
find s Skeleton29
place s 5 030
act s Slash at d31
expect done32
expect d.Health = 990 from content: 1000 less the skeleton's Attack 1033
save34
deal 60 to s from d35
expect s gone36
expect h has SkeletonCount 1 from content: 2 less SkeletonBond's remove 138
play "three raises fill the room of six; a fourth is refused with its words"39
make r Side40
make h Hero with team = r at 0 041
act h RaiseSkeletons at 5 042
expect done43
advance 4s44
act h RaiseSkeletons at 5 045
expect done46
advance 4s47
act h RaiseSkeletons at 5 048
expect done49
advance 4s50
act h RaiseSkeletons at 5 051
expect refused Requirement "no room for two more skeletons"52
expect count Skeleton = 6 from content: three raises of 254
play "a skeleton follows its owner's power as it changes"55
make r Side56
make h Hero with team = r at 0 057
act h RaiseSkeletons at 5 058
expect done59
find s Skeleton60
apply Empowering to h61
expect s.Attack = 20 from content: the hero's MinionPower 10 and Empowering's 10, read live62
expect s.MaxHealth = 90 from content: 30 + 3 * 20Run it yourself
ledger check content/cookbook/mechanics/summons.ledger content/cookbook/mechanics/summons.play
ledger play content/cookbook/mechanics/summons.play