Kithagard brawl level 3

Hi i am having trouble in the third level.
I always end up getting killed after 38 seconds.
Is the problem with my code or my equipment(armour)?
I am having worn dragonplate helmet and armour.

while True:
    enemy = hero.findNearestEnemy()
    item = hero.findNearestItem()
    if enemy:
        ready = hero.isReady("cleave")
        if ready:
            hero.cleave(enemy)
        else:
            hero.attack(enemy)
            hero.attack(enemy)
    if item:
        hero.moveXY(item.pos.x, item.pos.y)

what is your hero example = Alejandro the Duelist

what is your weapon

you only need hero.attack(enemy) once.

It’s infinite level. No guarantee, that you will win.
Buy better equipment. Try another tactics.
My best tactic is to use fire-traps and shield(2-4 times) after I build it.
Also you need boss star 4 to summon paladins which will heal you.

You can find my code on github. Can’t publish solution here.

Hero: Alejandro the Duelist
Weapon: Long Sword

The builders hammer is restricted in this level and I currently dont have the ability to summon paladins.
I am only level 24.

Only hammers that can build fence restricted(to easy to win, just building fences around). There are number of allowed hammers

Ok. For this moment.
You can use shield bash ability.
Also you can try to use cleave only if there is more than 5 enemies close to you.

while True:
    enemy = hero.findNearestEnemy()
    item = hero.findNearestItem()
    if item is not None:
        hero.moveXY(item.pos.x, item.pos.y)
    if enemy is not None:
        dist = hero.distanceTo(enemy)
        if (enemy.type == 'thrower'):
            hero.attack(enemy)
            hero.attack(enemy)
        elif (hero.isReady("power-up") and (enemy.type == "burl" or enemy.type == "ogre")):
            hero.powerUp()
        else:
            if (dist < 15):
                if (hero.isReady("cleave") and dist < 15):
                    hero.cleave(enemy)
                elif (hero.isReady("bash") and dist < 15):
                    hero.bash(enemy)
                elif (hero.isReady("power-up")):
                    hero.powerUp()
                elif (dist > 10):
                    hero.attack(enemy)
                    hero.attack(enemy)
                else:
                    hero.shield()
            else:
                hero.shield()

ok then its your code
(not trying to be mean)
and a tip use more hero.shield in this case

nevermind
:grinning: this post