Ejemplo n.º 1
0
Archivo: DNO.java Proyecto: Tlmader/dno
  public static void eventMonsterUndead() {

    story(
        "You pass upon the corpse of a fallen adventurer. You spot a coin purse and a crude-looking sword still grasped by his lifeless hand.");

    story("Do you wish to LOOT the corpse or RESPECT the dead man and leave his body alone?");
    c1 = "loot";
    c2 = "respect";
    decision = decisionProcess(c1, c2);

    if (decision == 1) {

      MonsterBattle undead = new MonsterBattle(30, 8, 100, "Undead Adventurer");

      if (player.getBlade() == false) {
        story(
            "Knowing that you need the blade more than he does, you reach down to take the weapon.");
      } else {
        story(
            "Knowing that coin proves more useful to the living, you reach down for his coin purse.");
      }

      randomStory = randomizer(2);

      if (randomStory == 1) {
        story("...!");

        story(
            "You jump at the sight of the unliving adventurer rising up, ready to defend its peace!");

        undead.battle();

        if (player.getBlade() == false) {
          story("You take the now-truly-dead adventurer's old blade.");
          player.bladeMod(true);
        }
        story("What a fight! You hope you find a way of healing yourself soon.");
      } else {
        if (player.getBlade() == false) {
          player.bladeMod(true);
          story(
              "Also knowing that coin proves more useful to the living, you reach down for his coin purse.");
        }
        randomMod = randomizer(90) + 10;
        story("You count " + randomMod * player.getGoldFind() + " pieces of gold!");
        player.goldMod(randomMod);
      }
    } else {
      story(
          "You are better than this. Respecting the dead is far more important than loot... right?");
      player.willMod(1);
    }
  }
Ejemplo n.º 2
0
Archivo: DNO.java Proyecto: Tlmader/dno
  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();
    }
  }
Ejemplo n.º 3
0
Archivo: DNO.java Proyecto: Tlmader/dno
  public static void levelStranger() {

    story(
        "After an hour of exploring in silence, you feel the need to take a BREAK from exploring. Or you could WALK further");
    c1 = "break";
    c2 = "walk";
    decision = decisionProcess(c1, c2);

    if (decision == 1) {
      story("You reward yourself with hard-earned rest.");

      story("Exhausted from your efforts, you go into a deep sleep.");
    } else if (decision == 2) {
      story("You resist the urge to nap and continue walking... drowsily...");
    }

    story("...");

    story("...");

    story("...");

    if (player.getBlade() == false) {
      story("You awaken to the pressing of a sharp blade against your neck!");
    } else {
      story("You awaken to the pressing of your own weapon against your neck!");
      player.bladeMod(false);
    }

    story("STRANGER: Don't move a muscle.");

    story("* WHAT do you want from me?\n* WHO are you?");
    c1 = "what";
    c2 = "who";
    decision = decisionProcess(c1, c2);

    if (decision == 1) {

      story("STRANGER: We came here for the same reason. Gold. Hand it over or die.");
    } else if (decision == 2) {

      story(
          "STRANGER: My name is of no importance. What matters is that you hand over your treasures.");

      story("Otherwise, you will have neither your gold nor your life.");
    }

    story("You could SURRENDER your gold to the stranger, attempt to break free and FIGHT back.");

    story("Maybe you could attempt to talk it over and NEGOTIATE working together.");
    c1 = "surrender";
    c2 = "fight";
    c3 = "negotiate";
    decision = decisionProcess(c1, c2, c3);

    if (decision == 1) { // Surrender gold to stranger

      levelStrangerSurrender();
    } else if (decision == 2) { // Fight back the stranger

      levelStrangerFight();
    } else if (decision == 3) { // Negotiate with the stranger

      story(
          "You attempt to talk yourself out of the situation and into an alliance with the stranger.");

      story("STRANGER: So, you propose working together. What a fine idea.");

      story("STRANGER: However, I don't see how I could profit through such an arrangement.");

      story("There are two things left to do: either you could HAND over the gold or FIGHT back.");
      c1 = "surrender";
      c2 = "fight";
      decision = decisionProcess(c1, c2);

      if (decision == 1) { // Surrender gold to stranger

        levelStrangerSurrender();
      } else if (decision == 2) { // Fight back the stranger

        levelStrangerFight();
      }
    }
  }