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

Someone please help me with python on summit's gate!

Subscription gives you crazy amount of crystals and that will help you with a lot of level.

Yeah, I know. Nice profile pic by the way!

1 Like

The picture is a baby griffin

yeah I just seemed to like it.

You know, my brother plays portal. His name is borf, and his pic is a dog barking! It’s absolutely hillarious! And yes, I know I spelled that wrong.

2 Likes

beam towers weren’t problem for me in this level. The real problem was the warlocks. I decided I wanted to kill them and I lost a lot of hp battling them but the paladins were nice enough to heal me so… overall the level is moderately hard.

1 Like

The warlocks was a problem, so then I attack him first. The level was easier with pender and lightning twig and twilight glasses, so then while the other enemies cannot target me, and I would attack the warlocks first, and then I would attack the other enemies

I also tried this level with nalfar and it worked! but I guess my skeletons weren’t happy when I sacrificed them for myself. :stuck_out_tongue:

1 Like

It took me 5 hours in total (tried for 6 days) in order to beat the level for the first time. Later, I tried to get a high score but then My score won’t show up in the scoreboard even though I lost zero health

RIP (20 characters argh this is killing me)

1 Like

Oh, sugar pop! Something’s wrong with my hero in the second room. He ignores all enemies and towers, and just heads straight for the door! Here’s all code related to that stuff. My guess is the hero thinks that he’s still in room 1, despite already destroying room one’s door:

#code for my hero to fight:
def heroToBattle():
    if strategy == 0:
        enemy = hero.findNearest(hero.findByType("catapult"))
        if enemy:
            if hero.canCast("chain-lightning", enemy):
                hero.cast("chain-lightning", enemy)
            elif hero.isReady("bash"):
                hero.bash(enemy)
            else:
                hero.attack(enemy)
            hero.shield()
        else:
            enemy = hero.findNearestEnemy()
            if enemy:
                if hero.canCast("chain-lightning", enemy):
                    hero.cast("chain-lightning", enemy)
                elif hero.isReady("bash"):
                    hero.bash(enemy)
                else:
                    hero.attack(enemy)
                hero.shield()
    if strategy == 1:
        enemy = hero.findNearest(hero.findByType("tower"))
        if enemy:
            if hero.canCast("chain-lightning", enemy):
                hero.cast("chain-lightning", enemy)
            elif hero.isReady("bash"):
                hero.bash(enemy)
            else:
                hero.attack(enemy)
            hero.shield()
        else:
            enemy = hero.findNearestEnemy()
            if enemy and enemy.type != "door":
                if hero.canCast("chain-lightning", enemy):
                    hero.cast("chain-lightning", enemy)
                elif hero.isReady("bash"):
                    hero.bash(enemy)
                else:
                    hero.attack(enemy)
                hero.shield()
#code for my entire army to attack:
def armyAttack():
    summonGriffin()
    friends = hero.findFriends()
    for friend in friends:
        if friend.type == "paladin":
            commandPaladin(friend)
        if friend.type == "griffin-rider":
            commandGriffin(friend)
        if friend.type == "soldier":
            commandSoldier(friend)
        if friend.type == "archer":
            commandArcher(friend)
    heroToBattle()
#'action code', code that actually activates the action. Also increments the 'strategy'
strategy = 0
while True:
    armyAttack()
    enemy = hero.findNearestEnemy()
    door = hero.findNearest(hero.findByType("door"))
    if enemy and enemy.type != "door" and enemy.health > 0:
        if strategy == 0 or strategy == 1:
            door = hero.findNearest(hero.findByType("door"))
            if door:
                while door.health > 0:
                    hero.attack(door)
        if strategy == 2:
            pass#Will fill this in later
        strategy += 1

You don’t have to command the soldiers to attack. Just leave them to fight and die(also use them as a decoy) and head to the door while attacking your enemies. I know I’m pretty mean to my allies but thats how you win this level. LOL

No, it’s RIW (rest in war)

1 Like

Really? I find it much more useful to direct my soldiers towards things that I need dead. ex) catapults, towers, warlocks, etc.

nah just leave them to die. But don’t be stupid enough to sit and watch. You need to run while your allies die.

Anyway… does anyone see the problem with my code?

def armyAttack():
    summonGriffin()
    friends = hero.findFriends()
    for friend in friends:
        if friend.type == "paladin":
            commandPaladin(friend)
        if friend.type == "griffin-rider":
            commandGriffin(friend)
        if friend.type == "soldier":
            commandSoldier(friend)
        if friend.type == "archer":
            commandArcher(friend)
    heroToBattle()

You didn’t define commandArcher(friend),commandPaladin(friend), commandGriffin(friend), commandSoldier(friend)

I did. I just didn’t show them. They’re just the things I want to direct them towards.

Try simplifying your code. Don’t define what enemy to attack. Just let your hero attack any enemy it sees. That should make life and your code easier.

But I’ve used this type of code a lot already, and it all worked out! And I do need to prefer some enemies over others for my hero to survive with enough help.