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

java.lang.Object
  extended by org.starhope.appius.game.inventory.ItemEffects
      extended by org.starhope.appius.game.inventory.effects.SimpleAbstractWeapon
          extended by org.starhope.appius.game.inventory.effects.SimpleRangedWeapon

public class SimpleRangedWeapon
extends SimpleAbstractWeapon

A simple ranged weapon in the style of a gun, bow & arrows, or so forth. The ammunition can be limited, and there can be repeat rate limits, and so forth.

Author:
brpocock@star-hope.org

Field Summary
private  AvatarClass projectileAvatar
          WRITEME: Document this brpocock@star-hope.org
private  double travelRate
          WRITEME: Document this brpocock@star-hope.org
 
Fields inherited from class org.starhope.appius.game.inventory.effects.SimpleAbstractWeapon
ammunition, attackDamage, avatarUseAction, hitAvatar, hitHandler, lastUsed, limitedAmmunition, maxAmmunition, missAvatar, missHandler, repeatRateMillis, useDelayMillis
 
Fields inherited from class org.starhope.appius.game.inventory.ItemEffects
item
 
Constructor Summary
SimpleRangedWeapon(InventoryItem theItem)
           
 
Method Summary
protected  Coord3D acquireTarget(String targetName, Coord3D targetCoords)
          WRITEME: Document this method brpocock@star-hope.org
protected  void fire(Coord3D destination)
          WRITEME: Document this method brpocock@star-hope.org
 AvatarClass getProjectileAvatar()
           
 int getRepeatRateMillis()
           
 long getShotDelayMillis()
           
 double getTravelRate()
           
 void setProjectileAvatar(AvatarClass newProjectileAvatar)
           
 void setShotDelayMillis(long newShotDelayMillis)
           
 void setTravelRate(double newTravelRate)
           
 void use(String targetName, Coord3D targetCoords)
          The item is being used.
 
Methods inherited from class org.starhope.appius.game.inventory.effects.SimpleAbstractWeapon
checkAmmunition, checkRepeatRate, decreaseAmmunition, getAmmunition, getAvatarUseAction, getHitAvatar, getHitHandler, getMaxAmmunition, getMissAvatar, getMissHandler, isLimitedAmmunition, onAmmoCountChanged, setAmmunition, setAvatarUseAction, setHitAvatar, setHitHandler, setLimitedAmmunition, setMaxAmmunition, setMissAvatar, setMissHandler, setRepeatRateMillis
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

projectileAvatar

private AvatarClass projectileAvatar
WRITEME: Document this brpocock@star-hope.org


travelRate

private double travelRate
WRITEME: Document this brpocock@star-hope.org

Constructor Detail

SimpleRangedWeapon

public SimpleRangedWeapon(InventoryItem theItem)
Parameters:
theItem - the item to serve as a simple ranged weapon
Method Detail

acquireTarget

protected Coord3D acquireTarget(String targetName,
                                Coord3D targetCoords)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
targetName - WRITEME
targetCoords - WRITEME
Returns:
WRITEME

fire

protected void fire(Coord3D destination)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
destination - WRITEME

getProjectileAvatar

public AvatarClass getProjectileAvatar()
Returns:
the projectileAvatar

getRepeatRateMillis

public int getRepeatRateMillis()
Returns:
the repeatRateMillis

getShotDelayMillis

public long getShotDelayMillis()
Returns:
the useDelayMillis

getTravelRate

public double getTravelRate()
Returns:
the travelRate

setProjectileAvatar

public void setProjectileAvatar(AvatarClass newProjectileAvatar)
Parameters:
newProjectileAvatar - the projectileAvatar to set

setShotDelayMillis

public void setShotDelayMillis(long newShotDelayMillis)
Parameters:
newShotDelayMillis - the useDelayMillis to set

setTravelRate

public void setTravelRate(double newTravelRate)
Parameters:
newTravelRate - the travelRate to set

use

public void use(String targetName,
                Coord3D targetCoords)
Description copied from class: ItemEffects
The item is being used. The optional target name and/or target coördinates may be provided.

Overrides:
use in class ItemEffects
Parameters:
targetName - a named object in the room against which the item is to be used
targetCoords - the coördinates in the room against which the item is to be used.
See Also:
ItemEffects.use(java.lang.String, org.starhope.appius.geometry.Coord3D)