org.starhope.appius.game.inventory.effects
Class SimpleAbstractWeapon

java.lang.Object
  extended by org.starhope.appius.game.inventory.ItemEffects
      extended by org.starhope.appius.game.inventory.effects.SimpleAbstractWeapon
Direct Known Subclasses:
SimpleMeleeWeapon, SimpleRangedWeapon

public class SimpleAbstractWeapon
extends ItemEffects

WRITEME: Document this type.

Author:
brpocock@star-hope.org

Field Summary
protected  int ammunition
          WRITEME: Document this brpocock@star-hope.org
protected  DamageTypeRanks attackDamage
          WRITEME: Document this brpocock@star-hope.org
protected  String avatarUseAction
          WRITEME: Document this brpocock@star-hope.org
protected  AvatarClass hitAvatar
          WRITEME: Document this brpocock@star-hope.org
protected  DamageHitHandler hitHandler
          WRITEME: Document this brpocock@star-hope.org
protected  long lastUsed
          WRITEME: Document this brpocock@star-hope.org
protected  boolean limitedAmmunition
          WRITEME: Document this brpocock@star-hope.org
protected  int maxAmmunition
          WRITEME: Document this brpocock@star-hope.org
protected  AvatarClass missAvatar
          WRITEME: Document this brpocock@star-hope.org
protected  DamageMissHandler missHandler
          WRITEME: Document this brpocock@star-hope.org
protected  int repeatRateMillis
          WRITEME: Document this brpocock@star-hope.org
protected  long useDelayMillis
          WRITEME: Document this brpocock@star-hope.org
 
Fields inherited from class org.starhope.appius.game.inventory.ItemEffects
item
 
Constructor Summary
SimpleAbstractWeapon(InventoryItem theItem)
           
 
Method Summary
protected  boolean checkAmmunition()
          WRITEME: Document this method brpocock@star-hope.org
protected  boolean checkRepeatRate()
          WRITEME: Document this method brpocock@star-hope.org
protected  void decreaseAmmunition()
          Decrement the ammunition count by 1
 int getAmmunition()
           
 String getAvatarUseAction()
           
 AvatarClass getHitAvatar()
           
 DamageHitHandler getHitHandler()
           
 int getMaxAmmunition()
           
 AvatarClass getMissAvatar()
           
 DamageMissHandler getMissHandler()
           
 boolean isLimitedAmmunition()
           
protected  void onAmmoCountChanged()
          Whenever a shot is fired, or the weapon is reloaded, this hook is called to give subclasses an opportunity to save the changed value, usually as the item's health value.
 void setAmmunition(int newAmmunition)
           
 void setAvatarUseAction(String newAvatarActionOnUse)
           
 void setHitAvatar(AvatarClass newHitAvatar)
           
 void setHitHandler(DamageHitHandler newHitHandler)
           
 void setLimitedAmmunition(boolean newLimitedAmmunition)
           
 void setMaxAmmunition(int newMaxAmmunition)
           
 void setMissAvatar(AvatarClass newMissAvatar)
           
 void setMissHandler(DamageMissHandler newMissHandler)
           
 void setRepeatRateMillis(int newRepeatRateMillis)
           
 
Methods inherited from class org.starhope.appius.game.inventory.ItemEffects
alter, canSwim, conflicts, considerAsVehicle, forItem, getDefenseGeometric, getDefenseLinear, getItem, isFloatingVehicle, isMountedAnimal, isWheeledVehicle, notifyEquipment, onDeEquip, onEquip, takeDamage, use
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attackDamage

protected DamageTypeRanks attackDamage
WRITEME: Document this brpocock@star-hope.org


ammunition

protected int ammunition
WRITEME: Document this brpocock@star-hope.org


avatarUseAction

protected String avatarUseAction
WRITEME: Document this brpocock@star-hope.org


hitAvatar

protected AvatarClass hitAvatar
WRITEME: Document this brpocock@star-hope.org


hitHandler

protected DamageHitHandler hitHandler
WRITEME: Document this brpocock@star-hope.org


lastUsed

protected long lastUsed
WRITEME: Document this brpocock@star-hope.org


limitedAmmunition

protected boolean limitedAmmunition
WRITEME: Document this brpocock@star-hope.org


maxAmmunition

protected int maxAmmunition
WRITEME: Document this brpocock@star-hope.org


missAvatar

protected AvatarClass missAvatar
WRITEME: Document this brpocock@star-hope.org


missHandler

protected DamageMissHandler missHandler
WRITEME: Document this brpocock@star-hope.org


repeatRateMillis

protected int repeatRateMillis
WRITEME: Document this brpocock@star-hope.org


useDelayMillis

protected long useDelayMillis
WRITEME: Document this brpocock@star-hope.org

Constructor Detail

SimpleAbstractWeapon

public SimpleAbstractWeapon(InventoryItem theItem)
Parameters:
theItem - the item being used as a weapon
Method Detail

checkAmmunition

protected boolean checkAmmunition()
WRITEME: Document this method brpocock@star-hope.org

Returns:
WRITEME

checkRepeatRate

protected boolean checkRepeatRate()
WRITEME: Document this method brpocock@star-hope.org

Returns:
WRITEME

decreaseAmmunition

protected void decreaseAmmunition()
Decrement the ammunition count by 1


getAmmunition

public int getAmmunition()
Returns:
the ammunition

getAvatarUseAction

public String getAvatarUseAction()
Returns:
the avatarUseAction

getHitAvatar

public AvatarClass getHitAvatar()
Returns:
the hitAvatar

getHitHandler

public DamageHitHandler getHitHandler()
Returns:
the hitHandler

getMaxAmmunition

public int getMaxAmmunition()
Returns:
the maxAmmunition

getMissAvatar

public AvatarClass getMissAvatar()
Returns:
the missAvatar

getMissHandler

public DamageMissHandler getMissHandler()
Returns:
the missHandler

isLimitedAmmunition

public boolean isLimitedAmmunition()
Returns:
the limitedAmmunition

onAmmoCountChanged

protected void onAmmoCountChanged()
Whenever a shot is fired, or the weapon is reloaded, this hook is called to give subclasses an opportunity to save the changed value, usually as the item's health value.


setAmmunition

public void setAmmunition(int newAmmunition)
Parameters:
newAmmunition - the ammunition to set

setAvatarUseAction

public void setAvatarUseAction(String newAvatarActionOnUse)
Parameters:
newAvatarActionOnUse - the avatar action to play during Use of this item (e.g. “SwordSwing” or “DigShovel” or “MagicCast2” or something)

setHitAvatar

public void setHitAvatar(AvatarClass newHitAvatar)
Parameters:
newHitAvatar - the hitAvatar to set

setHitHandler

public void setHitHandler(DamageHitHandler newHitHandler)
Parameters:
newHitHandler - the hitHandler to set

setLimitedAmmunition

public void setLimitedAmmunition(boolean newLimitedAmmunition)
Parameters:
newLimitedAmmunition - the limitedAmmunition to set

setMaxAmmunition

public void setMaxAmmunition(int newMaxAmmunition)
Parameters:
newMaxAmmunition - the maxAmmunition to set

setMissAvatar

public void setMissAvatar(AvatarClass newMissAvatar)
Parameters:
newMissAvatar - the missAvatar to set

setMissHandler

public void setMissHandler(DamageMissHandler newMissHandler)
Parameters:
newMissHandler - the missHandler to set

setRepeatRateMillis

public void setRepeatRateMillis(int newRepeatRateMillis)
Parameters:
newRepeatRateMillis - the repeatRateMillis to set