Bounty
A bounty paid to whoever owns the killer
after Diedevent.credit.ownergain ... onA bounty paid to whoever owns the killer, lifted from the tower-defense slice's content\td.ledger (Mortal and Bountied) and the archer's shot from content\towers.ledger. A creep killed pays its bounty to the owner of what killed it: a tower, or anything a tower made, since a kill is credited through what the hit came from.
1
# A bounty paid to whoever owns the killer, lifted from the tower-defense slice's content\td.ledger (Mortal and2
# Bountied) and the archer's shot from content\towers.ledger. A creep killed pays its bounty to the owner of what3
# killed it: a tower, or anything a tower made, since a kill is credited through what the hit came from.5
rate 606
link team owner7
allegiance team8
stat MaxHealth9
stat Bounty10
stat Damage11
pool Health max MaxHealth12
pool Gold whole13
damage Health14
tags Tower Creep Physical15
event Died17
effect Mortal18
dies at no Health raising Died20
effect Bountied21
after Died of holder22
gain Gold holder.Bounty on event.credit.owner24
ability Shoot25
target one enemy within 426
deal holder.Damage Physical to target28
archetype Archer29
tags Tower30
base Damage 631
grants Shoot33
archetype Side35
archetype Player36
pools Gold38
archetype Runner39
tags Creep40
base MaxHealth 1241
base Bounty 342
full Health43
has Mortal44
has Bountied1
catalog bounty.ledger3
# The bounty's numbers, from Bountied and the Runner: 12 Health, a bounty of 3. Two players of side a, each owning an4
# archer of 6 a shot.6
play "a runner killed by p's archer pays p its 3, and q nothing; a runner only hurt pays none"7
make a Side8
make b Side9
make p Player with team = a10
make q Player with team = a11
make ap Archer with team = a, owner = p at 012
make aq Archer with team = a, owner = q at 013
make r Runner with team = b at 214
make s Runner with team = b at 315
act aq Shoot at r16
expect done17
act ap Shoot at r18
expect done19
expect r gone20
expect p.Gold = 3 from content: the Runner's bounty 3, to the owner of the archer whose shot killed it21
expect q.Gold = 0 from content: its shot hurt and didn't kill22
save23
act ap Shoot at s24
expect done25
expect s alive26
expect p.Gold = 3 from content: no death, no bounty: still 3Run it yourself
ledger check content/cookbook/mechanics/bounty.ledger content/cookbook/mechanics/bounty.play
ledger play content/cookbook/mechanics/bounty.play