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

Variable Index

 o equipLocation
 o equipped
 o equipSize
 o lootable
 o repairDifficulty
 o repairSkill

Constructor Index

 o Equipment()
Constructor.

Method Index

 o createEquipment()
Factory method.
 o createRows()
Create the rows required to store this object
 o equip()
Equip the equipment Unequip any objects equipped in the same slot.
 o getBodyLocation()
Alias for getEquipLocation().
 o getEquipLocation()
Get the equipment location.
 o getEquipSize()
Get the equipment size
 o getRepairDifficulty()
Get the repair difficulty target
 o getRepairSkill()
Get the repair skill.
 o init()
Initializer for new equipment.
 o isEquippable()
Is the equipment equippable?
 o isEquipped()
Is the equipment equipped?
 o isLootable()
Is the equipment lootable/stealable?
 o load()
Load an instance of Equipment
 o loadEquipment(int)
 o main(String[])
Tester
 o repair(PC)
Repair the equipment, or at least try.
 o setEquipLocation(byte)
Set the equipment location.
 o setEquipSize(byte)
Set the equipment size
 o setLootable(boolean)
Set the lootable flag
 o setRating(int)
Set the rating.
 o setRepairDifficulty(int)
Set the repair difficulty target
 o setRepairSkill(String)
Set the repair skill.
 o store()
Store this Equipment
 o unequip()
Unequip the equipment
 o unregister()
Remove the object from the database.

Variables

 o equipLocation
 protected byte equipLocation
 o equipped
 protected boolean equipped
 o equipSize
 protected byte equipSize
 o lootable
 protected boolean lootable
 o repairDifficulty
 protected int repairDifficulty
 o repairSkill
 protected String repairSkill

Constructors

 o Equipment
 protected Equipment()
Constructor. Call a factory method instead.

Methods

 o createEquipment
 public static Equipment createEquipment()
Factory method. Create a new piece of equipment.

 o init
 protected void init()
Initializer for new equipment.

Overrides:
init in class Thing
 o getEquipLocation
 public byte getEquipLocation()
Get the equipment location.

 o getBodyLocation
 public byte getBodyLocation()
Alias for getEquipLocation().

See Also:
getEquipLocation
 o setEquipLocation
 public void setEquipLocation(byte loc)
Set the equipment location.

 o isEquipped
 public boolean isEquipped()
Is the equipment equipped?

 o 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)

 o unequip
 public void unequip()
Unequip the equipment

 o isEquippable
 public boolean isEquippable()
Is the equipment equippable?

 o getEquipSize
 public byte getEquipSize()
Get the equipment size

 o setEquipSize
 public void setEquipSize(byte size)
Set the equipment size

 o isLootable
 public boolean isLootable()
Is the equipment lootable/stealable?

 o setLootable
 public void setLootable(boolean lootable)
Set the lootable flag

 o getRepairDifficulty
 public int getRepairDifficulty()
Get the repair difficulty target

 o setRepairDifficulty
 public void setRepairDifficulty(int target)
Set the repair difficulty target

 o getRepairSkill
 public String getRepairSkill()
Get the repair skill.

 o setRepairSkill
 public void setRepairSkill(String skill)
Set the repair skill.

 o 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.

 o setRating
 public void setRating(int rating)
Set the rating. Check for object destruction.

Overrides:
setRating in class Thing
 o createRows
 protected void createRows()
Create the rows required to store this object

Overrides:
createRows in class Thing
 o store
 public void store()
Store this Equipment

Overrides:
store in class Thing
 o loadEquipment
 public static Equipment loadEquipment(int id)
 o load
 protected void load()
Load an instance of Equipment

Overrides:
load in class Thing
 o unregister
 public void unregister()
Remove the object from the database.

Overrides:
unregister in class Thing
 o main
 public static void main(String args[])
Tester


All Packages  Class Hierarchy  This Package  Previous  Next  Index