org.jadv.basic
Class Player

java.lang.Object
  |
  +--org.jadv.basic.SavedObject
        |
        +--org.jadv.basic.JAdvObject
              |
              +--org.jadv.basic.Living
                    |
                    +--org.jadv.basic.Player
All Implemented Interfaces:
java.io.Serializable

public class Player
extends Living

All Player are an instance of this class

Author:
neitzel
See Also:
Serialized Form

Field Summary
 int _CH
           
 int _EXP
           
 int _FF
           
 int _GE
           
 int _IN
           
 int _KK
           
 int _KL
           
 int _Level
           
 int _MU
           
 java.lang.String _StartRoomID
           
 
Fields inherited from class org.jadv.basic.Living
__HP_GEN_TMP, __SP_GEN_TMP, _BE, _dAT, _dPA, _HP, _HP_GEN, _HP_MAX, _RS, _SP, _SP_GEN, _SP_MAX, _weaponStats
 
Fields inherited from class org.jadv.basic.JAdvObject
_children, _description, _HeartBeatTime, _Size
 
Fields inherited from class org.jadv.basic.SavedObject
ObjMan
 
Constructor Summary
Player()
           
 
Method Summary
 void addExperience(int exp)
          Add the experience points and calcuates, if we reach a new Level (Level were reached at 1000, 2000, 4000, 8000, 16000, 32000, ....)
 void die()
          The player dies ...
 int getBasicAT()
          Get the basic attack value
Calculated: (MU + GE + KK ) / 5
 int getBasicPA()
          Get the basic parade value
Calculated: (IN + GE + KK) / 5
 int getDistBasicAT()
          Get the distance basic attack value
Calculated: (IN + FF + KK) / 4
 java.lang.String getStartRoom()
          Returns the startroom of the player
 void goodAT(int weapon)
          The player has done a really good attack!
 void goodPA(int weapon)
          The player has done a really good parade!
 void incLevel()
          incLevel Increases the Level.
 void init(java.util.HashMap attribs)
          initialize the Object
 void save()
          saves the local variables to their attributes
 
Methods inherited from class org.jadv.basic.Living
getAT, getPA, HeartBeat, modifyHP, modifySP
 
Methods inherited from class org.jadv.basic.JAdvObject
addChild, canMoveIn, canMoveOut, create, destroyObject, disableHeartBeat, enableHeartBeat, getDescription, getMasterParentID, getOldParentID, getParentID, getSight, getSize, removeChild, reset, sendPlayerEvent, setDescription, setMasterParentID_DEEP, setMasterParentID, setOldParentID, setParentID, setSize, setTimer, timer
 
Methods inherited from class org.jadv.basic.SavedObject
addEvent, canBeSwapped, createAttributes, createObject, createObject, createUUID, findObject, getAttribute, getAttributes, getAutoStart, getDeveloper, getId, getIntAttribute, getIntAttribute, getName, getNext, getPrev, hexFormat, isChanged, isValid, loadObject, markChanged, markNotChanged, mergeAttributes, removeFromList, replaceObject, replaceObject, saveObject, setAttribute, setId, setIntAttribute, setName, storeAfter, swapOut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_MU

public int _MU

_KL

public int _KL

_IN

public int _IN

_CH

public int _CH

_FF

public int _FF

_GE

public int _GE

_KK

public int _KK

_StartRoomID

public java.lang.String _StartRoomID

_EXP

public int _EXP

_Level

public int _Level
Constructor Detail

Player

public Player()
Method Detail

addExperience

public void addExperience(int exp)
Add the experience points and calcuates, if we reach a new Level (Level were reached at 1000, 2000, 4000, 8000, 16000, 32000, ....)

Parameters:
exp - - Experience to add to the player!

die

public void die()
The player dies ...

Overrides:
die in class Living
See Also:
Living.die()

getBasicAT

public int getBasicAT()
Get the basic attack value
Calculated: (MU + GE + KK ) / 5

Returns:
the BasicAT

getBasicPA

public int getBasicPA()
Get the basic parade value
Calculated: (IN + GE + KK) / 5

Returns:
the BasicPA

getDistBasicAT

public int getDistBasicAT()
Get the distance basic attack value
Calculated: (IN + FF + KK) / 4

Returns:
the distance BasicAT

getStartRoom

public java.lang.String getStartRoom()
Returns the startroom of the player

Returns:
the ID of the startroom.

goodAT

public void goodAT(int weapon)
The player has done a really good attack!

Parameters:
weapon - - Which weapon was used for the attack?

goodPA

public void goodPA(int weapon)
The player has done a really good parade!

Parameters:
weapon - - Which weapon was used for the parade?

incLevel

public void incLevel()
incLevel Increases the Level. (Also changes some attributes)

Overrides:
incLevel in class Living

init

public void init(java.util.HashMap attribs)
initialize the Object

Overrides:
init in class Living
Parameters:
attribs - Attributes of the Object

save

public void save()
saves the local variables to their attributes

Overrides:
save in class Living