Java Universal Role Playing Engine Version 0.3.9

jurpe.items
Class Shield

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

public class Shield
extends AbstractItem

Shield Type.

See Also:
AbstractItem, 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 AbstractItem (polymorphic)
 boolean wear(PCharacter pc)
          Polymorphic method to wear this 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

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 AbstractItem
Returns:
long description

wear

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

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

unwear

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

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

main

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

Test random creation

Parameters:
args - arguments

Java Universal Role Playing Engine Version 0.3.9

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