public class Equipment extends java.lang.Object implements SaveElement
Constructor and Description |
---|
Equipment() |
Modifier and Type | Method and Description |
---|---|
boolean |
equip(Equippable item)
Equips specified equippable item
|
java.util.List<Equippable> |
getAll()
Returns list with all equipment items
|
int |
getArmorRat()
Returns total amount of equipment armor rating
|
Armor |
getChest()
Return character chest
|
Armor |
getHelmet()
Return character helmet
|
Weapon |
getMainWeapon()
Return character main weapon
|
Weapon |
getOffHand()
Returns character off hand
|
org.w3c.dom.Element |
getSave(org.w3c.dom.Document doc)
Parses equipment to XML document element
|
boolean |
isDualwield()
Checks if both main and secondary weapons are equipped
|
boolean |
isEquipped(Equippable item)
Checks if specified item is equipped
|
void |
unequipp(Equippable item)
Removes specific item from equipment
|
public void unequipp(Equippable item)
item
- Equipped character itempublic boolean equip(Equippable item)
item
- Equippable itempublic Armor getHelmet()
public Armor getChest()
public Weapon getMainWeapon()
public Weapon getOffHand()
public int getArmorRat()
public java.util.List<Equippable> getAll()
public boolean isEquipped(Equippable item)
item
- Game itempublic boolean isDualwield()
public org.w3c.dom.Element getSave(org.w3c.dom.Document doc)
getSave
in interface SaveElement
doc
- Document for game save file