Advertisement
Guest User

Untitled

a guest
Oct 8th, 2015
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.46 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package TextAdventure;
  7.  
  8. /**
  9. *
  10. * @author Christian
  11. */
  12. public class TextAdventure {
  13.  
  14.  
  15.  
  16. public static void main(String[] args)
  17. {
  18.  
  19. Player myPlayer = new Player("Gygax", "You appear to be wearing some sort of grey, bulky plate armor. You also wear a cape with a sketch of dice on it.");
  20.  
  21.  
  22. // items
  23. Item milkCarton = new Item("Milk Carton", "A rather old, corked botle with what appears to be milk inside. 'CALCIUM BOOST' is scribbled on the front.");
  24. Item sword = new Item("Rusty Sword", "A rustic old sword which seems to have seen its days of travel. You feel oddly at home with it on your side.");
  25. Item sugarCubes = new Item("Sugar", "White, powdery sugar. You can already feel your teeth hurting just looking at it.");
  26.  
  27. // 3 creatures
  28.  
  29. Creature skeleton = new Creature("Skeleton Bard", "A skeleton with a set of sticks in its hands and a funny looking flat hat, playing a beat on its bare spooky ribs.It seems to be magically charming, as though you want to hit it for coins, or at least play a melody with it..","The skeleton downs the milk through his boney windhole; it seemingly disappears as the carton empties, not even falling through his ribs. He saunters off, continuing to play his spooky beat.");
  30. Creature goblin = new Creature("Green Goblin", "A short, small, and ugly looking green-colored goblin. It doesn't seem to be doing much, except for looking like a lazy goblin should.");
  31. Creature minotaur = new Creature("Minotaur", "A large, brutish looking half-bull, half-man combination. The upper half of the minotaur is covered in feet of hair, as though they grew it out. Don't ask if he has a long face. \" MORTAL! I need something for this horrible sweet tooth! You may not pass until you return me something to sate my hunger", "The minotaur neighs as it kicks a hidden door in the wall, leaving rather happy with itself.");
  32.  
  33. // rooms + their exits
  34.  
  35. Exit exitOne = new Exit("Heavy Door", "A heavy looking, metal door. It seems to start the way.", "You push the heavy door open with all your might and slip in. You can hear it 'click' and lock behind you.");
  36. Exit exitTwo = new Exit("Grated Entrance", "An old looking entrance, covered in all sorts of metals and rods.", "You pass through the entrance, making sure not to give yourself tetanus. The rods and heavy metals fall as you enter the entrance, closing off the hole behind you.");
  37. Exit exitThree = new Exit("Metal Door", "A rather heavy metal door, which resembles the last.", "You begin to push on the door heavily, but it refuses to budge. \" A trap of some sort,\" you think to yourself as you notice it's a pull-door. You pull it open, embarrassed.");
  38. Exit exitFour = new Exit("Hole", "A dark and dirty looking hole. Looks like a hobbit has been here.", "You jump into the darkness, feeling only the cold air on your skin. A bright light flashes, setting you back into the skeleton's room. His melody returns to your ears.");
  39. Exit exitFive = new Exit("Wooden Door", "An old wooden door. There are noticeable dark splotches of mysterious origin on the handle.", "You push on the door as it creaks open; the blotches seem to be a warning. You can hear the door shuffle closed behind you, clicking.");
  40. Exit exitSix = new Exit("Fancy Door", "Golden banners and scrolls cover the door in heaps and piles. It reeks of nobility.", "You move some of the banners and scrolls, entering lazily.");
  41. Exit exitSeven = new Exit("Fancy Door", "Golden banners and scrolls cover the door in heaps and piles. It reeks of nobility.", "You move the banners aside.");
  42. Exit exitEight = new Exit("Open Door", "An opening that seemingly leads to the kitchen.", "You walk through without much trouble.");
  43. Exit exitNine = new Exit("Open Door", "An opening that seemingly leads to the dining room.", "You walk through without much trouble.");
  44. Exit exitTen = new Exit("Heavy Metal Door", "A door covered in several drawings and etchings, placed for no discernible reason.", "You push on the door and move through with gusto!");
  45. Exit exitEleven = new Exit("Heavy Metal Door", "A door covered in several drawings and etchings, placed for no discernible reason.", "You push on the door and move through with gusto!");
  46. Exit exitTwelve = new Exit("Vault Door", "It looks imposing just by itself. Several hatches and cranks are placed around the door, though it lays open just a crack either way.", "You push on the door, straining heavily, as it creaks open.");
  47. Exit exitThirteen = new Exit("Vault Door", "It looks imposing just by itself. Several hatches and cranks are placed around the door, though it lays open just a crack either way.", "You push on the door, straining heavily, as it creaks open.");
  48. Exit exitFourteen = new Exit("Glass Door", "A shining glass door covered in gems and stones. It looks important for your quest.", "You gently push on the door as to not damage any of the work, stepping in.");
  49.  
  50.  
  51. Room room1 = new Room("The Hold", "A brightly lit room that smells of various coins and trinkets. Copper fills the air, though you're not sure if it's bodily fluids or simply the smell of metals. Shields and swords hang from the mossy walls in bunches, though they seem stuck to the wall. In the farthest reaches of the room is a heavy metal door. Maybe you should start there.", exitOne);
  52. Room room2 = new Room("Spooky Skeleton Room", "The lights in the room are kept dimly lit, the torches barely making themselves known. Various amounts of instruments lay scattered across the floor, ranging from drums to horns to stringed instruments. An obvious melody is being played on what sounds like a xylophone in the darker corner of the room. ", exitTwo, exitFive, skeleton);
  53. Room room3 = new Room("Workshop", "A room covered in monumental amounts of dust and spider nests. Books lay stacked in messy piles, tools seemingly thrown around the room. A workbench can be seen under the pile somehow. A metal door sits next to the table, its lock broken in two.", exitThree);
  54. Room room4 = new Room("Old Pantry", "A sullen and desolate looking room which smells of rotten eggs and cheese. A bottle of.. what looks like milk sits on the counter untouched upon one of the old wooden tables. A dark hole stands in front of you by a cracked fireplace, seemingly beckoning you to take a jump.", exitFour, milkCarton);
  55. Room room5 = new Room("Armory", "A room full of broken shields, cracked swords, and other assortments of weapons. A sword hanges from the wall next to the entrance, covered in some sort of weird coloring. You feel an increasing urge to sneeze just standing around.", exitSix);
  56. Room room6 = new Room("Dining Room", "A grand and deserted dining room, filled with two large oval tables. Empty and battered plates lay along the tables, strewn about with kitchenware and other items of no importance. A large banner lays draped over a fireplace at the frotn of the two oval tables, tattered and worn through its years.", exitSeven, exitEight);
  57. Room room7 = new Room("Kitchen", "A very dirty kitchen covered in fading colors of gold and red. Numerous recipe books and ingredients are settled on the counters, including a rather large, untouched bag of sugar cubes next to the cupboard. A goblin is seen next to a raging fire in one of the pots, stirring something that hopefully isn't human. Many walkways and entrances surround the room, though most are blocked rather heavily.", exitNine, exitTen, goblin, sugarCubes);
  58. Room room8 = new Room("Quarters", "Upon entering the room, you notice a few cots tossed around the room laying in all sorts of shapes. Potion bottles and boxes lay broken around the circular shape of the room, their remnants dripping on the cold, stone floor. It seems like nothing of immediate value is around..", exitEleven, exitTwelve);
  59. Room room9 = new Room("Vault Room", "The room is hardly lit at the entrance, but grows in brightness as you continue down the path. Locked chests and cases of all sort lay untouched. A large minotaur prances around, looking rather unhappy with himself.", exitThirteen, exitFourteen, minotaur);
  60. Room endingRoom = new Room("Trophy Room", "A hardy room full of gold and trinkets.");
  61.  
  62.  
  63. exitOne.setDestination(room2);
  64. exitTwo.setDestination(room3);
  65. exitThree.setDestination(room4);
  66. exitFour.setDestination(room2);
  67. exitFive.setDestination(room5);
  68. exitSix.setDestination(room6);
  69. exitSeven.setDestination(room5);
  70. exitEight.setDestination(room7);
  71. exitNine.setDestination(room6);
  72. exitTen.setDestination(room8);
  73. exitEleven.setDestination(room7);
  74. exitTwelve.setDestination(room9);
  75. exitThirteen.setDestination(room8);
  76. exitFourteen.setDestination(endingRoom);
  77.  
  78.  
  79. room4.setItem(milkCarton);
  80. skeleton.setItemToDestroy(milkCarton);
  81. room5.setItem(sword);
  82. room7.setItem(sugarCubes);
  83. minotaur.setItemToDestroy(sugarCubes);
  84. exitFive.setCreatureBlocks(true);
  85.  
  86.  
  87.  
  88. Game.Start();
  89. }
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement