|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjurpe.characters.BasicPC
jurpe.characters.PC
jurpe.characters.PCharacter
public class PCharacter
Playing Character Type
PC,
Serialized Form| Constructor Summary | |
|---|---|
PCharacter(CharacterAttributes ca,
int points,
Skills lvl)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addToAvailablePoints(float points)
Add points to available experience level. |
void |
addToScore(int points)
Add points to current score for this character. |
AllOutAttackType |
getAllOutAttackType()
Every character must choose a type of AllOutAttack. |
java.lang.Object[][] |
getAllSkills()
Get all skills learned by this character and their name and level. |
float |
getAvailablePoints()
Get Total Available Points for this PCharacter |
int |
getBareHandsSkill()
Get current skill in unarmed combat. |
int |
getBlockPoints()
Get character block points |
PCharacterSkill |
getCharacterSkill(Skill skill)
Get a Skill learned by this character (PCharacterSkill) |
PCharacterSkill |
getCharacterSkill(java.lang.String name)
Get a Skill learned by this character (PCharacterSkill) |
java.lang.String |
getCrushDamage()
Get current Thrust Damage (description) |
Armor |
getCurrentArmor()
Get current armor. |
Item |
getCurrentItem()
Get current item |
int |
getCurrentMerchantLevel()
Get current merchant skill level |
Shield |
getCurrentShield()
Get current shield (character wears shield) |
int |
getCurrentShieldLevel()
Get current shield skill level |
Weapon |
getCurrentWeapon()
Get current weapon |
int |
getCurrentWeaponLevel()
Get current weapon skill level |
int |
getCustomizedCost(BasicItem item)
When character IS BUYING an item, he will be asked for this cost because of his Merchant skill |
int |
getCustomizedPrice(BasicItem item)
When character IS SELLING an item, he will be offered this price because of his Merchant skill |
int |
getDamageRoll()
Get Damage, after having made a success attack. |
int |
getDodgePoints()
Get character dodge points |
int |
getEncumbrance()
Get character encumbrance |
int |
getEncumbranceLevel()
Encumbrance level is a measure of weight relative to strength. |
java.lang.String |
getHTHP()
If a character is human, he will have his HT value (ie: 12) If a character is a beast, he will have HT in the form HT/current HP (ie: 12/16) |
Inventory |
getInventory()
Get reference to character inventory |
int |
getMaxDamage()
Get maximum damage. |
int |
getMaximumHP()
Playing characters have HP=HT |
int |
getMvmt()
Get MVMT (Movement). |
int |
getNrSkills()
Get how many skills this character learned. |
int |
getParryPoints()
Get character parry points |
int |
getPersonalScore()
Player personal score |
int |
getScore()
Get current score for this character. |
SexType |
getSexType()
Every character must choose a sex |
int |
getSkillLevel(java.lang.String nomeAbilita)
Get PCharacter Skill Level |
Skills |
getSkillLevels()
Get player's skills |
float |
getSpentPoints()
Get Spent Points for this character. |
java.lang.String |
getSwingDamage()
Get current Swing Damage (description) |
float |
getTotalActiveDefenses()
Get total active defense for this character. |
float |
getTotalPassiveDefenses()
Get total passive defense. |
float |
getUnspentPoints()
Get Unspent PCharacter Points. |
boolean |
hasSkill(PCharacterSkill skill)
|
boolean |
improveSkill(PCharacterSkill skill,
float cost)
Improve Skill Level |
boolean |
improveSkill(java.lang.String name,
float cost)
Improve Skill Level |
boolean |
isAlive()
A character is alive if: Has HT>0 Failed a roll on MaximumHT if CurrentHO <=0 Lost a total of 1 times MaximumHT |
boolean |
isReady()
You are ready if: - you are unarmed - you are using a weapon which is ready |
boolean |
isSaved()
If the character has been saved lately. |
boolean |
isShielded()
Returns true if character wears a shield. |
boolean |
learnSkill(PCharacterSkill a,
float cost)
Add skill to character. |
void |
setAllOutAttackType(AllOutAttackType all)
Use this function to change current type of AllOutAttack |
void |
setAvailablePoints(float f)
|
void |
setCrushDamage(java.lang.String string)
|
boolean |
setCurrentArmor(Armor armatura)
Set current armor. |
boolean |
setCurrentItem(Item item)
Set current item. |
boolean |
setCurrentShield(Shield scudo)
Set current shield (character wears shield). |
boolean |
setCurrentWeapon(Weapon arma)
Set current weapon |
void |
setInventory(Inventory inventory)
Set player inventory |
void |
setPersonalScore(int i)
Set player personal score |
void |
setSaved()
The character has been saved (persisted) to a file |
void |
setSaved(boolean s)
The character has/has not been saved to a file |
void |
setSkillLevels(Skills skills)
Set player skill levels |
void |
setSkills(Skills livelli)
Set available skills for this game. |
void |
setSwingDamage(java.lang.String string)
|
| Methods inherited from class jurpe.characters.PC |
|---|
addToCurrentHP, clone, getActiveDefense, getActiveDefenses, getActiveDefensesAvailable, getFormattedVel, getInfo, getName, isArmed, isUnconscious, receiveDamage, restoreHP, rollForLife, setActiveDefense, setActiveDefenseAvailability, setActiveDefenses, setAlive, setUnconscious, toString |
| Methods inherited from class jurpe.characters.BasicPC |
|---|
compareTo, getCharacterAttributes, getCurrentHP, getDamageResistance, getHT, getPassiveDefense, getPrimaryStats, getShortDescription, isAI, setAI, setCharacterAttributes, setDamageResistance, setPassiveDefense |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Constructor Detail |
|---|
public PCharacter(CharacterAttributes ca,
int points,
Skills lvl)
ca - Character Attributes (Name, DX, ST, etc)points - PCharacter Overall Available Points / total available points
for this characterlvl - Available SkillsCharacterAttributes| Method Detail |
|---|
public boolean isSaved()
public void setSaved()
public void setSaved(boolean s)
public float getAvailablePoints()
public float getUnspentPoints()
public float getSpentPoints()
public void addToAvailablePoints(float points)
points - to add to experience level.public void addToScore(int points)
points - Points to addpublic int getScore()
public AllOutAttackType getAllOutAttackType()
getAllOutAttackType in class PCAllOutAttackTypepublic void setAllOutAttackType(AllOutAttackType all)
all - All Out attack for this characterAllOutAttackTypepublic SexType getSexType()
SexTypepublic void setSkills(Skills livelli)
livelli - Current livelli active reference.public int getSkillLevel(java.lang.String nomeAbilita)
nomeAbilita - name of skill
public PCharacterSkill getCharacterSkill(Skill skill)
skill - generic skill
PCharacterSkillpublic PCharacterSkill getCharacterSkill(java.lang.String name)
name - name of skill
PCharacterSkill
public boolean improveSkill(java.lang.String name,
float cost)
name - name of skillcost - cost in character point to spend to get this skill improved
public boolean improveSkill(PCharacterSkill skill,
float cost)
skill - Character's skill to improvecost - cost in character point to spend to get this skill improved
public boolean setCurrentWeapon(Weapon arma)
arma - Weapon (Weapon) object
Weaponpublic Weapon getCurrentWeapon()
getCurrentWeapon in class PCWeaponpublic int getCurrentWeaponLevel()
getCurrentWeaponLevel in class PCWeaponpublic int getCurrentShieldLevel()
getCurrentShieldLevel in class PCShieldpublic int getCurrentMerchantLevel()
public boolean isReady()
isReady in class PCpublic boolean setCurrentArmor(Armor armatura)
armatura - Armor (Armor) object
Armorpublic Armor getCurrentArmor()
Armorpublic boolean setCurrentShield(Shield scudo)
scudo - Shield (Shield) object
Shieldpublic Shield getCurrentShield()
Shieldpublic int getMaximumHP()
public boolean isShielded()
isShielded in class PCpublic boolean setCurrentItem(Item item)
item - Item object
Itempublic Item getCurrentItem()
Itempublic java.lang.String getSwingDamage()
public java.lang.String getCrushDamage()
public int getEncumbranceLevel()
public int getMvmt()
getMvmt in class PCpublic int getParryPoints()
public int getDodgePoints()
public int getBlockPoints()
public int getEncumbrance()
public Inventory getInventory()
Inventorypublic boolean hasSkill(PCharacterSkill skill)
public boolean learnSkill(PCharacterSkill a,
float cost)
a - PCharacter Skill (PCharacterSkill)cost - Cost of skill to learn
PCharacterSkillpublic java.lang.Object[][] getAllSkills()
public int getNrSkills()
public float getTotalPassiveDefenses()
getTotalPassiveDefenses in class PCpublic float getTotalActiveDefenses()
getTotalActiveDefenses in class PCpublic int getDamageRoll()
getDamageRoll in class PCpublic int getMaxDamage()
getMaxDamage in class PCpublic int getBareHandsSkill()
getBareHandsSkill in class PCpublic boolean isAlive()
isAlive in class PCpublic int getCustomizedCost(BasicItem item)
item - Item to buy
public int getCustomizedPrice(BasicItem item)
item - Item to sell
public java.lang.String getHTHP()
public void setAvailablePoints(float f)
f - public int getPersonalScore()
public void setPersonalScore(int i)
i - Player scorepublic void setInventory(Inventory inventory)
inventory - Inventorypublic Skills getSkillLevels()
public void setSkillLevels(Skills skills)
skills - Skill levelspublic void setSwingDamage(java.lang.String string)
string - public void setCrushDamage(java.lang.String string)
string -
|
Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||