Cavern Survival level help


#1

How does this level work? I’m not really in multiplayer, just playing against the AI opponent.

I equip my best items and start the level.

I"m using this code which seems to work OK.

loop {
// Find and attack the enemy inside a loop.
// Use flags and your special moves to win!
var enemy = this.findNearestEnemy();
this.shield();
this.attack(enemy);
this.attack(enemy);
}

The thing is the timer for this level is set to 22.6 seconds and I still have health left when this ends. However I get a ‘failing’ message at the end? I have no way to determine what the enemy player’s status is at the end of the level.

Can anyone shed some light on how this level is supposed to work? It’s accessible from the upper left corner of the first map (little island).


#2

The description says to “stay alive longer than your opponent”. That’s I did. But the attacks are random and some are noticeably easier than others.

If you’re having trouble, you may need to go to the enemy and help him not survive.


#3

This one was a little hard to understand. My explanation might not be completely on the mark, but here is what I figured out so far:

Survival is multiplayer, kind of offline one. What you see initially is training area for you to write and test your code against AI.

Once you win you’ll be able to “Submit” your code. Winning that will dump you to rankings screen (site /play/ladder/cavern-survival) and your code will periodically fight with other players’ code. You’ll just see how well it is doing, not actual fights.

To improve your code you go to the level again, update it until you are happy with it, and “submit” new version, it will replace previous one, fighting in the ladder.


#4

Ok, makes sense. Is it realistic to think you can write a script that can win using methods that are available from the first level or is this an area that you need to come back to after you have more experience?


#5

Leave it for later. The stronger monsters that appear after a while are no-go with weaker character, so at best can try to run away until they get the opponent. :slight_smile:

It’s easier and more interesting once you earn some crystals for completing levels and can buy couple good items.


#6

huh calydon your script dosent work beaucause first when you attack you attack the door:sweat_smile:


#7

[quote=“Renji_Jenkins, post:6, topic:1608”]
door


#8

@Renji_Jenkins

I should hope that at some point in the past two years calydon has resolved this issue. :yum: