Java Universal Role Playing Engine Version 0.3.9

jurpe.items
Class Armor

java.lang.Object
  extended by jurpe.items.AbstractItem
      extended by jurpe.items.Armor
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<AbstractItem>

public class Armor
extends AbstractItem

Armor Type.

See Also:
AbstractItem, Serialized Form

Constructor Summary
Armor(java.lang.String name, int cost, int weight, int aDp, int aRd)
          Constructor
 
Method Summary
static Armor createRandom(ItemValueType value, RandomNames rn)
          Creates a random generated Armor
 java.lang.String getDescription()
          Long description
 int getDR()
          Get Damage Resistance
 int getPD()
          Get Passive Defense
 void unwear(PCharacter pc)
          Polymorphic call to unwear this armor
 boolean wear(PCharacter pc)
          Polymorphic call to wear this armor (AbstractItem)
 
Methods inherited from class jurpe.items.AbstractItem
canBeWorn, clone, compareTo, getCommonDescription, getCost, getName, getType, getWeight, isItemRandom, isItemUsable, isItemWearable, setRandom, toString, toStringWCost, use, warningMessage
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Armor

public Armor(java.lang.String name,
             int cost,
             int weight,
             int aDp,
             int aRd)
Constructor

Parameters:
name - Armor's name
cost - Armor's cost
weight - Armor's weight
aDp - Armor's Passive Defense
aRd - Armor's Damage Resistance
Method Detail

createRandom

public static Armor createRandom(ItemValueType value,
                                 RandomNames rn)
Creates a random generated Armor

Parameters:
value - ItemValueType indicating rarity of Item
rn - Handle to Random Names
Returns:
newly created Shield

getDescription

public java.lang.String getDescription()
Long description

Overrides:
getDescription in class AbstractItem
Returns:
Long description

wear

public boolean wear(PCharacter pc)
Polymorphic call to wear this armor (AbstractItem)

Overrides:
wear in class AbstractItem
Parameters:
pc - PCharacter who's going to wear this Armor
Returns:
True, if Armor is correctly worn

unwear

public void unwear(PCharacter pc)
Polymorphic call to unwear this armor

Overrides:
unwear in class AbstractItem
Parameters:
pc - PCharacter who's going to unwear this armor

getPD

public int getPD()
Get Passive Defense

Returns:
Passive Defense of this Armor

getDR

public int getDR()
Get Damage Resistance

Returns:
Damage Resistance of this Armor

Java Universal Role Playing Engine Version 0.3.9

Copyright ? 2010 http://jurpe.sourceforge.net/ All Rights Reserved.