jurpe.items
Class Shield

java.lang.Object
  extended by jurpe.items.BasicItem
      extended by jurpe.items.Shield
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class Shield
extends BasicItem

Shield Type.

Author:
Alessio Saltarin
See Also:
BasicItem, Serialized Form

Constructor Summary
Shield(java.lang.String name, int dp, int cost, int weight)
          Constructor
 
Method Summary
static Shield createRandom(ItemValueType value, RandomNames rn)
          Creates a random generated Shield
 java.lang.String getDescription()
          Get Long Description
 int getPassiveDefense()
          Get Passive Defense
static void main(java.lang.String[] args)
          Deprecated.  
 void setCost(int sCosto)
          Set cost
 void setWeight(int sPeso)
          Set weight
 void unwear(PCharacter pc)
          Unwear BasicItem (polymorphic)
 boolean wear(PCharacter pc)
          Polymorphic method to wear this BasicItem
 
Methods inherited from class jurpe.items.BasicItem
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

Shield

public Shield(java.lang.String name,
              int dp,
              int cost,
              int weight)
Constructor

Parameters:
name - Shields's name
cost - Shields's cost
weight - Shields's weight
dp - Shields's Passive Defense
Method Detail

createRandom

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

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

setCost

public void setCost(int sCosto)
Set cost

Parameters:
sCosto - Shield's cost

setWeight

public void setWeight(int sPeso)
Set weight

Parameters:
sPeso - Shield's weight

getPassiveDefense

public int getPassiveDefense()
Get Passive Defense

Returns:
passive defense of shield

getDescription

public java.lang.String getDescription()
Get Long Description

Overrides:
getDescription in class BasicItem
Returns:
long description

wear

public boolean wear(PCharacter pc)
Polymorphic method to wear this BasicItem

Overrides:
wear in class BasicItem
Parameters:
pc - PCharacter that is going to wear this BasicItem
Returns:
True if oggetto can be worn by PCharacter

unwear

public void unwear(PCharacter pc)
Unwear BasicItem (polymorphic)

Overrides:
unwear in class BasicItem
Parameters:
pc - PCharacter that is going to unwear this BasicItem

main

public static void main(java.lang.String[] args)
Deprecated. 

Test random creation

Parameters:
args - arguments

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