# Summits gate - please help!

**URL:** <https://discourse.codecombat.com/t/summits-gate-please-help/34349>\
**Category:** Level Help\
**Created:** [November 14, 2022, 6:13pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349 "2022-11-14T18:13:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ver12paz](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/ver12paz/32/32267_2.png) [@Ver12paz](https://discourse.codecombat.com/u/Ver12paz)\
**Post date:** [November 14, 2022, 6:13pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/1 "2022-11-14T18:13:05Z")

</div>

```python
# 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.

---

<div class="post-metadata">

**Author:** ![moonwatcher348](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/moonwatcher348/32/24126_2.png) [@moonwatcher348](https://discourse.codecombat.com/u/moonwatcher348)\
**Post date:** [November 14, 2022, 6:14pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/2 "2022-11-14T18:14:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JustALuke](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/justaluke/32/43608_2.png) [@JustALuke](https://discourse.codecombat.com/u/JustALuke)\
**Post date:** [November 14, 2022, 6:15pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/3 "2022-11-14T18:15:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ver12paz](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/ver12paz/32/32267_2.png) [@Ver12paz](https://discourse.codecombat.com/u/Ver12paz)\
**Post date:** [November 14, 2022, 6:16pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/4 "2022-11-14T18:16:16Z")

</div>

![Screenshot 2022-11-14 19.15.55](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/3X/9/9/994e50cc1961f2c46e8f93ac2a8a0de96df7ed45.jpeg)

---

<div class="post-metadata">

**Author:** ![moonwatcher348](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/moonwatcher348/32/24126_2.png) [@moonwatcher348](https://discourse.codecombat.com/u/moonwatcher348)\
**Post date:** [November 14, 2022, 6:25pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/5 "2022-11-14T18:25:15Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Ver12paz](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/ver12paz/32/32267_2.png) [@Ver12paz](https://discourse.codecombat.com/u/Ver12paz)\
**Post date:** [November 14, 2022, 6:29pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/6 "2022-11-14T18:29:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![moonwatcher348](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/moonwatcher348/32/24126_2.png) [@moonwatcher348](https://discourse.codecombat.com/u/moonwatcher348)\
**Post date:** [November 14, 2022, 6:37pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/8 "2022-11-14T18:37:08Z")

</div>

Why did you close the topic ;-;

---

<div class="post-metadata">

**Author:** ![Ver12paz](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/ver12paz/32/32267_2.png) [@Ver12paz](https://discourse.codecombat.com/u/Ver12paz)\
**Post date:** [November 14, 2022, 6:38pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/9 "2022-11-14T18:38:11Z")

</div>

Accidentaly 😅 I did not mean to press the button

---

<div class="post-metadata">

**Author:** ![moonwatcher348](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/moonwatcher348/32/24126_2.png) [@moonwatcher348](https://discourse.codecombat.com/u/moonwatcher348)\
**Post date:** [November 14, 2022, 6:38pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/10 "2022-11-14T18:38:16Z")

</div>

Also:  
 ![Screenshot 2022-11-14 19.37.54](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/3X/c/6/c66f1c20d15c9e307d777871e987f9bbbb45144b.png)  
…

---

<div class="post-metadata">

**Author:** ![moonwatcher348](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/moonwatcher348/32/24126_2.png) [@moonwatcher348](https://discourse.codecombat.com/u/moonwatcher348)\
**Post date:** [November 14, 2022, 6:38pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/11 "2022-11-14T18:38:30Z")

</div>

Ooooooof lol

---

<div class="post-metadata">

**Author:** ![moonwatcher348](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/moonwatcher348/32/24126_2.png) [@moonwatcher348](https://discourse.codecombat.com/u/moonwatcher348)\
**Post date:** [November 14, 2022, 6:39pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/12 "2022-11-14T18:39:15Z")

</div>

My whole gear:  
 ![Screenshot 2022-11-14 19.38.56](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/3X/d/f/dfb108636822ee7a0107e3390c490a2ddcb74d16.png)

---

<div class="post-metadata">

**Author:** ![Ver12paz](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/ver12paz/32/32267_2.png) [@Ver12paz](https://discourse.codecombat.com/u/Ver12paz)\
**Post date:** [November 14, 2022, 6:39pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/13 "2022-11-14T18:39:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![moonwatcher348](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/moonwatcher348/32/24126_2.png) [@moonwatcher348](https://discourse.codecombat.com/u/moonwatcher348)\
**Post date:** [November 14, 2022, 6:39pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/14 "2022-11-14T18:39:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JustALuke](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/justaluke/32/43608_2.png) [@JustALuke](https://discourse.codecombat.com/u/JustALuke)\
**Post date:** [November 14, 2022, 6:41pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/15 "2022-11-14T18:41:23Z")

</div>

Me neither. (20 chars)

---

<div class="post-metadata">

**Author:** ![Ver12paz](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/ver12paz/32/32267_2.png) [@Ver12paz](https://discourse.codecombat.com/u/Ver12paz)\
**Post date:** [November 14, 2022, 6:47pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/16 "2022-11-14T18:47:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ver12paz](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/ver12paz/32/32267_2.png) [@Ver12paz](https://discourse.codecombat.com/u/Ver12paz)\
**Post date:** [November 14, 2022, 6:50pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/17 "2022-11-14T18:50:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JustALuke](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/justaluke/32/43608_2.png) [@JustALuke](https://discourse.codecombat.com/u/JustALuke)\
**Post date:** [November 14, 2022, 7:25pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/18 "2022-11-14T19:25:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![riticmaster908](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/riticmaster908/32/43503_2.png) [@riticmaster908](https://discourse.codecombat.com/u/riticmaster908)\
**Post date:** [November 14, 2022, 9:51pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/19 "2022-11-14T21:51:53Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Learned](https://avatars.discourse-cdn.com/v4/letter/l/dec6dc/32.png) [@Learned](https://discourse.codecombat.com/u/Learned)\
**Post date:** [November 15, 2022, 8:17pm UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/20 "2022-11-15T20:17:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![escaper10101](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/escaper10101/32/31713_2.png) [@escaper10101](https://discourse.codecombat.com/u/escaper10101)\
**Post date:** [November 16, 2022, 9:37am UTC](https://discourse.codecombat.com/t/summits-gate-please-help/34349/21 "2022-11-16T09:37:14Z")

</div>

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😆)

[Next page](https://discourse.codecombat.com/t/summits-gate-please-help/34349.md?page=2)
