All Packages Class Hierarchy This Package Previous Next Index
Class sso.Equipment
java.lang.Object
|
+----sso.Persistant
|
+----sso.GameObject
|
+----sso.Thing
|
+----sso.Equipment
- public class Equipment
- extends Thing
-
equipLocation
-
-
equipped
-
-
equipSize
-
-
lootable
-
-
repairDifficulty
-
-
repairSkill
-
-
Equipment()
- Constructor.
-
createEquipment()
- Factory method.
-
createRows()
- Create the rows required to store this object
-
equip()
- Equip the equipment
Unequip any objects equipped in the same slot.
-
getBodyLocation()
- Alias for getEquipLocation().
-
getEquipLocation()
- Get the equipment location.
-
getEquipSize()
- Get the equipment size
-
getRepairDifficulty()
- Get the repair difficulty target
-
getRepairSkill()
- Get the repair skill.
-
init()
- Initializer for new equipment.
-
isEquippable()
- Is the equipment equippable?
-
isEquipped()
- Is the equipment equipped?
-
isLootable()
- Is the equipment lootable/stealable?
-
load()
- Load an instance of Equipment
-
loadEquipment(int)
-
-
main(String[])
- Tester
-
repair(PC)
- Repair the equipment, or at least try.
-
setEquipLocation(byte)
- Set the equipment location.
-
setEquipSize(byte)
- Set the equipment size
-
setLootable(boolean)
- Set the lootable flag
-
setRating(int)
- Set the rating.
-
setRepairDifficulty(int)
- Set the repair difficulty target
-
setRepairSkill(String)
- Set the repair skill.
-
store()
- Store this Equipment
-
unequip()
- Unequip the equipment
-
unregister()
- Remove the object from the database.
equipLocation
protected byte equipLocation
equipped
protected boolean equipped
equipSize
protected byte equipSize
lootable
protected boolean lootable
repairDifficulty
protected int repairDifficulty
repairSkill
protected String repairSkill
Equipment
protected Equipment()
- Constructor. Call a factory method instead.
createEquipment
public static Equipment createEquipment()
- Factory method. Create a new piece of equipment.
init
protected void init()
- Initializer for new equipment.
- Overrides:
- init in class Thing
getEquipLocation
public byte getEquipLocation()
- Get the equipment location.
getBodyLocation
public byte getBodyLocation()
- Alias for getEquipLocation().
- See Also:
- getEquipLocation
setEquipLocation
public void setEquipLocation(byte loc)
- Set the equipment location.
isEquipped
public boolean isEquipped()
- Is the equipment equipped?
equip
public void equip()
- Equip the equipment
Unequip any objects equipped in the same slot.
*** TODO *** Two handed items, one handed items (make sure unequip)
unequip
public void unequip()
- Unequip the equipment
isEquippable
public boolean isEquippable()
- Is the equipment equippable?
getEquipSize
public byte getEquipSize()
- Get the equipment size
setEquipSize
public void setEquipSize(byte size)
- Set the equipment size
isLootable
public boolean isLootable()
- Is the equipment lootable/stealable?
setLootable
public void setLootable(boolean lootable)
- Set the lootable flag
getRepairDifficulty
public int getRepairDifficulty()
- Get the repair difficulty target
setRepairDifficulty
public void setRepairDifficulty(int target)
- Set the repair difficulty target
getRepairSkill
public String getRepairSkill()
- Get the repair skill.
setRepairSkill
public void setRepairSkill(String skill)
- Set the repair skill.
repair
public boolean repair(PC craftsman)
- Repair the equipment, or at least try. Catastrophic failures may damage
the equipment further. Successful repairs will raise the rating of the
equipment by 1/10th the difference of the roll and the target.
Return true on success, false on failure.
setRating
public void setRating(int rating)
- Set the rating. Check for object destruction.
- Overrides:
- setRating in class Thing
createRows
protected void createRows()
- Create the rows required to store this object
- Overrides:
- createRows in class Thing
store
public void store()
- Store this Equipment
- Overrides:
- store in class Thing
loadEquipment
public static Equipment loadEquipment(int id)
load
protected void load()
- Load an instance of Equipment
- Overrides:
- load in class Thing
unregister
public void unregister()
- Remove the object from the database.
- Overrides:
- unregister in class Thing
main
public static void main(String args[])
- Tester
All Packages Class Hierarchy This Package Previous Next Index