org.starhope.appius.game.inventory.effects
Class SimpleRangedWeapon
java.lang.Object
org.starhope.appius.game.inventory.ItemEffects
org.starhope.appius.game.inventory.effects.SimpleAbstractWeapon
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
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 |
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 |
projectileAvatar
private AvatarClass projectileAvatar
- WRITEME: Document this brpocock@star-hope.org
travelRate
private double travelRate
- WRITEME: Document this brpocock@star-hope.org
SimpleRangedWeapon
public SimpleRangedWeapon(InventoryItem theItem)
- Parameters:
theItem
- the item to serve as a simple ranged weapon
acquireTarget
protected Coord3D acquireTarget(String targetName,
Coord3D targetCoords)
- WRITEME: Document this method brpocock@star-hope.org
- Parameters:
targetName
- WRITEMEtargetCoords
- 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 usedtargetCoords
- 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)