it's not crazy talk
It's a knowledge of the mechanics.
The "you can't heal me" debuff lasts 8 seconds. Monks have a 5 second cooldown on their heals. When a Monk's heal cooldown drops, it does an iteration of all the units in range, starting with the demigods and then doing themselves and then doing the rest of the units around them starting with whatever is closest (this tends to be the other monk).
The second it finds a unit that would not be "overhealed" (basically at a % HP where the healing will be wasted because it's super-close to 100%), then it performs the heal on the unit, attaches a debuffed to the healed unit and puts the heal onto cooldown.
Let's say that you have 2 monks, and you're against a Level 1 TB with Rain of Ice. TB does RoI on you and your monks. You'll usually instantly be healed at this point assuming you haven't taken any damage. This attaches the 8 second debuff to you. Then, one monk will heal themselves. 5 seconds pass (heal cooldown).
The monk that didn't heal himself will heal himself (doesn't have the 8 second debuff). The last monk will look around for units to heal. If it can find a minotaur to heal, it will. Otherwise it'll just idle for 5 seconds and do nothing (yes, put on cooldown again). Then 3 seconds pass and your debuff expires. However, both monks are on cooldown for another 2 seconds.
The only way to actually get monks to heal you every 8 seconds is if they are staggered from when they were summoned (eg, you lose just one monk and resummon just that monk and it pulses at a different frequency than your other monk).
Code as follows:
###############################################################
# Ability - Heal
# After healing someone, this spell applies a debuff to them
# which prevents them from being healed. Debuff - "HighPriest01HealCooldown01"
###############################################################
AbilityBlueprint {
Name = 'HighPriest01Heal01',
DisplayName = 'Heal',
AbilityType = 'Aura',
TargetAlliance = 'Ally',
TargetCategory = 'MOBILE - UNTARGETABLE',
AffectRadius = 10,
AuraPulseTime = 5, # This is the "cooldown" of the ability to cast the heal spell
OnAreaAbility = function(self, unit, params)
local heal = false
local priestBuff = 'HighPriest01Heal01'
# ==== Try to heal a hero first ==== #
# Hero units in range
local heroes = EntityCategoryFilterDown(categories.HERO, params.Targets)
#If we can heal a hero unit and we didn't heal him last, heal him.
#If the hero is the only thing we can heal in the area, heal him.
if table.getn(heroes) > 0 then
for k, hero in heroes do
# Unit has the cooldown buff
if Buff.HasBuff(hero, 'HighPriest01HealCooldown01') then
continue
end
# Do not heal heroes flagged not to be healed
if hero.PriestsDoNotHeal then
continue
end
# Do not heal heroes that are near full health
local hpercent = hero:GetHealth() / hero:GetMaxHealth()
if hpercent >= 1.0 then
continue
end
heal = hero
#Check to see if the priest is affected by Healing Wind II
if Buff.HasBuff(unit, 'HSednaHealingWindPriest02') then
priestBuff = 'HighPriest01HeroHealHealingWindBuffl01'
else
priestBuff = 'HighPriest01HeroHeal01'
end
break
end
end
# ==== Heal other units ==== #
# No heroes found; grab nearby units based on priorities and try to heal em
if not heal then
#Non-hero units that can be healed.
for k, target in params.Targets do
# Don't heal heroes in this body section
if EntityCategoryContains( categories.HERO, target ) then
continue
end
# Don't heal units with 50% or more health
local hlthpct = target:GetHealth() / target:GetMaxHealth()
if hlthpct >= 1.0 then
continue
end
# Unit has the cooldown buff
if Buff.HasBuff(target, 'HighPriest01HealCooldown01') then
continue
end
heal = target
# Priest is affected by Healing Wind II, use the more powerful heal.
if Buff.HasBuff(unit, 'HSednaHealingWindPriest02') then
priestBuff = 'HighPriest01HealHealingWindBuff01'
end
break
end
end
# ==== Healing here ==== #
# Hey we found someone to heal; apply both the heal and cooldown buffs and make pretty effects
if heal then
if unit.Character.IsMoving then
unit.Character:PlayAction("HealMove")
else
unit.Character:PlayAction("Heal")
end
#LOG("*DEBUG: Healing: "..heal:GetUnitId().." with: "..priestBuff)
Buff.ApplyBuff(heal, priestBuff, unit)
Buff.ApplyBuff(heal, 'HighPriest01HealCooldown01', unit)
# Create Priest heal casting effects
AttachCharacterEffectsAtBone( unit, 'priest', 'CastHeal01', -1 )
# Create Heal effect on actor being healed
AttachBuffEffectAtBone( heal, 'Heal01', 0, heal.Trash );
return
end
end,
}