|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jurpe.system.JurpeUtils
public final class JurpeUtils
Collection of GURPS related rules. Maintains a static variable (roll) to the latest dice roll.
Constructor Summary | |
---|---|
JurpeUtils()
|
Method Summary | |
---|---|
static boolean |
checkCriticalFailure(int roll,
int skillLevel)
Returns true if dice roll is a critical failure |
static boolean |
checkCriticalSuccess(int roll,
int skillLevel)
Returns true if dice roll is a critical success |
static int |
computeCharacterPoints(int pCos,
int pDes,
int pFor,
int pInt)
Computes character points. |
static int |
computeCharacterPoints(PC pc)
Computes character points. |
static int |
computeDamage(int damageRoll,
int damageResistance)
Computer damage points when an unarmed attack succeeds. |
static int |
computeWeaponDamage(int damageRoll,
DamageMode weaponMode,
int damageResistance)
Computer damage points when an attack succeeds. |
static void |
fullRecovery(PCharacter pc)
Full recovery |
static PCharacter |
generatePC(CharacterAttributes ca,
Skills abilitaDisponibili)
Creates a Playing Character, with default maximum points. |
static PCharacter |
generatePC(CharacterAttributes ca,
Skills abilitaDisponibili,
int maximumCharacterPoints)
Creates a Playing Character |
static PrimaryStats |
generateStats(int characterPoints)
Generates ST,DX,IQ,HT that matches given character points |
static int |
getFirstAid(int firstAidSkillPoints,
int techLevel)
Computes first aid gained HT points. |
static int |
getFirstAidTime(int techLevel)
Time needed (in minutes) to get First Aid. |
static java.lang.String |
getFormattedDannoThrust(int frz)
Utility to display a String with Damage caused by Thrust attack, ie: 1d-1. |
static java.lang.String |
getFormattedSwingDamage(int frz)
Utility to display a String with Damage caused by Swing attack, ie: 1d-1. |
static int |
getLatestRoll()
Get the latest roll of dice. |
static int |
getMaxSwingDamage(int frz)
Utility to compute damage for Swing Attack when die roll is supposed to be 6. |
static int |
getMaxThrustDamage(int frz)
Utility to compute Damage caused by Thrust attack, when die roll is supposed to be 6. |
static int |
getSwingDamage(int frz)
Utility to compute damage for Swing Attack It is based on character ST |
static int |
getThrustDamage(int frz)
Utility to compute Damage caused by Thrust attack, It is based on character ST |
static long |
lootMoney(PC monster,
float percentile)
Returns a sum function of monster character points. |
static boolean |
naturalRecovery(PCharacter pc)
To use natural recovery you must have a day of rest and decent food (a night at Inn, in this implementation). |
static boolean |
recoverFromUnconsciousness(PCharacter pc)
To recover from uncosciousness you must rest for your current negative HT points minutes. |
static int |
scoreValue(int punteggio)
Computes character points for some attributes, such as ST and DX. |
static boolean |
successRoll(int valore)
Verifies a success roll |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JurpeUtils()
Method Detail |
---|
public static PCharacter generatePC(CharacterAttributes ca, Skills abilitaDisponibili, int maximumCharacterPoints)
ca
- Character AttributesabilitaDisponibili
- Skills available (read from Livelli)maximumCharacterPoints
- Points available to create this character
Skills
,
PCharacter
,
Skill
,
jurpe.system.CharacterAttributes
public static PrimaryStats generateStats(int characterPoints)
characterPoints
- Character Points
public static PCharacter generatePC(CharacterAttributes ca, Skills abilitaDisponibili)
ca
- Character AttributesabilitaDisponibili
- Skills available (read from Livelli)
Skills
,
PCharacter
,
Skill
public static int computeCharacterPoints(PC pc)
pc
- character to calculate points
public static int computeCharacterPoints(int pCos, int pDes, int pFor, int pInt)
pCos
- character health (HT)pDes
- character dexterity (DX)pFor
- character strength (ST)pInt
- character intelligence (IQ)
public static int getFirstAid(int firstAidSkillPoints, int techLevel)
firstAidSkillPoints
- Points in First Aid skilltechLevel
- Technology Level of the World
public static int getFirstAidTime(int techLevel)
techLevel
- Technology level of this world
public static boolean successRoll(int valore)
valore
- Value to confront with
public static boolean recoverFromUnconsciousness(PCharacter pc)
pc
- Unconscious character that needs to recover
Inn
public static boolean naturalRecovery(PCharacter pc)
pc
- PCharacter that needs recovery
public static void fullRecovery(PCharacter pc)
pc
- PCharacter that needs recoverypublic static int getLatestRoll()
public static long lootMoney(PC monster, float percentile)
monster
- reference to a PCpercentile
- number between 0 and 1. Probability to find some money.
public static boolean checkCriticalSuccess(int roll, int skillLevel)
roll
- dice rollskillLevel
- character skill level
public static boolean checkCriticalFailure(int roll, int skillLevel)
roll
- dice rollskillLevel
- character skill level
public static java.lang.String getFormattedSwingDamage(int frz)
frz
- PCharacter ST
public static int getSwingDamage(int frz)
frz
- PCharacter ST
public static int getMaxSwingDamage(int frz)
frz
- PCharacter ST
public static java.lang.String getFormattedDannoThrust(int frz)
frz
- PCharacter ST
public static int getThrustDamage(int frz)
frz
- PCharacter ST
public static int getMaxThrustDamage(int frz)
frz
- PCharacter ST
public static int computeDamage(int damageRoll, int damageResistance)
damageRoll
- dice roll for damagedamageResistance
- armor points of defender
public static int computeWeaponDamage(int damageRoll, DamageMode weaponMode, int damageResistance)
damageResistance
- armor points of defenderdamageRoll
- dice roll for damageweaponMode
- mode of attack (ie: Weapon.MODE_CRU)
Weapon
public static int scoreValue(int punteggio)
punteggio
- Attribute value to compute correspondent character points
|
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 |