org.haphazard.item
Class Clothes

java.lang.Object
  extended byorg.haphazard.item.Item
      extended byorg.haphazard.item.Clothes
All Implemented Interfaces:
Containing

public class Clothes
extends Item

Clothes a character can wear


Field Summary
 
Fields inherited from class org.haphazard.item.Item
mContainer, mName, mQuality
 
Constructor Summary
Clothes()
          Creates a cloth
Clothes(java.lang.String name)
          Creates a cloth with a specific name
 
Method Summary
 boolean allows(Clothes clothes)
          Checks if the clothes can be worn together
 int getArmorValue()
          Gets the protectiveness of this clothing
 int getLevel()
          Gets the layer level of this cloth
 java.lang.String toXML(int indent)
          Transforms this object into an XML-notation
 
Methods inherited from class org.haphazard.item.Item
add, canHold, contains, getAttackBonus, getContainerDimension, getContainerWeight, getDamageBonus, getDefenceBonus, getDescription, getDimension, getFreeSpecializationSlots, getFreeVolume, getGeneralItem, getName, getRestrictions, getSkill, getTreeNode, getWeight, hasEdges, isContainer, isSolid, isSpecialization, remove, setName, toString, wear
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Clothes

public Clothes()
Creates a cloth


Clothes

public Clothes(java.lang.String name)
Creates a cloth with a specific name

Parameters:
name - The name of the cloth
Method Detail

getArmorValue

public int getArmorValue()
Gets the protectiveness of this clothing

Returns:
How much this clothing prevents damage

getLevel

public int getLevel()
Gets the layer level of this cloth

Returns:
The layer level of this cloth

allows

public boolean allows(Clothes clothes)
Checks if the clothes can be worn together

Parameters:
clothes - The clothes to check against
Returns:
True if they can be worn together

toXML

public java.lang.String toXML(int indent)
Transforms this object into an XML-notation

Overrides:
toXML in class Item
Parameters:
indent - The indentation level to use
Returns:
The object in an XML notation