Sarven Road

Watch out for ogre scouts on the road as you search for water.

https://codecombat.com/play/level/sarven-road

Solution

// Get to the oasis. Watch out for new enemies: ogre scouts!
// Go up and right by adding to the current X and Y position.

while(true) {
    // If there's an enemy, attack.
    if(hero.findNearestEnemy())
    hero.attack(hero.findNearestEnemy());
    
    // Else, keep moving up and to the right. 
    hero.moveXY(hero.pos.x+3, hero.pos.y+3);
}
Points for
time
damage-taken
Needed items with
findNearestEnemy
attack
pos
moveXY
This site is in another language version