Java Universal Role Playing Engine Version 0.3.9

jurpe.characters
Class AbstractPC

java.lang.Object
  extended by jurpe.characters.AbstractPC
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<AbstractPC>
Direct Known Subclasses:
PC

public abstract class AbstractPC
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<AbstractPC>

AbstractPC is the super base class for all Playing Characters, either human or artificial.

See Also:
Serialized Form

Constructor Summary
AbstractPC()
           
 
Method Summary
 int compareTo(AbstractPC compareObject)
          Comparing function.
 CharacterAttributes getCharacterAttributes()
          Get Character Attributes of PC - name, height and such
 int getCurrentHP()
          Get character current hit points
 int getDamageResistance()
          Get Damage Resistance
 int getHT()
          Return character HEALTH points (HT)
 int getPassiveDefense()
          Get Passive Defense
 PrimaryStats getPrimaryStats()
          Return Primary Statistics of character (ST, DX, IQ and such)
 java.lang.String getShortDescription()
          Get character short description following this pattern: Name: ST,DX,IQ,HT/HTmax
 boolean isAI()
          Return true if this charater is controlled by Artificial Intelligence
 void setAI(boolean isAI)
          Set if this character is AI
 void setCharacterAttributes(CharacterAttributes attributes)
          Set character attributes (ST,IQ,DX,HT).
 void setDamageResistance(int damageRes)
          Set damage resistance
 void setPassiveDefense(int passiveDef)
          Set passive defense
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPC

public AbstractPC()
Method Detail

compareTo

public int compareTo(AbstractPC compareObject)
Comparing function. PC comparison is based on speed.

Specified by:
compareTo in interface java.lang.Comparable<AbstractPC>
Parameters:
compareObject - PC to be compared with this
Returns:
-1 if rv is less fast than this, 1 if it's faster, 0 else

getCharacterAttributes

public CharacterAttributes getCharacterAttributes()
Get Character Attributes of PC - name, height and such

Returns:
character attributes
See Also:
CharacterAttributes

getCurrentHP

public int getCurrentHP()
Get character current hit points

Returns:
character current hit points

getDamageResistance

public int getDamageResistance()
Get Damage Resistance

Returns:
damage resistance

getHT

public int getHT()
Return character HEALTH points (HT)

Returns:
character HEALTH points (HT)

getPassiveDefense

public int getPassiveDefense()
Get Passive Defense

Returns:
passive defense

getPrimaryStats

public PrimaryStats getPrimaryStats()
Return Primary Statistics of character (ST, DX, IQ and such)

Returns:
Primary Statistics of character
See Also:
PrimaryStats

getShortDescription

public java.lang.String getShortDescription()
Get character short description following this pattern: Name: ST,DX,IQ,HT/HTmax

Returns:
short character description

isAI

public boolean isAI()
Return true if this charater is controlled by Artificial Intelligence

Returns:
true if this charater is controlled by Artificial Intelligence

setAI

public void setAI(boolean isAI)
Set if this character is AI

Parameters:
isAI -

setCharacterAttributes

public void setCharacterAttributes(CharacterAttributes attributes)
Set character attributes (ST,IQ,DX,HT).

Parameters:
attributes -
See Also:
PrimaryStats

setDamageResistance

public void setDamageResistance(int damageRes)
Set damage resistance

Parameters:
damageRes - Character's damage resistance

setPassiveDefense

public void setPassiveDefense(int passiveDef)
Set passive defense

Parameters:
passiveDef - Character's passive defense

Java Universal Role Playing Engine Version 0.3.9

Copyright ? 2010 http://jurpe.sourceforge.net/ All Rights Reserved.