Summit's gate pls help me (python)

Ok, I want to do this properly. 1: get good equipment. you really could do with some emabled dragon plate, you know. 2: summon troops. 3: target warlocks. 4. make sure that your path to the enemy is clear and 5: use flags. 6: use whatever special moves you have. Hope that helps and good luck :smile:!!

1 Like

Iā€™d say use flags is questionable I didnā€™t use any flags and I won

you mean this armor?codecombat equipment.PNG

good, but I prefer temple guard. Even though I found out the hard way that the power-up is useless.

No it is not it will blast back any type of unit

and makes you 5 times slower. Really, just donā€™t use the powerup. Although the knockback is huge.

But use it too attack you could kill 4 munchkins or 2 ogres per second

excuse me, I thought we were talking about the temple guard powerup. I use temple guard without the powerup.

Letā€™s go back on topic shall we

ok. Hint: Grim determination code super helps. Try it out.

donā€™t ask for @stefan_grecu and if you have not completed the level complete it please

what do you mean?

1 Like

If you have completed Grim Determination you should have the code, so you shouldnā€™t be asking for itā€™s code if you have completed it.

1 Like

Yes, if you didnā€™t complete a level and than you want to complete level which is after the level that you ddinā€™t complete, you should complete it. Because you didnā€™t learn many things from it.

1 Like

The level tells you how to command Paladins properly which is essential for Summits gate

1 Like

when i use the part from grim determination where the paladins heal each other it says that the paladin cant heal

show your new code. The healing stuff can be tricky.

def lowestHealthPaladin():
    lowestHealth = 99999
    lowestFriend = None
    friends = hero.findFriends()
    for friend in friends:
        if friend.type != "paladin":
            continue
        if friend.health < lowestHealth and friend.health < friend.maxHealth:
            lowestHealth = friend.health
            lowestFriend = friend

    return lowestFriend


def commandPaladin(paladin):
    if paladin.canCast("heal"):
        target = lowestHealthPaladin()
        if target:
            hero.command(paladin, "cast", "heal", target)
    elif (paladin.health < 200):
        hero.command(paladin, "shield")
    else:
        target = paladin.findNearestEnemy()
        if (target):
            hero.command(paladin, "attack", target)

while True:
    commandPaladin()
    paladins = []
    enemies = hero.findNearestEnemy()
    greenFlag = hero.findFlag("green")
    blackFlag = hero.findFlag("black")
    violetFlag = hero.findFlag("violet")
    if violetFlag:
        friends = hero.findFriends()
        if friends:
            for friend in friends:
                if friend:
                    hero.command(friend, "move", violetFlag.pos)
    if greenFlag:
        hero.pickUpFlag(greenFlag)
    if blackFlag:
        hero.pickUpFlag(blackFlag)
        hero.attackDamage
    if hero.canCast("invisibility", hero):
        hero.cast("invisibility", hero)
    friends = hero.findFriends()
    for enemy in hero.findEnemies():
        friends = hero.findFriends()
        for friend in friends:
            e = friend.findNearestEnemy()
            if e:
                hero.command(friend, "attack", e)
    fire = hero.findNearestEnemy()
    if fire:
        if enemy.type == "catapult":
            hero.backstab(enemy)
        while fire.health > 0:
            if hero.canCast("invisibility", hero):
                hero.cast("invisibility", hero)
            hero.attack(fire)
            hero.attack(enemy)
        if enemy.type == "skelleton":
            hero.attack(enemy)
    if hero.health < 3000:
        commandPaladin()

this is the new code

get rid of those quotes you donā€™t need them

do i also need to delete this hero.command(paladin, "shield")?