jurpe.characters
Class Skill

java.lang.Object
  extended by jurpe.characters.Skill
All Implemented Interfaces:
java.io.Serializable

public class Skill
extends java.lang.Object
implements java.io.Serializable

Class type for any GURPS skill.

Author:
Alessio Saltarin
See Also:
Serialized Form

Field Summary
 int difficult
          Difficulty: easy, medium, hard
static int DX_BASED
          Based upon DX
static int EASY
          Easy skill
static int HARD
          Difficult skill
static int HT_BASED
          Based upon HT
static int IQ_BASED
          Based upon intelligence (IQ)
static int MEDIUM
          Medium skill
static int MENTAL_SK
          Mental skill
static int PHYSICAL_SK
          Physical Ability
static int ST_BASED
          Based upon ST
 
Constructor Summary
Skill(java.lang.String aNome, int aTipo, int aDifficolta, int basataSu, int modifDefault, double coeffParata, int aBalanced)
          Constructor (made with int values)
Skill(java.lang.String xNome, java.lang.String xTipo, java.lang.String xDifficolta, java.lang.String xBasata_su, int xModif_default, double xCoeff_parata, int xBalanced)
          Constructor (made with string values read from XML)
 
Method Summary
 java.lang.String description()
          Long description for skill.
 java.lang.String getBase()
          Get String saying if skill is based upon IQ,DX,COS,ST
static float getCostMentalSkillEasy(int persIQ, int desiredLevel)
          How many points you must spend to increase an Easy Mental skill.
static float getCostMentalSkillHard(int persIQ, int desiredLevel)
          How many points you must spend to increase a Hard Physical skill
static float getCostMentalSkillMedium(int persIQ, int desiredLevel)
          How many points you must spend to increase an Medium Mental skill.
static float getCostPhysicalSkillEasy(int persDex, int desiredLevel)
          How many points you must spend to increase an Easy Physical skill.
static float getCostPhysicalSkillHard(int persDex, int desiredLevel)
          How many points you must spend to increase a Hard Physical skill
static float getCostPhysicalSkillMedium(int persDex, int desiredLevel)
          How many points you must spend to increase an Medium Physical skill.
 java.lang.String getDefault()
          Returns string for default level, ie: "DX-5"
 java.lang.String getDifficolta()
          Returns difficulty of skill (String for descriptions)
 int getIntBase()
          Get static number for based upon, i.e.: INT_BASED, COS_BASED
 int getIntDifficulty()
          Returns difficulty of skill (static number)
 int getModifier()
          Returns default level for skill (along with "getBase" and/or "getIntBase")
 java.lang.String getName()
          Returns name of skill
 java.lang.String getType()
          Returns type of skill (mental or physical)
 boolean isBalanced()
          Returns true if Skill is HandWeapon, and the particular Weapon is balanced.
 boolean isPhysical()
          Returns true if it is a Physical skill
 boolean isWeapon()
          Returns true if it is a Physical skill used for Weapons.
 java.lang.String toString()
          Brief description of skill (name, only).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EASY

public static final int EASY
Easy skill

See Also:
Constant Field Values

MEDIUM

public static final int MEDIUM
Medium skill

See Also:
Constant Field Values

HARD

public static final int HARD
Difficult skill

See Also:
Constant Field Values

MENTAL_SK

public static final int MENTAL_SK
Mental skill

See Also:
Constant Field Values

PHYSICAL_SK

public static final int PHYSICAL_SK
Physical Ability

See Also:
Constant Field Values

IQ_BASED

public static final int IQ_BASED
Based upon intelligence (IQ)

See Also:
Constant Field Values

DX_BASED

public static final int DX_BASED
Based upon DX

See Also:
Constant Field Values

ST_BASED

public static final int ST_BASED
Based upon ST

See Also:
Constant Field Values

HT_BASED

public static final int HT_BASED
Based upon HT

See Also:
Constant Field Values

difficult

public int difficult
Difficulty: easy, medium, hard

Constructor Detail

Skill

public Skill(java.lang.String aNome,
             int aTipo,
             int aDifficolta,
             int basataSu,
             int modifDefault,
             double coeffParata,
             int aBalanced)
Constructor (made with int values)

Parameters:
aNome - Skill name
aTipo - Skill type: physical or mental. Use static numbers Abilita.AB_FISICA, Abilita.AB_MENTALE.
aDifficolta - Skill difficulty. Use static numbers Abilita.FACILE, Abilita.DIFFICILE, Abilita.MEDIA.
basataSu - Based on which proprery: IQ, DX, COS, ST. Use corresponding static number Abilita.INT_BASED and such.
modifDefault - Default level for skill. For instance, if ability is defaulted at IQ-5 we will have:
basata_su = Abilita.INT_BASED
modifDefault = -5
coeffParata - For skills that have Parry modifiers.
aBalanced - Balanced coefficient.

Skill

public Skill(java.lang.String xNome,
             java.lang.String xTipo,
             java.lang.String xDifficolta,
             java.lang.String xBasata_su,
             int xModif_default,
             double xCoeff_parata,
             int xBalanced)
Constructor (made with string values read from XML)

Parameters:
xNome - Skill name
xTipo - Skill type: physical or mental. Use static numbers Abilita.AB_FISICA, Abilita.AB_MENTALE.
xDifficolta - Skill difficulty: it can be "Facile", "Medio" or "Difficile"
xBasata_su - Based on which proprery: IQ, DX, COS, ST.
xCoeff_parata - For skills that have Parry modifiers.
xModif_default - Default modifier
xBalanced - if == 1 then Skill is for balanced weapon
Method Detail

getName

public java.lang.String getName()
Returns name of skill

Returns:
Name of skill

isBalanced

public boolean isBalanced()
Returns true if Skill is HandWeapon, and the particular Weapon is balanced.

Returns:
Balance type of weapon

getType

public java.lang.String getType()
Returns type of skill (mental or physical)

Returns:
Type of skill (mental or physical)

isPhysical

public boolean isPhysical()
Returns true if it is a Physical skill

Returns:
true if it is a Physical skill

isWeapon

public boolean isWeapon()
Returns true if it is a Physical skill used for Weapons. This is a check on Parry capability (it is a weapon if parry>-1)

Returns:
true if it is a Physical Weapon skill

getIntBase

public int getIntBase()
Get static number for based upon, i.e.: INT_BASED, COS_BASED

Returns:
Get static number for based upon, i.e.: INT_BASED, COS_BASED

getBase

public java.lang.String getBase()
Get String saying if skill is based upon IQ,DX,COS,ST

Returns:
Get String saying if skill is based upon IQ,DX,COS,ST

getDifficolta

public java.lang.String getDifficolta()
Returns difficulty of skill (String for descriptions)

Returns:
"Facile" if it's easy. "Media" if it's medium. "Difficile" if it's difficult.

getIntDifficulty

public int getIntDifficulty()
Returns difficulty of skill (static number)

Returns:
Number for "easy" (FACILE), "medium" (MEDIA), "difficult" (DIFFICILE)

getModifier

public int getModifier()
Returns default level for skill (along with "getBase" and/or "getIntBase")

Returns:
Default level for skill

getDefault

public java.lang.String getDefault()
Returns string for default level, ie: "DX-5"

Returns:
String for default level, ie: "DX-5"

description

public java.lang.String description()
Long description for skill.

Returns:
Long description for skill.

toString

public java.lang.String toString()
Brief description of skill (name, only).

Overrides:
toString in class java.lang.Object
Returns:
Brief description of skill (name, only).

getCostPhysicalSkillEasy

public static float getCostPhysicalSkillEasy(int persDex,
                                             int desiredLevel)
How many points you must spend to increase an Easy Physical skill. Or, how many points the skill is valued, given level and character's DX.

Parameters:
persDex - DX of character
desiredLevel - level to reach
Returns:
Points to spend

getCostPhysicalSkillMedium

public static float getCostPhysicalSkillMedium(int persDex,
                                               int desiredLevel)
How many points you must spend to increase an Medium Physical skill. Or, how many points the skill is valued, given level and character's DX.

Parameters:
persDex - DX of character
desiredLevel - level to reach
Returns:
Points to spend

getCostPhysicalSkillHard

public static float getCostPhysicalSkillHard(int persDex,
                                             int desiredLevel)
How many points you must spend to increase a Hard Physical skill

Parameters:
persDex - DX of character
desiredLevel - level to reach
Returns:
Points to spend

getCostMentalSkillEasy

public static float getCostMentalSkillEasy(int persIQ,
                                           int desiredLevel)
How many points you must spend to increase an Easy Mental skill. Or, how many points the skill is valued, given level and character's IQ.

Parameters:
persIQ - IQ of character
desiredLevel - level to reach
Returns:
Points to spend

getCostMentalSkillMedium

public static float getCostMentalSkillMedium(int persIQ,
                                             int desiredLevel)
How many points you must spend to increase an Medium Mental skill. Or, how many points the skill is valued, given level and character's DX.

Parameters:
persIQ - IQ of character
desiredLevel - level to reach
Returns:
Points to spend

getCostMentalSkillHard

public static float getCostMentalSkillHard(int persIQ,
                                           int desiredLevel)
How many points you must spend to increase a Hard Physical skill

Parameters:
persIQ - DX of character
desiredLevel - level to reach
Returns:
Points to spend

Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net