From 0ad9098d2e0c31c37bc5908c282828d5038aa365 Mon Sep 17 00:00:00 2001 From: jslightham <31053827+jslightham@users.noreply.github.com> Date: Sat, 1 Jun 2019 01:04:16 -0400 Subject: [PATCH] final --- data/enemies.dat | 2 +- data/rooms.dat | 4 ++-- src/com/bayviewglen/zork/Game.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/enemies.dat b/data/enemies.dat index 6d9fc71..8bb8a66 100644 --- a/data/enemies.dat +++ b/data/enemies.dat @@ -11,5 +11,5 @@ Loot: Crowbar Enemy Name: DesLauriers The Dog Description: The cookie monster Starting Room: Kitchen -Damage Given: 40 +Damage Given: 30 Loot: Base \ No newline at end of file diff --git a/data/rooms.dat b/data/rooms.dat index ea24602..f0e9b95 100644 --- a/data/rooms.dat +++ b/data/rooms.dat @@ -4,7 +4,7 @@ New Room Description: You are in a circular room. The windows to the east are c Locked: false Boarded: false Items: Lightbulb, Candlestick -Riddler: "Hello there. My name is Kevin and I am Sir Pellatt's butler. I understand that my master
Sir Pellatt has wrongfully imprisoned you. If you answer my riddle I can give you something to
help you with your escape - nothing comes for free you know!", "What has a head a tail is brown and has no legs?", "A penny", Lockpick +Riddler: "Hello there. My name is Kevin and I am Sir Pellatt's butler. I understand that my master
Sir Pellatt has wrongfully imprisoned you. If you answer my riddle I can give you something to
help you with your escape - nothing comes for free you know!", "What has a head a tail is brown and has no legs?", "penny", Lockpick Exit Rooms: W-Apple Hallway Room name: Apple Hallway @@ -48,7 +48,7 @@ Room Description: You are now in Lady Pellatt's Bedroom. A four-poster bed with New Room Description: Locked: false Boarded: false -Items:Robes +Items: Robes Riddler: Exit Rooms: N-Sitting Area, S-Guest Bedroom, E-Bulb Room diff --git a/src/com/bayviewglen/zork/Game.java b/src/com/bayviewglen/zork/Game.java index a76a435..611ac3e 100644 --- a/src/com/bayviewglen/zork/Game.java +++ b/src/com/bayviewglen/zork/Game.java @@ -456,7 +456,7 @@ class Game { System.out.println(message + "\n\nHere's my riddle: " + riddle); System.out.print("Enter your guess here: "); String guess = rScanner.nextLine(); - if (guess.toLowerCase().equals(answer.toLowerCase())) { + if (guess.toLowerCase().indexOf(answer.toLowerCase()) >= 0) { Item prize = currentRoom.getRiddler().getPrize(); String prizeName = prize.getName(); System.out.println("Congratulations! You solved my riddle! As your reward, you get a " + prizeName + "!");