Skip to content

Instantly share code, notes, and snippets.

@a1ip
Last active August 18, 2018 19:34
Show Gist options
  • Select an option

  • Save a1ip/c5551df1b1024ada8a00 to your computer and use it in GitHub Desktop.

Select an option

Save a1ip/c5551df1b1024ada8a00 to your computer and use it in GitHub Desktop.
CodeCombat Old Beginner Campaign solutions http://codecombat.com/play-old

Rescue Mission

Tharin has been captured!

Difficulty: ★


Code for plan() spell is here:

@moveDown()
@moveDown()
@moveRight()
@moveUp()
@moveUp()
@moveRight()
@moveRight()
@moveDown()
@attackNearbyEnemy()

Grab the Mushroom

Grab a powerup and smash a big ogre.

Difficulty: ★


Code for plan() spell is here:

@moveUp()
@moveRight()
@moveLeft()
@moveUp()
@attackNearbyEnemy()

Drink Me

Drink up and slay two munchkins.

Difficulty: ★


Code for plan() spell is here:

@attackNearbyEnemy()
@moveRight()
@moveDown()
@moveUp()
@moveRight()
@attackNearbyEnemy()

Taunt the Guards

Tharin, if clever, can escape with Phoebe.

Difficulty: ★


Code for @plan() spell is here:

@moveRight()
@bustDownDoor()
# Delete the "#" in front of each line below.
@moveRight()
@say "Hey there!"
@moveLeft()
@moveLeft()
@say "Attack!"
# Now get Phoebe to follow through the dungeon.
@moveRight()
@say "Follow me."
@moveRight()
@moveRight()
@moveUp()
@moveRight()
@say "Hey there!"
@say "Attack!"
@say "Attack!"
@say "Follow me."
@moveRight()
@moveRight()

It's a Trap

Organize a dungeon ambush with archers.

Difficulty: ★


Code for plan() spell is here:

# Taunt the Ogre and run for cover!
@moveDown()
@moveDown()
@say "Hey, Ogre!"
@moveUp()
@moveUp()
@say "Shoot him"

Break the Prison

More comrades are imprisoned!

Difficulty: ★


Code for isFriend(name) spell is here:

# Write this isFriend(name) spell to tell friend from foe.
# Return true for friends' names, false for ogres' names.

return false if name is "MARCUS" or "Gort" or "Brack" or "Krogg"
true

Taunt

Taunt the ogre to claim victory.

Difficulty: ★


Code for plan() spell is here:

@say "Hey!"
@say "Ogre!"
@say "You are!"
@say "Dead!"
# Lure the ogre right into your arrow trap# by saying a few more things at him.
# Anything works!

Cowardly Taunt

Lure infuriated ogres to their doom.

Difficulty: ★


Code for plan() spell is here:

@moveXY 50, 16
@moveXY(48, 28)
@say "Alarm, Girls!"
@moveXY 63, 20
@moveXY 70, 10  # This is a safe spot.

@say "I can lure them in here."

# Run your soldier out where the ogres can hear you.
# Say something!
# Then run back behind the arrow towers for safety.
# You can shift+click on the map to insert coordinat

Commanding Followers

Lead allied soldiers into battle.

Difficulty: ★


Code for plan() spell is here:

@moveXY 49, 66
@moveXY 60, 63
@moveXY 75, 63
@say "Hail, friends!"
# Saying anything with "follow" in it will get nearby soldiers
# to follow you
@say "follow"
# Saying anything with "attack" will send nearby troops into
# a battle mode.
@moveXY 61, 43
@say "attack"
# Make sure Tharin is safe!

Mobile Artillery

Blow ogres up!

Difficulty: ★


Code for plan() spell is here:

@moveXY 30, 26  # Move into range
@attackXY 46, 5 # Shoot once in the middle of the ogres
@moveXY 48, 36  # Move into range
@attackXY 69, 55 # Shoot
@attackXY 59, 44 # Shoot
@attackXY 48, 63 # Shoot
@attackXY 48, 52 # Shoot
# If they survive a hit, ogres retaliate!
# Larger ogres take more than one hit...
# So, position and aim carefully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment