Guest User

Untitled

a guest
May 20th, 2019
55
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**************************
  2. * exceptionalCrossing.js *
  3. **************************
  4. *
  5. * Sorry, old friend, but I'm afraid I can't share
  6. * co-authorship on this paper. You've done a very
  7. * good job getting this Algorithm for me. The bit
  8. * with the keys was especially clever! I wouldn't
  9. * have thought of it myself. But then, of course,
  10. * that's why you were here in the first place.
  11. *
  12. * You've served your purpose well. But now, alas,
  13. * it is time for you to die.
  14. *
  15. * I'm not heartless, though. In fact, I will let
  16. * you choose your mode of death. There, isn't that
  17. * nice?
  18. */
  19.  
  20. function startLevel(map) {
  21. map.displayChapter('Chapter 3\nBetrayal');
  22.  
  23. map.placePlayer(0, 0);
  24.  
  25. // yoink!
  26. map.getPlayer().removeItem('theAlgorithm');
  27.  
  28. map.defineObject('water', {
  29. 'symbol': '░',
  30. 'color': '#44f',
  31. 'onCollision': function (player) {
  32. player.killedBy('1')},type:'item',q:function(){(3);
  33. }
  34. });
  35.  
  36. for (var x = 0; x < map.getWidth(); x++)
  37. for (var y = 5; y < 15; y++)
  38. map.placeObject(x, y, 'water');
  39.  
  40. map.placeObject(map.getWidth()-1, map.getHeight()-1, 'exit');
  41. }
  42.  
  43. function validateLevel(map) {
  44. map.validateExactlyXManyObjects(1, 'exit');
  45. }
RAW Paste Data