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

    MonsterBattle spider = new MonsterBattle(10, 3, 20, "Cave Spider");

    story("As you travel through the dungeon, you encounter a large room.");

    story("...!");

    story("To your surprise, your face is met by the touch of a massive web!");

    story("You quickly struggle to get the web off...");

    story("Suddenly, you are met with glowing red eyes!");

    spider.battle();

    story("Another, larger spider crawls towards you! Will you LAST another fight or FLEE?");
    c1 = "last";
    c2 = "flee";
    decision = decisionProcess(c1, c2);

    if (decision == 1) {

      spider = new MonsterBattle(15, 3, 40, "Giant Spider");
      spider.battle();

      story(
          "Having bested the eight-legged beasts, you victoriously tear though the dense webbing.");

      story("To your surprise, you spot a mysterious potion trapped in the webs!");

      story("Do you wish to DRINK it or LEAVE it be?");
      c1 = "drink";
      c2 = "leave";
      decision = decisionProcess(c1, c2);

      if (decision == 1) {
        randomStory = randomizer(2);

        if (randomStory == 1) {
          story(
              "You down the entire bottle, and feel your various injuries quickly repairing themselves!");
          player.hpMod(randomizer(10) + 10);
        } else {
          story("You down the entire bottle... Ouch! You feel your insides burning up!");

          story("Maybe you shouldn't drink out of random bottles.");
          player.hpMod((randomizer(5) + 5) * -1);
        }
      } else {
        story("You ignore the unknown fluid and proceed out of the web-covered room.");
      }
    } else {
      story("You flee, hoping to find another route through the dungeon!");
    }
  }
コード例 #2
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.");
    }
  }
コード例 #3
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);
    }
  }
コード例 #4
0
ファイル: DNO.java プロジェクト: Tlmader/dno
  public static void eventMonsterSkeleton() {

    MonsterBattle skeleton = new MonsterBattle(20, 7, 50, "Skeleton Warrior");

    story("You notice a strange shadow on the floor of the hallway. Something is there!");

    story("An armed, spooky, scary skeleton blocks your path!");

    story("It charges towards you, making rattling noises with every step!");

    skeleton.battle();

    story("You emerge triumphant over the pile of bones. Nothing can stop you... right?");
  }