Need help with "Mad Maxer"


#1

I’m stuck on this level. The farthest enemy is Gurzthrot, but he has so many lives that when my hero tries to kill him, all the other enemies kill me first.


#2

what is your health, your sword, and what code are you using?


#3

@Eventous
Health: 935
Sword: Simple Sword (Long Sword is restricted)
Coding Language (if that’s what you meant by “code”): Python


#4

I would approximate that it would take around 3000 health to do the level properly with the simple sword (even more if you didn’t attack furthest first).

You need a better weapon.
Darksteel, I use up ~560 health (I would guess Great or Claymore should be around here, healthwise)
Kithsteel, I use ~400 health

You might be able to do it with the short sword, but I wouldn’t even attempt anything lower (I don’t think I’d spend the money just to find out on the short sword unless that is really all you can afford…), and would suggest you go as high as you reasonably can.


#5

Yeah, you are going to need a better sword, I used the Kithsteel. And I meant what is the actual code you are using.


#6

@Eventous @Vlevo
This is my code:



# Kill the enemy that's farthest away first.

loop:
    farthest = None
    maxDistance = 0
    enemyIndex = 0
    enemies = self.findEnemies()

    # Look at all the enemies to figure out which one is farthest away.
    while enemyIndex < len(enemies):
        target = enemies[enemyIndex]
        enemyIndex += 1

        # Is this enemy farther than the farthest we've seen so far?
        distance = self.distanceTo(target)
        if distance > maxDistance:
            maxDistance = distance
            farthest = target

    if farthest:
        # Take out the farthest enemy!
        # Keep attacking the enemy while its health is greater than 0.
        while farthest.health>0:
            if self.isReady("cleave"):
                self.cleave(farthest)
            else:
                self.attack(farthest)

The reason I use Simple Sword is because Long Sword is restricted.
Also, I have 832 gems. So I can’t by too much.


#7

This is the code I used :

[code]
loop:
maxDistance = 0
enemyIndex = 0
enemies = self.findEnemies()

while enemyIndex < len(enemies):
    target = enemies[enemyIndex]
    enemyIndex += 1

    distance = self.distanceTo(target)
    if distance > maxDistance:
        maxDistance = distance
        farthest = target

if farthest:
    self.attack(farthest)
    farthest = None

[/code] My friend is having the same issue with the same level because his sword isnt strong enough, but doesnt have money. I think there should be an option to sell items though…


#8

Well, you could always simulate games. Simulating games earns you 20x^0.4 gems, where x is the number go games you have simulated. This should earn you a hew hundred relatively quickly. Try this: http://codecombat.com/play/ladder/cavern-survival#simulate


#9

I’ve managed to slay the ogres, but when I try to slay the dummies it doesn’t work. Please help!