Skip to content

Instantly share code, notes, and snippets.

@AnastasiaDunbar
Last active April 14, 2016 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AnastasiaDunbar/171e91ac7bf7f8530c5fff1f3f16317a to your computer and use it in GitHub Desktop.
Save AnastasiaDunbar/171e91ac7bf7f8530c5fff1f3f16317a to your computer and use it in GitHub Desktop.
Kithgard Dungeons Solutions (Javascript). https://codecombat.com/play/dungeon
//1-(Dungeons of Kithgard)
this.moveRight();this.moveDown();this.moveRight();
//2-(Gems in the Deep)
this.moveRight();this.moveDown();this.moveUp();this.moveUp();this.moveRight();
//3-(Shadow guard)
this.moveRight();this.moveUp();this.moveRight();this.moveDown();this.moveRight();
//4-(Forgetful Gemsmith)
this.moveRight();this.moveUp();this.moveRight();this.moveRight();this.moveDown();this.moveDown();this.moveUp();this.moveRight();
//5-(True Names)
this.moveRight();this.attack("Brak");this.attack("Brak");this.moveRight();this.attack("Treg");this.attack("Treg");this.moveRight();this.moveRight();
//6-(The Raised Sword)
this.attack("Rig");this.attack("Rig");this.attack("Gurt");this.attack("Gurt");this.attack("Ack");this.attack("Ack");
//7-(Kithgard Librarian)
this.moveRight();this.say("Hush");this.moveRight();
//8-(Fire Dancing)
while(true){this.moveRight();this.moveLeft();}
//9-(Loop Da Loop)
while(true){this.moveRight();this.moveUp();this.moveLeft();this.moveDown();}
//10-(Haunted Kithmaze)
while(true){this.moveRight();this.moveRight();this.moveUp();this.moveUp();}
//11-(The Second Kithmaze)
while(true){this.moveRight();this.moveUp();this.moveRight();this.moveDown();}
//12-(Dread Door)
while(true){this.attack("Door");}
//13-(Known Enemy)
this.attack("Kratt");this.attack("Kratt");this.attack("Gert");this.attack("Gert");this.attack("Ursa");this.attack("Ursa");
//14-(Master of Names)
var e=this.findNearestEnemy();this.attack(e);this.attack(e);e=this.findNearestEnemy();this.attack(e);this.attack(e);e=this.findNearestEnemy();this.attack(e);this.attack(e);
//15-(Lowly Kithmen)
var e=this.findNearestEnemy();this.attack(e);this.attack(e);e=this.findNearestEnemy();this.attack(e);this.attack(e);this.moveDown();this.moveRight();this.moveRight();
//16-(Closing the Distance)
this.moveRight();var e = this.findNearestEnemy();this.attack(e);this.attack(e);this.moveRight();e = this.findNearestEnemy();this.attack(e);this.moveRight();this.moveRight();
//17-(A Mayhem of Munchkins)
while(true){this.attack(this.findNearestEnemy());}
//18-(The final Kithmaze)
while(true){this.moveRight();this.moveUp();this.attack(this.findNearestEnemy());this.attack(this.findNearestEnemy());this.moveRight();this.moveDown();this.moveDown();this.moveUp();}
//19-(Kithgard Gates)
this.moveDown();this.buildXY("fence", 36, 34);this.buildXY("fence", 36, 30);this.buildXY("fence", 36, 26);this.moveRight();this.moveRight();this.moveRight();
//Bonus-(Kithgard Mastery)
//The level is randomly generated, please change the text of variables "pass" and "m".
var me = this;
var en = this.findNearestEnemy();
//pass - Password
var pass = "Friend";
function MoveChar(char){
switch(char) {
case "a": me.moveLeft(); break;
case "w": me.moveUp(); break;
case "s": me.moveDown(); break;
case "d": me.moveRight(); break;
case "p": me.say(pass); break;
case "A": if(en!==null){me.attack(en);} break;
case "S": me.shield(); break;
}
}
//awsd - Movement.
//p - Say password to unlock the door.
//A - Attack nearest enemy.
//S - Shield
var m = "wdddwsdpddwwwSAAaaaaww";
while(true){
for(var i=0;i<m.length;i++){
en = this.findNearestEnemy();
MoveChar(m[i]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment