de.adom.jade.beings
Class PC

java.lang.Object
  extended by de.adom.jade.kernel.GUIDCarrier
      extended by de.adom.jade.kernel.DefaultActor
          extended by de.adom.jade.beings.Being
              extended by de.adom.jade.beings.PC
All Implemented Interfaces:
Actor, java.io.Serializable

public class PC
extends Being

Implements all the code for the player character.

See Also:
Serialized Form

Constructor Summary
PC(WorldMap map)
          Creates the PC.
 
Method Summary
 void doAct()
          Allows the PC to execute an action.
 boolean enterLocation(Connection connection)
          Enters the location at the current position of the being.
 java.lang.String getLogicalName()
          Returns the logical name for tbis being.
 void inform(java.lang.String information)
          Displays messages meant only for the PC.
protected  boolean isFirstPerson()
          Determines whether messages originating from this being use first person singular or third person singular word form.
protected  boolean isVisibleToImpl(Being being)
          Determines whether the PC currently is visible to the given being.
 java.lang.String you()
          Returns a text describing this being as the actor.
 
Methods inherited from class de.adom.jade.beings.Being
act, doMove, doWait, enterLocation, executeRepeatedCommand, getAttribute, getAttributeModifier, getCurrentHitPoints, getCurrentPowerPoints, getDV, getExperiencePoints, getGender, getLastUsedCommand, getLastX, getLastY, getLevel, getMap, getMaximumHitPoints, getMaximumPowerPoints, getMoves, getName, getNextActionEnergy, getPV, getRace, getSightRange, getSpeed, getX, getY, handleTimedStuff, initialize, initializeWordForms, install, isAlive, isBlind, isLastCommandRepeated, isOpenTile, isReadyToAct, isValid, isVisible, isVisibleTo, message, modifyCurrentHitPoints, modifyCurrentPowerPoints, modifyMaximumHitPoints, modifyMaximumPowerPoints, modifyNextActionEnergy, moveTo, observe, resetNextActionEnergy, setAttribute, setCurrentHitPoints, setCurrentPowerPoints, setGender, setLastUsedCommand, setMap, setMaximumHitPoints, setMaximumPowerPoints, setName, setPosition, setRace, updateDisplay, word, You, You
 
Methods inherited from class de.adom.jade.kernel.DefaultActor
actAgainAfter, getActionPoint, setActionPoint
 
Methods inherited from class de.adom.jade.kernel.GUIDCarrier
getGUID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PC

public PC(WorldMap map)
Creates the PC.

Parameters:
worldMap - the world map which contains the home town of the PC
Method Detail

doAct

public void doAct()
Allows the PC to execute an action. This is done by reading in the next command and taking the appropriate action.

Specified by:
doAct in class Being

getLogicalName

public java.lang.String getLogicalName()
Returns the logical name for tbis being. The logical name is intended to be used by the specific UI implementation to look up the correct graphical representation for the being in question. The logical name of the PC consists of the sequence pc.race.maxprofession, where race is the lower case name of the PC race (spaces are replaced by underscores) and maxprofession is the name of the highest level profession of the PC (if two professions have the same level, the first one after lexicographical sorting will be used). The profession name is converted in the same way as the race name.

Specified by:
getLogicalName in class Being
Returns:
the logical name of this being

isFirstPerson

protected boolean isFirstPerson()
Determines whether messages originating from this being use first person singular or third person singular word form.

Specified by:
isFirstPerson in class Being
Returns:
true

you

public java.lang.String you()
Returns a text describing this being as the actor.

Specified by:
you in class Being
Returns:
a text describing this being as the actor

isVisibleToImpl

protected boolean isVisibleToImpl(Being being)
Determines whether the PC currently is visible to the given being.

Specified by:
isVisibleToImpl in class Being
Parameters:
being - the being that tries to discern the PC
Returns:
a boolean flag determing whether the PC is visible to the given being or not

inform

public void inform(java.lang.String information)
Displays messages meant only for the PC.

Overrides:
inform in class Being
Parameters:
information - the personal information to display

enterLocation

public boolean enterLocation(Connection connection)
Description copied from class: Being
Enters the location at the current position of the being.

Overrides:
enterLocation in class Being
Parameters:
connection - the connection by which to enter the next location
Returns:
a boolean value indicating whether the location could be entered
See Also:
Being.enterLocation()