コード例 #1
0
ファイル: DNO.java プロジェクト: Tlmader/dno
  public static void levelStrangerSurrender() {

    player.goldMod(player.getGold() * -1);

    story("You reluctantly empty your pockets of every last piece of gold.");

    story("STRANGER: You made the right decision. I said I would spare your life.");

    story("STRANGER: But not your thoughts.");

    story("Your head is met with the blow of the hilt of the thief's blade.");

    story("You fade into unconsciousness...");

    story("...");

    story("...");

    story("...");

    randomMod = randomizer(4) + 2;

    player.hpMod(randomMod * -1);

    story("You awaken, dazed, unsure of how long you were knocked out.");

    story("Your pockets remain empty. The encounter was no dream.");

    story("Despite the loss, you vigilantly get on your feet, ready for the next challenge.");
  }
コード例 #2
0
ファイル: DNO.java プロジェクト: 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);
    }
  }
コード例 #3
0
ファイル: DNO.java プロジェクト: Tlmader/dno
  public static void eventMonsterArmor() {

    MonsterBattle armor = new MonsterBattle(50, 10, 500, "Cursed Armor");

    story("After walking for some time, you enter an elegantly built room - one fit for royalty.");

    story("The first thing you spot is a massive, golden chest behind an idle suit of armor.");

    story("You believe the gold chest cannot simply be for grabs.");

    story("Do you wish to APPROACH the golden chest or avoid it and CARRY on?");
    c1 = "approach";
    c2 = "carry";
    decision = decisionProcess(c1, c2);

    if (decision == 1) {
      story("You cautiously approach the treasure, hoping nothing happens.");

      story("You open the chest, revealing piles over piles of gold!");

      story("To your actual surprise, the golden chest appears to be free of traps!");

      story("You pocket as much gold as humanly possible! You're rich!");

      player.goldMod(randomizer(1000));

      story("...!");

      story("Your euphoria is interrupted by a loud, metal, clanking noise.");

      story("Behind you - the suit of armor no longer remains idle, bearing a large mace!");

      armor.battle();

      story("The suit of armor, along with its massive weapon, crumbles into dust.");

      story("Incredible. You survived what seemed to be an impossible fight...");

      story("Gravely wounded, you rest for awhile in the room...");

      player.hpMod(randomizer(5) + 5);

      story("You wake up slightly rejuvenated with several of your injuries healed.");

      story("This room must be sacred, since you have recovered so quickly.");

      story("You get on your legs and leave bearing more teasure than you have imagined.");
    } else {
      story("Worried by a trap or curse tied with the treasure, you continue onward.");

      story("Survival over treasure seems the best strategy to you.");
    }
  }
コード例 #4
0
ファイル: DNO.java プロジェクト: Tlmader/dno
  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();
    }
  }
コード例 #5
0
ファイル: DNO.java プロジェクト: Tlmader/dno
  public static void eventTreasure() {

    story("Walking further down the dungeon's dark halls, you encounter a tiny chest.");

    story(
        "It sits upon a peculiar stone pedestal bearing engravings of unfamiliar creatures, brightly lit by burning torches.");

    story("Your curiosity tells you to open the chest, but you remain extremely cautious.");

    story("You could OPEN the chest, IGNORE it, or CHECK the surroundings for traps.");
    c1 = "open";
    c2 = "ignore";
    c3 = "check";
    decision = decisionProcess(c1, c2, c3);

    if (decision == 1) {
      randomStory = randomizer(10);
      if (randomStory < 5) {
        story(
            "As you open the chest, you hear a clicking noise, and an arrow shoots to your knee!");

        story("You scream in pain, quickly hushing yourself in case something hears you.");
        randomMod = randomizer(10) * -1;
        player.hpMod(randomMod);
      } else if (randomStory >= 5) {
        randomMod = randomizer(40) + 10;
        story(
            "You open the chest, revealing a pile of "
                + randomMod * player.getGoldFind()
                + " gold! You sigh in relief as you pocket the shinies.");
        player.goldMod(randomMod);
      }
    } else if (decision == 2) {
      story("You decide to resist the temptations of treasure and continue down the path.");
      player.willMod(1);
    } else if (decision == 3) {
      story("You dilligently search the surroundings for any sort of dangers.");
      randomMod = randomizer(10);

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

        story(
            "To your expectatons, you spot an arrow trap against the wall, aiming to where one would stand to open the chest.");

        story("You open the chest from the opposite side, triggering the trap without harm.");
        randomMod = randomizer(100);

        story(
            "The chest contains a pile of "
                + randomMod * player.getGoldFind()
                + " gold! You smugly pocket the treasure, having outsmarted the dungeon's follies.");
        player.goldMod(randomMod);
        player.cunMod(1);
      } else if (randomStory > player.getCun()) {
        story(
            "However, you accidentally trigger a pressure plate on the ground, springing an arrow trap! Your shoulder is met with the piercing of an arrowhead.");
        randomMod = randomizer(10);
        player.hpMod(randomMod * -1);
      }
    }
  }