Summits gate - please help!

# Fight your way into the Inner Sanctum of the ogre chieftain, and defeat her.
def attack():
    enemy = hero.findNearestEnemy()
    if enemy and enemy.type != "skeleton":
        if hero.distanceTo(enemy) <= 20:
            while enemy.health > 0:
                if hero.isReady("backstab"):
                    hero.backstab(enemy)
                    if hero.isReady("chain-lightning"):
                        hero.cast("chain-lightning", enemy)
                if hero.isReady("scattershot"):
                    hero.scattershot()
                else:
                    hero.attack(enemy)

def move():
    flagG = hero.findFlag("green")
    if flagG:
        hero.pickUpFlag(flagG)

def summon():
    if hero.costOf("griffin-rider") <= hero.gold:
        hero.summon("griffin-rider")
    if hero.costOf("griffin-rider") <= hero.gold:
        hero.summon("griffin-rider")
    if hero.costOf("archer") <= hero.gold:
        hero.summon("archer")
    if hero.costOf("soldier") <= hero.gold:
        hero.summon("soldier")

def heal():
    paladins = hero.findByType("paladin")
    paladinIndex = 0
    if paladins:
        while paladinIndex < len(paladins):
            paladin = paladins[paladinIndex]
            currentHealth = hero.health
            healingThreshold = hero.maxHealth - 150
            paladins = hero.findByType("paladin")
            if paladin:
                if paladin.canCast("heal"):
                    hero.command(paladin, "cast", "heal", hero)
            paladinIndex += 1

def command():
    friends = hero.findFriends()
    friendIndex = 0
    while friendIndex < len(friends):
        friend = friends[friendIndex]
        enemy = friend.findNearestEnemy()
        if enemy:
            if friend:
                hero.command(friend, "attack", enemy)
        friendIndex += 1

def attack2():
    enemies = hero.findEnemies()
    enemyIndex = 0
    while enemyIndex < len(enemies):
        enemy = enemies[enemyIndex]
        summon()
        command()
        attack()
        enemyIndex += 1

while True:
    if hero.maxHealth > hero.currentHealth:
        heal()
    move()
    summon()
    command()
    attack()

Here is my code… I have no idea what is wrong, but I always die when I have to go to fight the ogre chieftain.

There is nothing wrong with most summit gate code, just the equipment is too weak, could you please show your gear?

You should also command your friends to follow you when there are no enemies, so they move to the next stage as well.

2 Likes

Should be good gear, but you should use boomballs and not dragon tooth since you have no invis, and also, change ring of flowers to something actually useful, and ring of undying can’t be used on heroes, so pretty useless here, maybe use the ring with “consecrate” instead?

1 Like

I wish… But it locked all my rings apart from these two for this level

1 Like

Why did you close the topic ;-;

Accidentaly :sweat_smile: I did not mean to press the button

Also:
Screenshot 2022-11-14 19.37.54

Ooooooof lol

My whole gear:
Screenshot 2022-11-14 19.38.56

1 Like

All for apart but the “glasses” got locked for me on this level

interesting, I have nothing locked ;-; NOTHING :|

1 Like

Me neither. (20 chars)

I tried to do it as a warrior but I never even went past the two towers

I think it gets locked because I didn’t buy any of it… So it is locked for me…

1 Like

With what gear you have, i would avoid destroying the door to the chieftain until you have killed both warlocks, and when you open the door, you should target the witch first.

2 Likes

yea, as @RangerGrant9307 said in another topic, and from what I know from levels (COUGH COUGH kelvintaph burglar or kelvintaph crusader) if you try to kill the cheiftain first, its rlly haard unless u can 1 shot (not recomended to backstab unless u have invis) (if affordable, use naria as her hide abbility and her envenom abbility is useful for some xtra dmg)

2 Likes

I would recommend having the allies you are given at the start of the level do all the work and have your hero keep their distance from the ogres. You would have to make your code for your allies more complex, but it would save you the trouble of buying equipment for that particular level.

Personally I used a wizard(Usara) and saved all my troops for that chieftain. I actually think wizard is VERY convenient for this level as some of their missles can penetrate walls. I used the combo vine staff + twilight glasses to attack those beam towers and warlocks from behind the walls. So I basically recommend using wizards not rangers or warriors. (I tried rangers and warriors but all die fast😆)

1 Like