jurpe.system.commands
Class SkillCommands

java.lang.Object
  extended by jurpe.system.commands.GenericCommands
      extended by jurpe.system.commands.SkillCommands

public class SkillCommands
extends GenericCommands

Skills related commands.

See Also:
CoreCommands

Constructor Summary
SkillCommands()
           
 
Method Summary
static boolean addSkill(PCharacter curPC, Skill skillToAdd, boolean autoImprove)
          Add Skill to Playing Character.
static int firstAid(PCharacter pc, int sk, int tl)
          Get First Aid regained health points.
static float getImprovingSkillCost(PCharacter pc, int currentLevel, Skill skill)
          Get how much points an improvement of one level for a determinate Skill costs
static float getSkillCost(Skill skill, PCharacter pc, int level)
          Get how much points a Skill costs it's valued, or the initial points needed to learn a skill
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkillCommands

public SkillCommands()
Method Detail

firstAid

public static int firstAid(PCharacter pc,
                           int sk,
                           int tl)
Get First Aid regained health points.

Parameters:
pc - PCharacter to be aided
sk - PCharacter Skill Level in First Aid
tl - Tech Level of the Game World
Returns:
Gained Hit Points

addSkill

public static boolean addSkill(PCharacter curPC,
                               Skill skillToAdd,
                               boolean autoImprove)
Add Skill to Playing Character. When character learns a new skill, this is automatically improved until this operation costs some character points (until improving it's free).

Parameters:
curPC - Playing Character
skillToAdd - Skill to Add to Playing Character
autoImprove - if it's true, Playing Character will improve skill until doing so it's free
Returns:
false if skill was already learned by character.

getSkillCost

public static float getSkillCost(Skill skill,
                                 PCharacter pc,
                                 int level)
Get how much points a Skill costs it's valued, or the initial points needed to learn a skill

Parameters:
skill - Skill to get cost for
level - Skill level
pc - Playing Character who wants to learn skill
Returns:
points needed
See Also:
Skill

getImprovingSkillCost

public static float getImprovingSkillCost(PCharacter pc,
                                          int currentLevel,
                                          Skill skill)
Get how much points an improvement of one level for a determinate Skill costs

Parameters:
pc - Playing Character who wants to improve skill level
currentLevel - Skill level before improvement
skill - Skill to upgrade
Returns:
points needed
See Also:
Skill

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