Medic
A healer that heals on its own, paying in energy for what landed
grants ... auto by nearestafter Heal by holder when event.landedA healer that heals on its own, paying in energy, lifted from the RTS slice's content\medic.ledger (Mend, Tending and the medic). It heals the nearest hurt living ally of flesh (Bio) within 4, 4 a quarter second, with no order: an auto, ranked by nearest. It pays a third of what landed in energy, so a heal that lands nothing costs nothing. The slice's medic regains energy; this one doesn't, so the price reads plainly.
1
# A healer that heals on its own, paying in energy, lifted from the RTS slice's content\medic.ledger (Mend, Tending and2
# the medic). It heals the nearest hurt living ally of flesh (Bio) within 4, 4 a quarter second, with no order: an3
# auto, ranked by nearest. It pays a third of what landed in energy, so a heal that lands nothing costs nothing. The4
# slice's medic regains energy; this one doesn't, so the price reads plainly.6
rate 207
stat MaxHealth8
stat MaxEnergy9
pool Health max MaxHealth10
pool Energy max MaxEnergy11
damage Health12
link team13
allegiance team14
tags Unit Bio Mech16
ability Mend17
target one ally having Bio within 418
requires target.Health < target.MaxHealth else "unhurt"19
requires holder.Energy >= 1 else "no energy"20
cooldown 0.25s21
heal 4 to target23
effect Tending24
after Heal by holder when event.landed > 025
lose Energy event.landed / 327
archetype Side29
archetype Medic30
tags Unit Bio31
base MaxHealth 6032
base MaxEnergy 10033
full Health Energy34
has Tending35
grants Mend auto by nearest37
archetype Rifle38
tags Unit Bio39
base MaxHealth 4540
full Health42
archetype Siege43
tags Unit Mech44
base MaxHealth 17545
full Health1
catalog medic.ledger3
# The medic's numbers, from Mend (4 a quarter second within 4) and Tending (a third of what landed, in energy); the4
# Medic's 100 Energy and the Rifle's 45 Health.6
play "the medic heals the nearest hurt ally of flesh on its own, paying a third of what landed; a mech, a far one, none"7
make s Side8
make m Medic with team = s at 0 09
make t Siege with team = s at 1 010
make r Rifle with team = s at 2 011
make f Rifle with team = s at 20 012
deal 15 to r13
deal 20 to t14
deal 15 to f15
advance 1.2s16
expect r.Health = 45 from content: 30 and four heals, 4, 4, 4 and 3, the last landing only what was missing17
expect t.Health = 155 from content: 175 less 20; a mech isn't healed18
expect f.Health = 30 from content: 20 away, past the 419
expect m.Energy = 95.000001 from content: 100 less a third of each heal that landed, 4, 4, 4 and 3; each third of 4 kept to the millionth, 1.333333, so 100 - 3 x 1.333333 - 120
save21
advance 10s22
expect m.Energy = 95.000001 from content: nothing hurt within reach, nothing healed, nothing paidWhat a change to Health meets
Every rule in this recipe a change to Health passes through, in order. Each line is a link to the rule.
Health: a change to it meets 1 rule, in this order after it lands Tending: Heal by holder when event.landed > 0 (content/cookbook/mechanics/medic.ledger:24) hears what landed; held by Medic no archetype lacks a layer its like hold
Run it yourself
ledger check content/cookbook/mechanics/medic.ledger content/cookbook/mechanics/medic.play
ledger play content/cookbook/mechanics/medic.play
ledger pipeline content/cookbook/mechanics/medic.ledger Health