Kelvintaph Defiler help!

so right now i’m stuck at Kelvintaph Defiler, when i command my 2 soldiers to attack the necromancer, they go to his position to attack him, but by that time my paladin is already killed.
here is my code

// The ogres are trapping you with their dark rituals!
// Your hero can't do anything besides command and move without angering the warlocks.
// Beware ice, robots, traps, antigravity fields, and other dark magic.
// Somehow, you'll need to defeat Nalfar and save your paladin.
// The great treasure of Kelvintaph awaits your victory.
var safe = false;
while (true) {
    var killedshaman = hero.findFlag("green");
    if (!safe) {
        hero.move({
            x: 35,
            y: 9
        });
    }
    var allymove = hero.findFlag("black");
    var remove = hero.findFlag("violet");
    if (remove) {
        hero.removeFlag(remove);
        safe = true;
        hero.removeFlag(allymove);
    }
    var paladin = hero.findByType("paladin", hero.findFriends())[0];
    hero.command(paladin, "cast", "heal", paladin);
    var friends = hero.findFriends();
    for (var i = 0; i < friends.length; i++) {
        var friend = friends[i];
        var enemy = "Gror";
        if (hero.time > 1.65 + i * 0.525) {
            if (!killedshaman) {
                if (friend.type != "paladin") {
                    hero.command(friend, "attack", enemy);
                } else {
                    hero.command(friend, "shield");
                }
            } else {
                enemy = "Nalfar";
                if (enemy) {
                    if (friend.type != "paladin") {
                        hero.command(friend, "attack", enemy);
                    } else {
                        hero.command(friend, "shield");
                    }
                }
            }
        }
        if (allymove&&friend.type!="paladin") {
            hero.command(friend, "move", allymove.pos);
        }
    }
}

any suggestions guys??

1 Like

you need an archer to go and kill him too. the soldiers won’t do enough damage.

thanks, i finished it already, the archer was the key part to kill him, but she needed some soldiers to help her

1 Like

the problem was that the paladin wasn’t healing, so i fixed it and it worked

1 Like

Congrats! enjoy your Boss Star IV

1 Like

yeah it is amazing, i already finished the golden choice level, so i finished all of the free levels

1 Like

it only took me 9 days to finish all the free levels, so i think i may buy a subscription.

4 Likes