Пример #1
0
  public static void levelNightmare() {

    story("After hours of seemingly endless walking, you notice something unsettling.");

    story(
        "The hallway becomes decreasingly lit and a strange, fleshy substance lines the cracks in the stone.");

    story(
        "You walk upon a crooked, decaying sign, only barely able to read its crudely scribed letters.");

    story("A GrEaT PEril aWAitS YoU, ViSitOr, aND tHerE iS nO TuRniNg BaCk.");

    story("yOU HaVE wAlkEd BeyOnD thE POinT OF nO RetURn, OnLy tO bE ChAsEd bY A nIGhtmaRE.");

    story("ProCeED SWiFtlY, FOr hE AlReaDy kNowS yOuR PrEseNcE.");

    story(
        "Worried from what you read, you have the urge to TURN back, but the sign says you can only go FORWARD.");
    c1 = "turn";
    c2 = "forward";
    decision = decisionProcess(c1, c2);

    if (decision == 1) {

      story(
          "Afraid of facing certain doom, you turn back and hope for a less threatening passage.");

      story("Strangely, the way back becomes increasingly darker. Something is different.");

      story("You don't know whether to WALK on, or turn back and FACE your fears.");
      c1 = "walk";
      c2 = "face";
      decision = decisionProcess(c1, c2);

      if (decision == 1) {

        story(
            "You tell yourself to stop worrying and keep walking. It's all in your head, you tell yourself.");

        story("Suddenly, the ground gets incredibly fleshy and seemingly alive!");

        story("Fear and instinct take over you, and you take off running!");

        story(
            "The darkness lining the walls shoots past you, and what used to be a stone floor now feels like the insides of a beast!");

        story("Down what used to be a stone corridor, to your disbelief...");

        story(
            "Enormous teeth sprout from the ceiling and floor and begin quickly closing on each other! There is no escape...");

        story("The last thing you ever see is the light between the teeth's closing gaps.");

        player.gameOver();
      } else if (decision == 2) {

        story("You stop for a moment and gather yourself. The sign said not to turn back.");

        story("Ultimately, you decide to proceed back towards the creepy sign and past it.");
      }
    }

    story(
        "You walk onwards, and the halls are no longer lit by dim, orange flames. Bright, green, seemingly cursed flames light the path.");

    story("Soon, you encounter a room containing three large, wooden doors.");

    story("...!");

    story(
        "You hear a long, sustained moan, and you remember the 'nightmare' mentioned by the sign.");

    story(
        "One of these doors must lead the way. If you are surely being followed, you have no choice but to pick one.");

    story("You must quickly decide - Which door should you enter? LEFT, CENTER, or RIGHT?");
    c1 = "left";
    c2 = "center";
    c3 = "right";
    decision = decisionProcess(c1, c2, c3);

    if (decision == 1) {
      story("You enter the left door, hoping you make it through alive.");
    } else if (decision == 2) {
      story("You enter the center door, hoping you make it through alive.");
    } else {
      story("You enter the right door, hoping you make it through alive.");
    }

    randomStory = randomizer(3);

    if (randomStory == 1) {
      levelNightmareBattle();
    } else if (randomStory == 2) {
      levelNightmareBlackJack();
    } else if (randomStory == 3) {
      levelNightmareBlackJack();
    }
  }
Пример #2
0
  public static void levelNightmareBlackJack() {

    story(
        "After stepping into what seems to be an old, rustic casino room, the door behind you closes shut.");

    story("In front of you is a dimly lit tabletop, and behind it sits a man.");

    story("You can't quite make out his features with the poor lighting.");

    story(
        "THE DEALER: Welcome, sir. You may call me THE DEALER. May I offer you a wager you surely cannot refuse?");

    story("* Continue to LISTEN to the dealer.\n* QUESTION him about the wager.");
    c1 = "listen";
    c2 = "question";
    decision = decisionProcess(c1, c2);

    if (decision == 2) {
      story("THE DEALER: Ah good sir, I am just getting to that.");
    }

    story("THE DEALER: As you see, I hold the key to your escape.");

    story("The man slowly holds out a rusty key with his gloved hand.");

    story("THE DEALER: Similarly, you hold the key to my own escape.");

    story("THE DEALER: I am a cursed man, cursed to forever be the dealer of this forsaken place.");

    story(
        "THE DEALER: The only way to break my curse is to offer my position to another... willing.");

    story(
        "THE DEALER: So what will it be, will you PLAY?\n* You also have the option to KILL the dealer for the key.");
    c1 = "play";
    c2 = "kill";
    decision = decisionProcess(c1, c2);

    if (decision == 2) {

      if (player.getBlade() == true) {
        story("You brandish your trusty blade and slowly approach the dealer.");
      } else {
        story("You crack your knuckles and slowly approach the dealer.");
      }

      story(
          "THE DEALER: You have no power here, naive sir. Do you truly want to do this?\n* Sit down and PLAY the game.\n* FINISH the job.");
      c1 = "play";
      c2 = "finish";
      decision = decisionProcess(c1, c2);

      if (decision == 1) {
        story("Not willing to take the risk, you stand down.");

        story("THE DEALER: Smart move, sir. Hopefully it reflects in your card game.");
      } else {
        story("You call the dealer's bluff and charge at him!");

        if (player.getBlade() == true) {
          story("Ready to obtain your prize, you drive your blade into his body...");

          story("Instantly, you feel a sharp drive of metal in your own gut!");

          story("You quickly bleed to death from your self-inflicted wound.");

          story("THE DEALER: Good night... sir.");

          player.gameOver();
        } else {
          story("You crack your knuckles and slowly approach the dealer.");

          story("He only sits there as you press both you hands on the sides of his head.");

          story("With a sudden jerk, you twist his neck...");

          story("In a single motion your own neck breaks, instantly killing you!");

          story("THE DEALER: Good night... sir.");

          player.gameOver();
        }
      }
    }

    story("You take a seat, and the dealer pulls out a deck of cards.");

    story("THE DEALER: The game for tonight is Blackjack! Do you know how to play?\n* YES.\n* NO.");
    c1 = "yes";
    c2 = "no";
    decision = decisionProcess(c1, c2);

    if (decision == 1) {
      story("Good. let us begin then.");
    } else {
      story(
          "THE DEALER: The goal of blackjack is to beat the dealer's hand without going over 21.");

      story(
          "THE DEALER: Face cards are worth 10. Aces are worth 1 or 11, whichever makes a better hand.");

      story("THE DEALER: With that being said, let us begin.");
    }

    story("First to three wins the wager!");

    int playerScore = 0;
    int dealerScore = 0;

    while (playerScore < 3 && dealerScore < 3) {
      if (playerScore == 2 && dealerScore == 2) {
        story("THE DEALER: The wager of a millennium! It all goes down to this game!");
      }
      BlackJack blackJackGame = new BlackJack();
      boolean playerWin = BlackJack.playRound();
      if (playerWin == true) {
        playerScore = playerScore + 1;
        if (playerScore == 1 && dealerScore == 0) {
          story("THE DEALER: Let's hope lady luck stays faithful to you. Again!");
        } else if (playerScore == 2) {
          story("THE DEALER: Another win for you, good sir! Very good!");
        }
      } else {
        dealerScore = dealerScore + 1;
        if (dealerScore == 1) {
          story("THE DEALER: Aha! This game belongs to me!");
        } else if (dealerScore == 2) {
          story("THE DEALER: Another win for THE DEALER! I wish you the best of luck, sir.");
        }
      }
      story("SCORE:\nYou: " + playerScore + "\nTHE DEALER: " + dealerScore);
    }

    if (playerScore == 3) {
      story("You won the wager!");

      player.cunMod(1);

      story("THE DEALER: Well, a wager's a wager, and my curse bounds me to my word.");

      story("The dealer places the key upon the table.");

      story("The exit is behind me. Good luck on your further adventures, sir.");
    } else {
      story("You lost the wager!");

      story("THE DEALER: Well, a wager's a wager, and my curse belongs to you now!");

      story(
          "You suddenly lose consciousness, and your body becomes possessed of the dealer's curse!");

      story("No longer caring for gold and adventure, you take the dealer's seat.");

      story("EX-DEALER: I'm free! How long has it been...?");

      player.gameOver();
    }
  }
Пример #3
0
  public static void levelStrangerFight() {

    story(
        "Confident in your own strength, you attempt to break free and turn the tables against the attacker.");

    randomStory = randomizer(5) + 4;

    story("You gather yourself and try your hardest to break free from the hold.");

    if (randomStory <= player.getStr()) {

      story("In a flash, you drive his blade-arm away from you and knock him on the ground.");

      player.strMod(1);

      story(
          "STRANGER: Ugh... You are a formidable one, adventurer. I do enjoy a challenge, however.");

      story(
          "Your enemy has his back to the ground! You can either go for the BLADE or try to FINISH him off!");
      c1 = "blade";
      c2 = "finish";
      decision = decisionProcess(c1, c2);

      if (decision == 1) {

        story("Following your instinct, you sprint towards the shiny metal blade.");

        randomStory = randomizer(5) + 4;

        if (randomStory <= player.getStr()) {

          story(
              "The stranger springs up and runs for the weapon as well, but fails to beat you to it.");

          story("Seeing that you now wield the blade, he hurriedly takes off down the hallway.");

          player.bladeMod(true);
        } else if (randomStory > player.getStr()) {

          story("However, the stranger springs up and beats you to the weapon.");

          story("You are unable to react quickly enough, and he cuts you down with a single blow!");

          story(
              "Your killer greedily pockets all your hard-earned gold with no regrets of your expense.");

          player.gameOver();
        }
      } else if (decision == 2) {

        story(
            "Ignoring the shiny metal weapon, you forcefully pin the attacker against the ground.");

        story("You both exchange blows, leaving yourself with a bloody face and fists.");

        randomMod = randomizer(3) + 3;
        player.hpMod(randomMod * -1);

        story("However, you manage to finish off your adversary by breaking his neck!");

        story(
            "Relieved that you survived the encounter, you take the dead stranger's gold and the weapon.");

        randomMod = randomizer(200) + 50;
        player.goldMod(randomMod);

        player.bladeMod(true);

        story(
            "You brush the dust off your clothes with your hands and delve deeper into the dungeon's darkly-lit corridors.");
      }
    } else if (randomStory > player.getStr()) {

      story("You gather yourself and try your hardest to break free from the hold.");

      story("Unfortunately, your strength failed you and the stranger slices open your throat.");

      story(
          "Your killer greedily pockets all your hard-earned gold with no regrets of your expense.");

      player.gameOver();
    }
  }