Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

[HELP] Summits gate

Which part did you get to?

1 Like

The level is hard. My strategy was to make the troops defend at my pos.

1 Like

This level is hard I have not passed it myself but I got to the warlocks.

1 Like

just go to github and look for answers, then use pro skill flag placing.

1 Like

Don’t always use answers. Try using your own code.

Here’s a hint for people that are stuck at the warlock part:

Set a flag function and move your hero over to the warlock’s pos and redefine nearest enemy. That’ll allow your hero to directly focus on the warlock and kill it instead of focusing on the skeletons. Or you could set a priority function in your code and have the warlocks killed first that way.

Here’s a HUGE hint for passing the level for people that seem to run out of health by the time they arrive at the inner sanctum:

Command your paladins to heal you when you are less than your maxHealth, and before you go to the warlocks,
let the paladins heal you repeatedly until you are at full health, then use your strategy for killing the warlocks (don’t look at the previous hint if you don’t have to) and enter the inner sanctum

Here’s a hint for people that think ogres are somehow unkillable in the inner sanctum:

The witch is healing them. Use your warlock priority killing strategy and target the witch before killing the rest.

Have fun with the level!! :smiley: This level is great! Shouldn’t be as hard as Kelvintaph Defiler (Once you get to Glacier)

By my experience, Summit’s Gate is easier because it’s straight-forward coding, while in Kelvintaph Defiler you have to use exploits and do some messy coding and series of steps to command your troops… Still haven’t passed Defiler yet :expressionless:

2 Likes

Here’s another one:

Spoiler

The paladins auto heal any near allies so if you are fighting the warlocks, lure the skeletons to your allies when fighting the warlocks then finish them with backstab or scattershot.

1 Like

For defiler, try grouping your allies and make them fight as a team against Nalfar.

The thing is, when I use the attack in mid-air exploit that is required to complete the level, I was able to free a soldier, but when the soldier goes to attack another shaman, the shaman did the fear spell on the soldier as well… some of the shamans are in cramped spaces, and my soldier couldn’t get in there and kill them.

1 Like

Use archers to fight the shamans

1 Like

*post deleted due to off topic

2 Likes

@SuperSmacker Make a new thread. This thread is for Summit’s Gate.

2 Likes

I had to modify the code so much though.

GitHub should be banned

That will not happen.

github .master is okay sometimes but don’t always use it. That won’t make you learn.

1 Like

that is pure truth :no_mouth:

def commandArchers():
for archer in self.findByType(“archer”, self.findFriends()):
nearestEnemy = archer.findNearestEnemy()
if nearestEnemy:
self.command(archer, “attack”, nearestEnemy)
else:
hero.command(archer, “defend”, hero)

def commandSoldiers():
for soldier in self.findByType(“soldier”, self.findFriends()):
nearestEnemy = soldier.findNearestEnemy()
if nearestEnemy:
self.command(soldier, “attack”, nearestEnemy)
else:
hero.command(soldier, “defend”, hero)
def summonGriffins():
if hero.gold > hero.costOf(“griffin-rider”):
hero.summon(“griffin-rider”)
def pick():
item = hero.findNearestItem()
flag = hero.findFlag()
if item:
hero.moveXY(item.pos.x, item.pos.y)
if flag:
hero.pickUpFlag(flag)
def commandGriffins():
for griffin in self.findByType(“griffin-rider”, self.findFriends()):
enemies = griffin.findEnemies()
nearestEnemy = self.findNearest(enemies)
if nearestEnemy:
self.command(griffin, “attack”, nearestEnemy)
else:
self.command(griffin, “defend”, self)

def weakestFriend():
weakestFriend = None
weakestHealth = 999
for friend in self.findFriends():
if friend.health < friend.maxHealth and friend.health < weakestHealth:
weakestHealth = friend.health
weakestFriend = friend
if weakestFriend:
return weakestFriend

def commandPaladins():
for paladin in self.findByType(“paladin”, self.findFriends()):
if paladin.canCast(“heal”, self):
if self.health < 3000:
self.command(paladin, “cast”, “heal”, self)
else:
weakestFriend2 = weakestFriend()
if weakestFriend2:
self.command(paladin, “cast”, “heal”, weakestFriend2)
else:
hero.command(paladin, “defend”, hero)

def summonGriffin():
if self.gold >= self.costOf(“griffin-rider”):
self.summon(“griffin-rider”)

def moveForward():
targetPos = {‘x’: 328, ‘y’: 35}
self.move(targetPos)

def pickTarget():
enemies = self.findEnemies()
target = None
minDistance = 9999
for enemy in enemies:
if enemy.type is not “door”:
if enemy.type is “catapult”:
target = enemy
break
elif enemy.type is “warlock”:
target = enemy
break
elif enemy.type is “witch”:
target = enemy
break
elif enemy.type is “chieftain”:
target = enemy
break
else:
if self.distanceTo(enemy) < minDistance:
minDistance = self.distanceTo(enemy)
target = enemy
if target:
return target

def commandHero():
target = pickTarget()
if target:
while target.health > 0:
if hero.canCast(“chain-lightning”, target):
hero.cast(“chain-lightning”, target)
if hero.isReady(“stomp”):
hero.stomp()
elif hero.isReady(“throw”):
hero.throw(target)
elif hero.isReady(“bash”):
hero.bash(target)
else:
self.attack(target)
hero.shield()

else:
    moveForward()

def attackCatapults():
catapults = self.findByType(“catapult”)
if len(catapults):
for catapult in catapults:
while catapult.health > 0:
self.attack(catapult)
while True:
pick()
summonGriffins()
commandPaladins()
commandArchers()
commandSoldiers()
commandGriffins()
pickTarget()
commandHero()
attackCatapults()

Is this working code? I don’t want to format it all to find out.
If so, please delete it. I appreciate you’re trying to help others, but it doesn’t help them learn, winning from a solution someone else wrote is almost pointless.
Thanks
Danny

Ok I’m understand

Vào Th 2, 11 thg 11, 2019 vào lúc 02:38 Danny Walters via CodeCombat Discourse codecombat@discoursemail.com đã viết: