How does Heal work?

Does heal have a limit as to how far it can be casted? Can I find out how much is being healed?

Both paladins and some heroes can heal, but I’ll assume you’re talking about paladins since you’ve just encountered the heal spell.

Paladins can heal for 150. They can heal every 5 seconds. I believe their max distance is 12 units. The paladin takes 0.5 seconds to shield, which interrupts any other activity such as attacking or shielding. Code for healing the hero (with one paladin) when at or below half health would be:

var paladin = hero.findByType("paladin", hero.findFriends())[0];
if(paladin && paladin.canCast("heal")) {
    if(hero.health <= hero.maxHealth / 2) {
        hero.command(paladin, "cast", "heal", hero);
    }
}

( using Javascript syntax, but I believe the only difference with Python would be removing the curly brackets, adding a colon at the end of lines ending with {, and replacing && with and )

1 Like

Thanks I didnt know the canCast method could of been used. Thanks for the responce.:smiley: