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); } }
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); } } }