Summit's Gate strategy help

can anyone suggest me working summit’s gate level strategy

here my current code

auto weakest(){
    auto minHealth = 9999;
    auto lowest = null;
    auto friends = hero.findFriends();
    for(int i = 0; i < friends.length; i ++){
        auto friend = friends[i];
        if(friend.type == paladin){
            if(friend.health < friend.maxHealth * 0.5){
                minHealth = friend.health;
                lowest = friend;
            }
        }
    }
    if(hero.health < hero.maxHealth * 0.5){
        lowest = hero;
    }
    return lowest;
}

auto summon(){
    if(hero.gold >= hero.costOf("griffin-rider")){
        hero.summon("griffin-rider");
    }
}

auto griffin(auto friend){
    auto enemy = friend.findNearestEnemy();
    if(enemy){
        hero.command(friend, "attack", enemy);
    }else{
        hero.command(friend, "defend", hero);
    }
}

auto paladin(auto friend){
    auto target = null;
    if(friend.canCast("heal")){
        auto low = weakest();
        if(low){
            hero.command(friend, "cast", "heal", low);
        }else if(friend.health < friend.maxHealth * 0.4){
            hero.command(friend, "shield");
        }else{
            auto enemy = friend.findNearestEnemy();
            if(enemy && enemy.type == "fangrider"){
                target = enemy;
                if(enemy.health <= 0){
                    target = friend.findNearestEnemy();
                }
            }
            if(target){
                hero.command(friend, "attack", enemy);
            }else{
                hero.command(friend, "move", hero.pos);
            }
        }
    }
}

auto archer(auto friend){
    auto enemy = friend.findNearestEnemy();
    if(enemy){
        hero.command(friend, "attack", enemy);
    }
}

auto soldier(auto friend){
    auto enemy = friend.findNearestEnemy();
    if(enemy){
        hero.command(friend, "attack", enemy);
    }
}

auto moveForward(){
    auto targetPos = {290, 34};
    hero.move(targetPos);
}

auto pickTarget(){
    auto enemies = hero.findEnemies();
    auto target = null;
    auto minDist = 300;
    for(int i = 0; i < enemies.length; i++){
        auto enemy = enemies[i];
        if(enemy.type != "door"){
           if(enemy.type == "catapult"){
               target = enemy;
               break;
           } else if(enemy.type == "warlock"){
               target = enemy;
               break;
           } else if(enemy.type == "witch"){
               target = enemy;
               break;
           } else if(enemy.type == "chieftain"){
               target = enemy;
               break;
           } else {
               if(hero.distanceTo(enemy) < minDist) {
                   minDist = hero.distanceTo(enemy);
                   target = enemy;
               }
           }
        }
    }
    if(target){
        return target;
    }
}

auto attack(auto enemy){
    if(enemy){
        if(hero.isReady("jump")){
            hero.jumpTo(enemy.pos);
        }else if(hero.isReady("bash")){
            hero.bash(enemy);
        }else if(hero.isReady("cleave")){
            hero.cleave(enemy);
        }else{
            hero.attack(enemy);
            moveForward();
        }
    }
}

auto commandTroops(){
    auto friends = hero.findFriends();
    for(int i = 0; i < friends.length; i ++){
        auto friend = friends[i];
        if(friend.type == "soldier"){
            soldier(friend);
        }else if(friend.type == "archer"){
            archer(friend);
        }else if(friend.type == "griffin-rider"){
            griffin(friend);
        }else if(friend.type == "paladin"){
            paladin(friend);
        }
    }
}

auto hero_attack(){
    auto target = pickTarget();
    auto friends = hero.findFriends();
    if(target){
        attack(target);
    }else{
        moveForward();
    }
}

auto main(){
    while(true) {
        summon();
        commandTroops();
        hero_attack();
    }
    return 0;
}

the hero just stuck to the walls and the troops get killed by the tower beam

Can you please post your hero and equipment? Also, is this in JS?

here is a hint i did not use any units exept paladins to heal

It’s c++, notice the auto

what do you mean? you use only paladin. How you get through the armies? can you explain the strategy thanks

equipment: full dragon armor set, cleave sword, the chain lighting gloves, and the diamond looking shield.

i also have other sword like the black sword

OK, but I will need the screenshot of the game before you load the level because I don’t know what the items are called.

basically best glove, best armor, and best shield, plus the basic cleave sword with 27 attack

yeah (20 characters)

ANYONE HELPpppppppPPP?

i can’t solved it for almost a month now.

I can give some tips based on how I passed the level. For the first part of the level, I would recommend using soldiers to attack the catapults and leaving your key units where they start. After you get past the first gate, you should use your paladins to attack the beam towers and leave your weaker units in the starting area. Once you get past the second gate, I would recommend using your paladins and hero to attack the warlocks while using your other units to attack the skeletons. I do not want to give too many tips, so I will let you figure out the part after the last gate.

Hi! I understand your pain. I tried to solve it for several month in my days)
I’d reccomend you to use search through forum - there are several global topics about this level with hints, ideas and strategies. It helped me to complete level with my own code.