Grim determination help errors [SOLVED]

see [SOLVED] Grim Determination - paladin problem and especially
Your paladins are not healing, not moving, only attacking.
So you can restructure function commandPaladin(paladin).
Possible code:

    // your code
    if (enemy){
        if (paladin.canCast("heal") && healguy) {
            hero.command(paladin, "cast", "heal", healguy);
        }
        else if (paladin.health < (paladin.maxHealth * 0.25)) {
            hero.command(paladin, "move", {"x":66,"y":40});
        }
        else{   
            hero.command(paladin, "attack", enemy);
        }    
    }
1 Like