A B C D E F G H I K L M N O P Q R S T U V W 

A

accuracy - Variable in class Weapon
 
action() - Method in class DieEvent
This method kills the player and ends the game upon being activated.
action() - Method in class DisappearEvent
This method is used to execute the disappearance of an object, causing it to be removed from all rooms and inventories.
action() - Method in class DropEvent
This method executes a drop event, removing an item from the player's inventory and adding it to their current room.
action() - Method in class Event
This abstract method does the action associated with the event.
action() - Method in class ScoreEvent
This method parses the eventStr to a number and adds the number to the player score (or deducts the number if it is negative)
action() - Method in class TeleportEvent
This method is used to run all operations needed by this command which entails moving the user from one area to another.
action() - Method in class TransformEvent
This method parses the eventStr and removes the item referenced first and replaces it with the item referenced second
action() - Method in class UpgradeEvent
This method is used to run all things needed by the event entailed.
action() - Method in class WinEvent
Displays the event string to the player and exits the game
action() - Method in class WoundEvent
This method reduces player health and notifies the player she/he has been wounded Also it checks if health is zero or less, in which case the player dies and exits from the game
actions - Variable in class Item
 
add(Item) - Method in class Dungeon
This method adds an item to the dungeon's storage.
add(Item) - Method in class Room
This method is used to add an item to the list of items in the room.
add(Room) - Method in class Dungeon
This method is used to add a room to the dungeon's storage.
addAreaWeapon(AreaWeapon) - Method in class Dungeon
This method adds an area of effect weapon to the dungeon.
addArmor(Armor) - Method in class Dungeon
This method adds a piece of armor to the dungeon's list of armors.
addExit(Exit) - Method in class Room
This method is used to add an exit to the arraylist of exits.
addItemToInventory(Item) - Method in class NPC
This method takes an item and adds it to an NPC's inventory.
addNPC(NPC) - Method in class Dungeon
Adds a new NPC to the dungeon's record of them.
addToInventory(Item) - Method in class GameState
Adds an item to the adventuer's inventory.
addWeapon(Weapon) - Method in class Dungeon
This method adds a weapon to the dungeon list of weapons.
adjustCash(int) - Method in class GameState
This method adds/removes an amount of cash to/from the adventurer.
adjustDR(int) - Method in class Combatant
This method is used to adjust the Combatant's damage resistance.
adjustHealth(int) - Method in class GameState
This method wounds or heals the adventurer by a certain amount of hitpoints.
adjustHelath(int) - Method in class Combatant
This method adjusts an NPC's health when they take damage or heal.
adjustScore(int) - Method in class GameState
This method is used to increase the user's score by the passed in amount.
ADVENTURER_MARKER - Static variable in class GameState
 
adventurersCurrentRoom - Variable in class GameState
 
aliases - Variable in class Item
 
AreaWeapon - Class in <Unnamed>
This class represents a consumable area of effect weapon such as a grenade or a spell.
AreaWeapon(Scanner) - Constructor for class AreaWeapon
This constructor takes in a scanner that iterates through a .zork file and instantiates an area of effect weapon.
areaWeapons - Variable in class Dungeon
 
Armor - Class in <Unnamed>
This class represents a suit of armor that can be worn by the player during gameplay, increasing their damage resistance.
Armor(Scanner) - Constructor for class Armor
This constructor takes in a scanner and iterates through a .zork file instantiating armor pieces as it reads them.
armorPen - Variable in class Weapon
 
armors - Variable in class Dungeon
 
armorShred - Variable in class AreaWeapon
 
associatedQuest - Variable in class Combatant
 
associatedQuest - Variable in class QuestItem
 
AttackCommand - Class in <Unnamed>
This class reperesents a command that the player issues to make an attack during combat, thereby simulating one round of combat.
AttackCommand(String) - Constructor for class AttackCommand
This method instantiates an AttackCommand using a string of user input.
attackMessage - Variable in class AreaWeapon
 
attackMessage - Variable in class Weapon
 

B

beenHere - Variable in class Room
 
bogusCommand - Variable in class UnknownCommand
 
buy(String) - Method in class TradeCommand
This method checks if the NPC has itemName for sale and how much it costs It verifies that the player has enough money to purchase it and he can carry it If so then the players money is reduced by the amount and the item added to player inventory

C

calculatePlayerDamageToEnemy(Weapon, Combatant) - Method in class CombatManager
This method calculates the amount of damage a player's attack dealt to an enemy.
cash - Variable in class GameState
 
cashReward - Variable in class Quest
 
Civilian - Class in <Unnamed>
This class represents civilain NPCs, which in the current version is solely consisted of Traders and Technicians.
Civilian(Scanner) - Constructor for class Civilian
This method instantiates a civilian NPC using a scanner object.
Combatant - Class in <Unnamed>
 
Combatant(String, int, float, int, Weapon, String[]) - Constructor for class Combatant
This constructor is used for manual instantiaton of an enemy, that way they can be procedurally generated by NPCFactory when the player enters a combat zone.
Combatant(Scanner) - Constructor for class Combatant
This constructor is used to create a combatant by reading one in from a .zork file.
CombatManager - Class in <Unnamed>
This class is used simulate the combat between the player and hostile NPC's.
CombatManager() - Constructor for class CombatManager
 
Command - Class in <Unnamed>
This is an abstract class used as the framework for all commands.
Command(String) - Constructor for class Command
This method is used as a super constructor to the command sub-classes.
CommandFactory - Class in <Unnamed>
This is a factory class used to parse a string of user input and instantiate and return the matching command type.
CommandFactory() - Constructor for class CommandFactory
Constructor for the command factory.
commandStr - Variable in class Command
 
conductCombat(String) - Method in class CombatManager
This method is used to conduct one round of combat between the player and enemies in the room.
constituiton - Variable in class GameState
 
contents - Variable in class Room
 
CONTENTS_STARTER - Static variable in class Room
 
CURRENT_ROOM_LEADER - Static variable in class GameState
 
currentHP - Variable in class GameState
 
currentState - Variable in class CombatManager
 

D

damage - Variable in class AreaWeapon
 
damage - Variable in class Weapon
 
damageResist - Variable in class GameState
 
DEFAULT_SAVE_FILENAME - Static variable in class SaveCommand
 
desc - Variable in class Room
 
describe() - Method in class Exit
This method is used to describe the current exit and which direction the user would take to go there.
describe() - Method in class Room
This method is used to return the full description of a room when a new room is entered.
describe(boolean) - Method in class Room
This method is used to give the full description or the partial description of the room depending if the user has been to that room.
description - Variable in class Item
 
dest - Variable in class Exit
 
dexterity - Variable in class GameState
 
didEnemyHitPlayer() - Method in class CombatManager
This method is used to determine whether or not the user hit an enemy when launching an attack.
didPlayerHitEnemy(Weapon, Combatant) - Method in class CombatManager
This method determines whether or not an enemy NPC hit the player when they attack during combat.
DieEvent - Class in <Unnamed>
This class represents is an event that is instantiated upon player death.
DieEvent(String) - Constructor for class DieEvent
This method is used to instantiate a death event.
dir - Variable in class Exit
 
DisappearEvent - Class in <Unnamed>
This class represents an event that causes an item to disappear altogether from a dungeon.
DisappearEvent(String) - Constructor for class DisappearEvent
This method is used to create a disappear event given a string.
dodge - Variable in class Combatant
 
dodge - Variable in class GameState
 
dr - Variable in class Armor
 
DR - Variable in class Combatant
 
DropCommand - Class in <Unnamed>
This class represents a command issued by the user to drop a particular item.
DropCommand(String) - Constructor for class DropCommand
This method is used to instantiate a dropCommand with a string of user input.
DropEvent - Class in <Unnamed>
 
DropEvent(String) - Constructor for class DropEvent
This method instantiates a drop event using a given string.
dungeon - Variable in class GameState
 
Dungeon - Class in <Unnamed>
This class represents a dungeon with it's own unique set of rooms, items, enemies, flavor, etc.
Dungeon(String) - Constructor for class Dungeon
This method builds a fresh dungeon from a .zork file.
Dungeon(String, boolean) - Constructor for class Dungeon
This method builds a dungeon from a .zork file by iterating through it with a scanner and instantiating the rooms, exits, items, and other game components.
Dungeon(String, Room) - Constructor for class Dungeon
This method is used to create a dungeon by hand using a name and an entry room.
Dungeon.IllegalDungeonFormatException - Exception in <Unnamed>
Exception subclass that is used to indicate a flaw in a .zork file during dungeon creation.

E

endText - Variable in class Quest
 
enemies - Variable in class Room
 
enemyConventionalAttack(Combatant) - Method in class CombatManager
This method is used to simulates an opponent's attack on the player during one round of combat.
entry - Variable in class Dungeon
 
EquipCommand - Class in <Unnamed>
This class represents a command by the user to put on a piece of equipment so it can be used durign combat.
EquipCommand(String) - Constructor for class EquipCommand
This method takes in a string and instantiates an equip command.
equippedArmor - Variable in class GameState
 
equipWeapon(String, String) - Method in class GameState
This method takes a weapon name and a position name a
Event - Class in <Unnamed>
This is an abstract class that is used as a template for events.
Event(String) - Constructor for class Event
This method creates an event by taking in a string and storing it within the object.
EventFactory - Class in <Unnamed>
This class is a factory used to create events by taking in a string, parsing it, and determining what the appropriate event is for that string.
EventFactory() - Constructor for class EventFactory
Constructor for the event factory.
eventStr - Variable in class Event
 
eventStr - Variable in class TeleportEvent
 
execute() - Method in class AttackCommand
This method executes an attack command after it's been issued, and returns a string indicating how the attack went.
execute() - Method in class Command
This method determines what should be done by a command, does it, and then returns a string with the results.
execute() - Method in class DropCommand
This method executes a dropCommand, removing an item from the player's inventory and adding it to the current room.
execute() - Method in class EquipCommand
This method is used to execute an equip command by equipping a weapon or piece of armor.
execute() - Method in class FindWorkCommand
This method assigns the quest associated with the room the adventurer is standing in.
execute() - Method in class HealthCommand
This method executes the health command by returning a phrase that gives a general idea of their character's health.
execute() - Method in class InventoryCommand
This method executes the inventory command, showing the user their inventory.
execute() - Method in class ItemSpecificCommand
This method is used to run a command that is specifc to an item and print the message for that command.
execute() - Method in class LookCommand
This method is used to give a description of the user's current room.
execute() - Method in class MovementCommand
This method executes a movement command, moving the adventurer from one room to another in a specific direction.
execute() - Method in class OpenCommand
This method executes an openCommand by attempting to open an exit with a key.
execute() - Method in class PickCommand
This method executes a pick lock command on a specific exit.
execute() - Method in class RetreatCommand
This method is used to run all neccesary operations by this command.
execute() - Method in class SaveCommand
This method is used to run all operations needed by this commmand by saving the given name to a file of the same name.
execute() - Method in class ScoreCommand
This method is used to do all of the needed abilities of this command by calculating the score of the user and returning it to the screen.
execute() - Method in class TakeCommand
This method executes the propose of Taking an object from any area.
execute() - Method in class TradeCommand
This method is figures out whether the player wants to buy and item or sell an item or ask for inventory and calls the relevant method to execute
execute() - Method in class UnknownCommand
This method is used to return an incorrect command being entered by the user.
execute() - Method in class ViewCommand
This method is used to run all operations needed for this command.
execute() - Method in class WeightCommand
This method is used to run all operations needed to be done by this command.
Exit - Class in <Unnamed>
This class represents an exit from one room to another.
Exit(String, Room, Room, boolean, Item, int) - Constructor for class Exit
This method is a manual constructor for an Exit that takes in values for each individual attribute and sets them accordingly.
Exit(Scanner, Dungeon) - Constructor for class Exit
Given a Scanner object positioned at the beginning of an "exit" file entry, read and return an Exit object representing it.
Exit.NoExitException - Exception in <Unnamed>
This is an exception subclass that is used to indicate the end of the exits section in a .zork file.
exits - Variable in class Room
 
EXITS_MARKER - Static variable in class Dungeon
 

F

filename - Variable in class Dungeon
 
FILENAME_LEADER - Static variable in class Dungeon
 
FindWorkCommand - Class in <Unnamed>
This class represents a command issued by the user to take the quest tied to the room they are currently occupying.
FindWorkCommand(String) - Constructor for class FindWorkCommand
This constructor instantiates a FindWork command using a string entered by the user.
formatGood(Item) - Method in class Civilian
This method takes in an item and formats a string to be presented to the user when they view the goods that can be bought or upgraded by this NPC.

G

GameState - Class in <Unnamed>
This class is used to indicate the current state of the game.
GameState() - Constructor for class GameState
This is used to set a default version of the Gamestate that has an inventory of items
GameState.IllegalSaveFormatException - Exception in <Unnamed>
This class extends exception and is thrown is used when the file being read fromGameState.restore(java.lang.String) is formatted incorrectly.
generateEnemies() - Method in class NPCFactory
This method generates a random number of enemies upon the adventurer entering a combat area.
getAccuracy() - Method in class Weapon
Returns the accuracy of the Weapon
getAction(String) - Method in class Weapon
Returns the Action of a weapon
getActionForVerb(String) - Method in class Item
This method invokes events that have in-game effects caused by item-specifc commands.
getAdventurersCurrentRoom() - Method in class GameState
This method returns the room that the player is currently in.
getAdventurersCurrentWeight() - Method in class GameState
This method is used to find the weight of everything in the adventurer's inventory.
getAP() - Method in class Weapon
Returns the Armor pen of the weapon
getAreaWeapon(String) - Method in class Dungeon
This method takes in a string and returns the area of effect weapon with the matching name.
getAreaWeapons() - Method in class Dungeon
This method returns an array of the Area of Effect Weapons within this dungeon.
getArmor() - Method in class GameState
This method returns the piece of armor that the adventurer is currently wearing.
getArmor(String) - Method in class Dungeon
This method returns an armor piece matching the given name.
getArmors() - Method in class Dungeon
This method returns an array of the armors within this dungeon.
getArmorShred() - Method in class AreaWeapon
This method returns the amount of damage resistance that is permanently removed from enemies upon this weapon's use.
getAssociatedQuest() - Method in class QuestItem
This method returns the Quest that is associated with this item.
getAttackMessage() - Method in class AreaWeapon
This method returns the String that is printed when this weapon is used.
getAttackMessage() - Method in class Weapon
Returns the attack message of the weapon
getCash() - Method in class GameState
This method returns the amount of cash the adventurer currently has.
getCashReward() - Method in class Quest
This method returns the amount of cash the player is awareded upon quest completion.
getCivilian(String) - Method in class Room
 
getConstitution() - Method in class GameState
This method returns the adventurer's consitution stat.
getContents() - Method in class Room
.
getCurrentHP() - Method in class GameState
This method is used to retrieve the user's health at any point in time, represented as an integer.
getDamage() - Method in class AreaWeapon
This method returns the amount of damage that is dealt to each enemy by an area of effect weapon upon being used.
getDamage() - Method in class Weapon
Returns the damage of the Weapon
getDescription() - Method in class Item
This method returns the description of the item, a small passage of flavor text that gives the player an idea of what the item looks like.
getDest() - Method in class Exit
This method is used to find the destination room of the exit.
getDexterity() - Method in class GameState
This method returns the adventurer's dexterity stat.
getDir() - Method in class Exit
This method retrieves the direction an exit goes in.
getDodge() - Method in class Combatant
This method returns an enemy combatant's chance to dodge a player attack.
getDodge() - Method in class GameState
This method returns the adventurer's chance to doge an attack as a float.
getDR() - Method in class Armor
This method is used to return the amount of bonus damage resistance the player receives while wearing this suit of armor.
getDR() - Method in class Combatant
This method returns the damage resistance of an enemy combatant.
getDR() - Method in class GameState
This method returns the adventurer's damage resistance.
getDungeon() - Method in class GameState
This method returns the dungeon that is currently being played.
getEndText() - Method in class Quest
This method returns the text that is printed when the player finishes a quest.
getEnemy(String) - Method in class Room
 
getEntry() - Method in class Dungeon
This method returns the room the adventurer spawns in when starting a new dungeon playthrough.
getFilename() - Method in class Dungeon
This returns the name of the zork file used for instantiation of the dungeon.
getHealth() - Method in class Combatant
This method returns the current amount of health on the combatant.
getInventoryNames() - Method in class GameState
This method is used to retrieve the names of every item in the adventurer's inventory.
getItem(String) - Method in class Dungeon
This method returns the Item whose name is passed.
getItemFromInventory(String) - Method in class NPC
This method returns the first item in an NPC's inventory that goes by a given name (primary name or alias).
getItemFromInventoryNamed(String) - Method in class GameState
This method takes in a desired item's name as a string and returns the first item in the adventurer's inventory that has the string as either the primary name or an alias.
getItemInVicinityNamed(String) - Method in class GameState
This method checks and returns the matching item that is either within the adventuer's inventory or, barring that, their current room.
getItemNamed(String) - Method in class Room
This method is used to get the item being called by its specific name
getKey() - Method in class Exit
This method is used to retrieve the item that acts as a key to unlocking this exit.
getLockLevel() - Method in class Exit
This method returns the level of the lock on this exit.
getMaxHP() - Method in class GameState
This method is used to retrieve the maximum HP that the adventurer can have at any time.
getMessageForVerb(String) - Method in class Item
This method returns a message that the game prints when the user enters in an item-specific command.
getMode() - Method in class GameState
This method returns the mode that the game is currently in.
getName() - Method in class Dungeon
This method returns the title of the dungeon.
getName() - Method in class NPC
This method is used to get the name of the NPC.
getName() - Method in class Quest
This method returns the name of a quest.
getNPC(String) - Method in class Dungeon
This method returns an NPC with the given name.
getPerception() - Method in class GameState
This method returns the adventurer's perception stat.
getPrimaryName() - Method in class Item
This method is used to get the primary name of the item.
getPrimaryWeapon() - Method in class GameState
This method returns the weapon that is currently equipped in the adventurer's primary weapon slot.
getQuest() - Method in class Combatant
This method returns the quest that the combatant is the target of.
getRoF() - Method in class Weapon
Returns the RoF of the Weapon
getRoom(String) - Method in class Dungeon
This method returns a room given it's title.
getRooms() - Method in class Dungeon
Returns an array of the rooms stored within this dungeon.
getScore() - Method in class GameState
This method retrieves the adventurer's current score as an int.
getScoreReward() - Method in class Quest
This method returns the amount of score that the user is awarded upon completion of this quest.
getSecondaryWeapon() - Method in class GameState
This method returns the weapon that is currently equipped in the advenuter's seondary weapon slot.
getSrc() - Method in class Exit
This method is used to find the source room of the exit.
getStage() - Method in class Quest
This method returns the current stage the quest is at.
getStartText() - Method in class Quest
This method returns the text that is printed when the player is first assigned a quest.
getStrength() - Method in class GameState
This method returns the adventurer's strength stat.
getTarget() - Method in class Quest
This method returns the name of the target of the quest.
getTargetRoom() - Method in class Quest
This method returns the name of the room where the quest's target will be spawned.
getTechnician() - Method in class Civilian
This method returns whether or not the NPC is a technician who can upgrade items.
getTier() - Method in class Combatant
This method returns the tier of a given enemy.
getTier() - Method in class Weapon
Returns the tier of the weapon
getTitle() - Method in class Room
This method is used to get the title of the room object being called upon
getTradeGoods() - Method in class Civilian
This method returns a multi-line string showing all the goods a trader has for sale or that a technician can upgrade.
getTrader() - Method in class Civilian
This method returns whether or not the NPC is a trader who can sell goods.
getType() - Method in class Weapon
Returns the type of the weapon.
getUpgradeCost() - Method in class Armor
This method is used to return the cost in cash of upgrading this piece of armor.
getUpgradeCost() - Method in class Weapon
Returns the Upgrade Cost of the Weapon.
getWeapon() - Method in class Combatant
This returns the weapon the combatant uses when they attack a player.
getWeapon(String) - Method in class Dungeon
This method returns a conventional weapon (not an area of effect one) from the dungeon given it's name.
getWeapons() - Method in class Dungeon
This method returns an array of the weapons within this dungeon.
getWeight() - Method in class Item
This method is used to get the weight of an item and return it to the user.
goesBy(String) - Method in class Item
This method accepts a string and checks if the given item goes by it.

H

health - Variable in class Combatant
 
HealthCommand - Class in <Unnamed>
This class represents a command by the user to check the current state of their character.
HealthCommand(String) - Constructor for class HealthCommand
This constructor instanatiates a health command after being passed a string of user input.

I

IllegalDungeonFormatException(String) - Constructor for exception Dungeon.IllegalDungeonFormatException
 
IllegalSaveFormatException(String) - Constructor for exception GameState.IllegalSaveFormatException
 
init() - Method in class Dungeon
This method inititates a newly created dungeon upon being called.
init() - Method in class Exit
This method is used for common object initialization tasks
init() - Method in class Room
This method stores the basic variables used in the room constructor.
initialize(Dungeon) - Method in class GameState
This method intializes the gamestate by getting the dungeon being played and setting the adventurer's current room to the entry.
instance() - Static method in class CommandFactory
This method is used to access the command factory.
instance() - Static method in class EventFactory
This method is used to access the event factory.
instance() - Static method in class GameState
This method is used to access the single instance of gamestate.
instance() - Static method in class NPCFactory
This method is used to retrieve the single instance of the NPCFactory.
Interpreter - Class in <Unnamed>
This is the interpreter class that serves as the interface for the user.
Interpreter() - Constructor for class Interpreter
 
inventory - Variable in class GameState
 
inventory - Variable in class NPC
 
inventory() - Method in class TradeCommand
This method returns the inventory available for sale
INVENTORY_LEADER - Static variable in class GameState
 
InventoryCommand - Class in <Unnamed>
This class is a Command for inventory.
InventoryCommand(String) - Constructor for class InventoryCommand
This constructor creates an inventory command, showing the user's inventory.
isTechnician - Variable in class Civilian
 
isTrader - Variable in class Civilian
 
Item - Class in <Unnamed>
This class is used to set up all iteractions a user can interact with items.
Item() - Constructor for class Item
This is a generic constructor so that the subclasses of item (Armor, Weapon, AreaWeapon, and QuestItem) can still be constructed using a scanner.
Item(Scanner) - Constructor for class Item
This is the standard constructor for an item of a standard type.
Item.NoItemException - Exception in <Unnamed>
 
itemName - Variable in class DropCommand
 
items - Variable in class Dungeon
 
ITEMS_MARKER - Static variable in class Dungeon
 
ItemSpecificCommand - Class in <Unnamed>
This class represents a command that is specific to an item.
ItemSpecificCommand(String) - Constructor for class ItemSpecificCommand
This method is a subconstructor of Command which is used for commands specific to an item.

K

key - Variable in class Exit
 

L

leaveBy(String) - Method in class Room
This method is used to check if the direction entered has a valid exit.
lockLevel - Variable in class Exit
 
LookCommand - Class in <Unnamed>
This is a subclass of command that is used to get the description of the room the player is standing in or the description of an item within the room or their inventory.
LookCommand(String) - Constructor for class LookCommand
This is the constructor for a look Command.

M

main(String[]) - Static method in class Interpreter
This method is the start point for a game of Zork and serves as the general interface point for the user.
maxHP - Variable in class GameState
 
messages - Variable in class Item
 
mode - Variable in class GameState
 
MovementCommand - Class in <Unnamed>
This class is a subclass of command that is used to move the adventurer between rooms.
MovementCommand(String) - Constructor for class MovementCommand
This constructor is used to create a movement command.

N

name - Variable in class Dungeon
 
name - Variable in class NPC
 
name - Variable in class Quest
 
NoExitException() - Constructor for exception Exit.NoExitException
 
NoItemException() - Constructor for exception Item.NoItemException
 
NoNPCException() - Constructor for exception NPC.NoNPCException
 
NoQuestException() - Constructor for exception Quest.NoQuestException
 
NoRoomException() - Constructor for exception Room.NoRoomException
 
NPC - Class in <Unnamed>
 
NPC() - Constructor for class NPC
 
NPC.NoNPCException - Exception in <Unnamed>
 
NPCFactory - Class in <Unnamed>
 
NPCFactory() - Constructor for class NPCFactory
This method is used to build the instance of this class if it hasn't already been created.

O

onComplete() - Method in class Quest
This method completes the actions that occur after a user has completed a quest, including rewarding them their cash and score.
onDeath() - Method in class NPC
This method performs a couple of tasks that should be done when an enemy dies.
onPickup() - Method in class QuestItem
This method is intended to update this item's associated quest's stage when the player picks it up.
onRemove() - Method in class QuestItem
This method is intended to update this item's associated quest's stage if the user loses the item for any reason.
open - Variable in class Exit
 
open() - Method in class Exit
This method sets an exit to open allowing the adventurer to pass through it.
OpenCommand - Class in <Unnamed>
 
OpenCommand(String) - Constructor for class OpenCommand
This constructor takes in an "open [direction]" string to instantiate this command.

P

parse(String) - Method in class CommandFactory
This method parses a string and returns the correspong command type.
parse(String) - Method in class EventFactory
This method parses a string and returns the corresponding event type.
perception - Variable in class GameState
 
PickCommand - Class in <Unnamed>
 
PickCommand(String) - Constructor for class PickCommand
This method instantiates a pickCommand by taking in a string with the format of "pick [direction of exit]"
playerAreaAttack(String) - Method in class CombatManager
This method is used to simulate a player attack using an area of effect weapon such as a grenade or a spell.
playerConventionalAttack(String, String) - Method in class CombatManager
This method is used to simulate an attack by the player using a standard weapon (not area of effect) during combat.
primaryName - Variable in class Item
 
primaryWeapon - Variable in class GameState
 
promptUser(Scanner) - Static method in class Interpreter
This method is used to correctly return the next command to be entered in by the user.

Q

Quest - Class in <Unnamed>
 
Quest(Scanner) - Constructor for class Quest
This constructor takes in a scanner object and instantiates a quest by reading it in from a .zork file.
Quest.NoQuestException - Exception in <Unnamed>
 
QuestItem - Class in <Unnamed>
 
QuestItem(Scanner) - Constructor for class QuestItem
This method takes in a scanner and instantiates a quest item by reading the attributes from a .zork file.
quests - Variable in class Dungeon
 

R

remove(Item) - Method in class Room
This method is used to remove an item from the list of the items in the room.
removeFromInventory(Item) - Method in class GameState
This method removes an item from the adventurer's inventory.
removeItemFromInventory(Item) - Method in class NPC
This method removes an item from an NPC's inventory.
restore(String) - Method in class GameState
This method takes the name of a .sav file and iterates through it, restoring the dungeon, rooms, exits, quests and other variables.
restore(Scanner) - Method in class Exit
This method restores the exit to it's proper state upon being read in from a .sav file.
restoreState(Scanner) - Method in class Dungeon
This method takes a scanner and restores the dungeon's state from a save file.
restoreState(Scanner, Dungeon) - Method in class Room
This method is used to restore the state of the dungeon being passed in by the user.
retreat() - Method in class CombatManager
This method is used when the player attempts to retreat from combat.
RetreatCommand - Class in <Unnamed>
This class is used when the user calls to retreat from a battle.
RetreatCommand(String) - Constructor for class RetreatCommand
This constructor is used to set up a standard version of this command for common use.
RoF - Variable in class Weapon
 
Room - Class in <Unnamed>
This class is to set up a significant portion of the running code and then moving in and out of this class to move the user around.
Room(String) - Constructor for class Room
This constructor is the default constructor for this class and uses a title and Room.init()
Room(Scanner, Dungeon) - Constructor for class Room
 
Room(Scanner, Dungeon, boolean) - Constructor for class Room
Given a Scanner object positioned at the beginning of a "room" file entry, read and return a Room object representing it.
ROOM_STATES_MARKER - Static variable in class Dungeon
 
Room.NoRoomException - Exception in <Unnamed>
This is an exception subclass that checks to see if the file being read from the file
rooms - Variable in class Dungeon
 
ROOMS_MARKER - Static variable in class Dungeon
 

S

SAVE_FILE_EXTENSION - Static variable in class GameState
 
SAVE_FILE_VERSION - Static variable in class GameState
 
SaveCommand - Class in <Unnamed>
This class is used to save a instance of the game being played at the time.
SaveCommand(String) - Constructor for class SaveCommand
This constructor is used to set up a standard version to set the filename by giving the file either a default file name or one based off of user input.
saveFilename - Variable in class SaveCommand
 
score - Variable in class GameState
 
score - Variable in class ScoreCommand
 
ScoreCommand - Class in <Unnamed>
This command is used to calculate the score of the user
ScoreCommand(String) - Constructor for class ScoreCommand
This method is a constructor for the score to set the starting score of the user.
ScoreEvent - Class in <Unnamed>
This class is used to find the score given from an event which is gifted to the user.
ScoreEvent(String) - Constructor for class ScoreEvent
This method is used to set the standard event for score based on the original event.
scoreReward - Variable in class Quest
 
SECOND_LEVEL_DELIM - Static variable in class Dungeon
 
secondaryWeapon - Variable in class GameState
 
sell(String) - Method in class TradeCommand
This method verifies that the player is holding the item If so the item is removed from player inventory and money is increased by the sale price
setAdventurersCurrentRoom(Room) - Method in class GameState
Sets the room the adventurer is currently in to whatever is passed in.
setDesc(String) - Method in class Room
This method is used to take the properly red file read description and set it to the description of the room
setMode(String) - Method in class GameState
This method sets the mode that the game is currently in.
setStats(int[]) - Method in class GameState
This method accepts an array of integers to set the strength, constitution, perception, and dexterity stats respectively.
specialNPCs - Variable in class Dungeon
 
src - Variable in class Exit
 
stage - Variable in class Quest
 
startText - Variable in class Quest
 
state - Static variable in class Interpreter
 
store(PrintWriter) - Method in class Exit
This method takes in a printwriter and writes the state of the exit to a .sav file when the game is saved.
store(String) - Method in class GameState
 
storeState(PrintWriter) - Method in class Dungeon
This method uses a printwriter to store the state of the dungeon during the process of saving.
storeState(PrintWriter) - Method in class Room
Store the current (changeable) state of this room to the writer passed.
strength - Variable in class GameState
 

T

TakeCommand - Class in <Unnamed>
This class is used to pick up an item from an area that the user is currently in.
TakeCommand(String) - Constructor for class TakeCommand
This method is a subconstructor of the command class.
target - Variable in class Quest
 
targetRoom - Variable in class Quest
 
TeleportEvent - Class in <Unnamed>
This class is used to move the user from his/her/zhe current location to a new one.
TeleportEvent(String) - Constructor for class TeleportEvent
 
theInstance - Static variable in class CommandFactory
 
theInstance - Static variable in class EventFactory
 
theInstance - Static variable in class GameState
 
theInstance - Static variable in class NPCFactory
 
tier - Variable in class Combatant
 
tier - Variable in class Weapon
 
title - Variable in class Room
 
TOP_LEVEL_DELIM - Static variable in class Dungeon
 
toString() - Method in class Item
This method formats a string for the item returning all the relevant information, including it's name, aliases, description, and weight.
TradeCommand - Class in <Unnamed>
This class is used to trade objects between a NPC and a user.
TradeCommand(String) - Constructor for class TradeCommand
This is to set up a standard constructor for this command, which is most commonly called by "Trade"
TransformEvent - Class in <Unnamed>
This class is used to transform on item into another based on an upgrade or an event happening to it.
TransformEvent(String) - Constructor for class TransformEvent
This is used to set up a standard event for this class which is called by an upgrade event.
type - Variable in class Weapon
 

U

UnknownCommand - Class in <Unnamed>
 
UnknownCommand(String) - Constructor for class UnknownCommand
 
updateStage(int) - Method in class Quest
This method is used to update the stage of the quest after the player takes certain actions, such as killing the target NPC, or being assigned the quest.
upgradeCost - Variable in class Armor
 
upgradeCost - Variable in class Weapon
 
UpgradeEvent - Class in <Unnamed>
This class is a Command that upgrades weapons and armor.
UpgradeEvent() - Constructor for class UpgradeEvent
 
UpgradeEvent(String) - Method in class UpgradeEvent
This is a specilized constructor for an event
USAGE_MSG - Static variable in class Interpreter
 

V

view - Variable in class ViewCommand
 
ViewCommand - Class in <Unnamed>
 
ViewCommand(String) - Constructor for class ViewCommand
This constructor is used to set up the specifc constructor for this command.

W

weapon - Variable in class Combatant
 
Weapon - Class in <Unnamed>
This class makes an object of Weapon that extends item.Every weapon has a type, an upgrade cost, damage it can do, accuracy, RoF, armorPen, the attck message, and its tier.
Weapon(Scanner) - Constructor for class Weapon
This is the constructor for Weapon and has a scanner.
weapons - Variable in class Dungeon
 
weight - Variable in class Item
 
weight - Variable in class WeightCommand
 
WeightCommand - Class in <Unnamed>
 
WeightCommand(String) - Constructor for class WeightCommand
 
WinEvent - Class in <Unnamed>
 
WinEvent(String) - Constructor for class WinEvent
 
WoundEvent - Class in <Unnamed>
 
WoundEvent(String) - Constructor for class WoundEvent
 
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links