Affectable
, Behavable
, CloseableLockable
, CMObject
, Combatant
, Contingent
, DBIdentifiable
, Environmental
, Expireable
, Modifiable
, MsgListener
, Physical
, PhysicalAgent
, Readable
, Rideable
, Rider
, StatsAffecting
, Tickable
, AmmunitionWeapon
, Container
, Item
, SiegableItem
, Weapon
, Wearable
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
GenSiegeWeapon
public class StdSiegeWeapon extends StdRideable implements AmmunitionWeapon, SiegableItem
Rideable.Basis
SiegableItem.SiegeCommand
Wearable.CODES
Modifier and Type | Field | Description |
---|---|---|
protected int[] |
aiming |
|
protected int |
ammoCapacity |
|
protected PairList<Item,int[]> |
coordinates |
|
protected int |
lastSpamCt |
|
protected java.lang.String |
lastSpamMsg |
|
protected int |
maxRange |
|
protected int |
minRange |
|
protected int |
nextTacticalMoveDir |
|
protected PairList<MOB,java.lang.Long> |
otherUsers |
|
protected Room |
siegeCombatRoom |
|
protected SiegableItem |
siegeTarget |
|
protected int |
ticksFromHappen |
|
protected boolean |
useExtendedMissString |
|
protected int |
weaponClassification |
|
protected int |
weaponDamageType |
idConverter
CONTAIN_ANYTHING, CONTAIN_BODIES, CONTAIN_CAGED, CONTAIN_CLOTHES, CONTAIN_COINS, CONTAIN_DAGGERS, CONTAIN_DESCS, CONTAIN_DRINKABLES, CONTAIN_EATABLES, CONTAIN_FOOTWEAR, CONTAIN_KEYS, CONTAIN_LIQUID, CONTAIN_ONEHANDWEAPONS, CONTAIN_OTHERWEAPONS, CONTAIN_RAWMATERIALS, CONTAIN_READABLES, CONTAIN_SCROLLS, CONTAIN_SHIELDS, CONTAIN_SMOKEABLES, CONTAIN_SSCOMPONENTS, CONTAIN_SWORDS
capacity, containType, defaultsClosed, defaultsLocked, hasALid, hasALock, isLocked, isOpen, openDelayTicks
_name, affectPhyStats, affects, baseGoldValue, basePhyStats, behaviors, cachedImageName, CODES, databaseID, description, destroyed, displayText, dispossessionTime, material, me, miscText, myContainer, myUses, myWornCode, owner, phyStats, properWornBitmap, rawImageName, riding, scripts, secretIdentity, tickCtr, tickStatus, wornLogicalAnd, xtraValues
dismountString, mountString, putString, rideBasis, riderCapacity, riders, rideString, stateString, stateSubjectStr
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
CLASS_AXE, CLASS_BLUNT, CLASS_DAGGER, CLASS_DESCS, CLASS_EDGED, CLASS_FLAILED, CLASS_HAMMER, CLASS_NATURAL, CLASS_POLEARM, CLASS_RANGED, CLASS_STAFF, CLASS_SWORD, CLASS_THROWN, MASK_MAXRANGEBITS, MASK_MAXRANGEFLAG, MASK_MAXRANGESHFT, MASK_MAXRANGEZERO, MASK_MINRANGEBITS, MASK_MINRANGEFLAG, MASK_MINRANGESHFT, MASK_MINRANGEZERO, MASK_MOAMMOBITS, MASK_MOAMMOFLAG, MASK_MOAMMOSHFT, MASK_MOAMMOZERO, MSG_TYPE_MAP, TYPE_BASHING, TYPE_BURNING, TYPE_BURSTING, TYPE_CORRUPTING, TYPE_DESCS, TYPE_DISRUPTING, TYPE_FROSTING, TYPE_GASSING, TYPE_LASERING, TYPE_MELTING, TYPE_MSG_MAP, TYPE_NATURAL, TYPE_PIERCING, TYPE_SCRAPING, TYPE_SHOOT, TYPE_SLASHING, TYPE_SONICING, TYPE_STRIKING, TYPE_STULTIFYING
DEFAULT_WORN_CODES, DEFAULT_WORN_DEPENDENCYGRID, DEFAULT_WORN_DESCS, DEFAULT_WORN_ORDER, DEFAULT_WORN_USUAL_NAMES, DEFAULT_WORN_WEIGHT_POINTS, DEFAULT_WORN_WEIGHTS, FILTER_ANY, FILTER_MOBINVONLY, FILTER_ROOMONLY, FILTER_UNWORNONLY, FILTER_WORNONLY, HIGHEST_WORN_CODE, IN_INVENTORY, WORN_ABOUT_BODY, WORN_ARMS, WORN_BACK, WORN_EARS, WORN_EYES, WORN_FEET, WORN_FLOATING_NEARBY, WORN_HANDS, WORN_HEAD, WORN_HELD, WORN_LEFT_FINGER, WORN_LEFT_WRIST, WORN_LEGS, WORN_MOUTH, WORN_NECK, WORN_RIGHT_FINGER, WORN_RIGHT_WRIST, WORN_TORSO, WORN_WAIST, WORN_WIELD
Constructor | Description |
---|---|
StdSiegeWeapon() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
addPlayerAttacker(MOB M) |
|
boolean |
amDead() |
Returns whether this is sunk or destroyed in a siege..
|
protected boolean |
amInTacticalMode() |
|
int |
ammunitionCapacity() |
The current adjected maximum amount of Units of ammunition which can be loaded
into this weapon.
|
int |
ammunitionRemaining() |
The amount of Units of ammunition loaded into this weapon.
|
java.lang.String |
ammunitionType() |
The type/class of ammunition required by this weapon.
|
void |
announceToUsers(java.lang.String msgStr) |
|
protected void |
clearTacticalMode() |
|
protected void |
clearTacticalModeInternal() |
|
void |
destroy() |
Utterly and permanently destroy this object, not only removing it from the map, but
causing this object to be collected as garbage by Java.
|
void |
executeMsg(Environmental myHost,
CMMsg msg) |
The general message event handler for the object.
|
java.lang.String |
genericName() |
Returns a generic name for this object, devoid of its particular
identifying details.
|
PhysicalAgent |
getCombatant() |
If this mob is in combat, this returns the mob that this mob is
targeting.
|
PairList<Item,int[]> |
getCombatField() |
Returns the combat field, which must be public to allow
all participants too coordinate.
|
int |
getDirectionToTarget() |
Gets the compass direction between this combatant and the current combat
victim.
|
protected int |
getDirectionToTarget(PhysicalAgent dirTarget) |
|
protected MOB |
getFactoryAttacker(Room thisRoom) |
|
protected int[] |
getMagicCoords() |
|
int |
getMaxHullPoints() |
Returns the number of base hull points that the given obj has.
|
protected java.util.List<MOB> |
getPlayerAttackers() |
|
int[] |
getRanges() |
Gets the raw minimum and maximum range of this weapon.
|
PairList<Weapon,int[]> |
getSiegeWeaponAimings() |
Returns the mapping of this objects siege weapons to the coordinates
they are presently aimed at.
|
int[] |
getTacticalCoords() |
Returns the tactical coordinates of this object
|
protected int |
getTacticalDistance(SiegableItem targetI) |
|
java.lang.String |
getTacticalView(SiegableItem viewer) |
A unique display message for siegable objects and their relationship
to this object.
|
java.lang.String |
healthText(MOB viewer) |
Returns the friendly viewable description of this mobs health status,
from the given viewer mobs point of view.
|
java.lang.String |
hitString(int damageAmount) |
Gets the string that would be shown if someone gets a hit with
this weapon.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
protected boolean |
isAnyoneAtCoords(int[] xy) |
|
boolean |
isFreeStanding() |
Returns true if the weapon is a free-standing missile weapon, meaning
it can be loaded and fired from the ground, like a siege weapon/catapult.
|
boolean |
isInCombat() |
Returns whether this combatant is in an active combat state
|
Item |
killMeDead(boolean createBody) |
Puts this combatant in a dead state, removes all temporary effects,
creates a corpse, ends combat, and sends mob players to their graveyard.
|
void |
makePeace(boolean includePlayerFollowers) |
Clears the combat state between this combatant and their
target, clears the targets combat state, as well as
that of any followers of this combatant.
|
int |
maxRange() |
the modified maximum range of this object, if applicable.
|
boolean |
mayIFight(PhysicalAgent victim) |
Returns whether this combatant is both permitted to attack the
given combatant, and that both this combatant and the potential target
are alive.
|
boolean |
mayPhysicallyAttack(PhysicalAgent victim) |
Returns whether this combatant is permitted to attack the
given combatant, both this combatant and the potential target are alive,
both the combatant and the target are confirmed to be the same
place.
|
int |
minRange() |
the modified minimum range of this object, if applicable.
|
java.lang.String |
missString() |
Gets the string that would be shown if someone misses with
this weapon.
|
boolean |
okMessage(Environmental myHost,
CMMsg msg) |
The general message event previewer for the object.
|
int |
rangeToTarget() |
Gets the distance between this combatant and the current combat
victim.
|
int |
rawAmmunitionCapacity() |
The base unadjusted maximum amount of Units of ammunition which can be loaded
into this weapon.
|
void |
recoverOwner() |
|
void |
recoverPhyStats() |
This method copies the basePhyStats() object into the phyStats() object, then makes repeated calls to
all surrounding objects with affectPhyStats(Environmental,PhyStats) method.
|
boolean |
requiresAmmunition() |
Returns true if the weapon requires ammunition, ever.
|
java.lang.String |
secretIdentity() |
This method returns the calculated and expanded description of the properties
of the item as would be discovered through the Identify spell.
|
void |
setAmmoCapacity(int amount) |
Sets the maximum amount of Units of ammunition which can be loaded into this weapon.
|
void |
setAmmoRemaining(int amount) |
Sets the amount of Units of ammunition loaded into this weapon.
|
void |
setAmmunitionType(java.lang.String ammo) |
Sets the type/class of ammunition required by this weapon.
|
void |
setCombatant(PhysicalAgent other) |
Sets the mob that this mob is targeting for combat, which
either puts them into, or clears their combat state.
|
void |
setRanges(int min,
int max) |
Sets the minimum and maximum range of this weapon.
|
void |
setRangeToTarget(int newRange) |
Sets the distance between this combatant and the current combat
victim.
|
void |
setUsesRemaining(int newUses) |
Sets the uses remaining field, which is a general numeric value whose meaning differs
for different Item types.
|
void |
setWeaponClassification(int newClassification) |
Sets the general classification of this weapon, denoting how the
weapon is used and the skills required.
|
void |
setWeaponDamageType(int newType) |
Sets the type of damage this weapon does, from the weapon damage
type list of codes.
|
protected java.lang.Boolean |
startAttack(MOB sourceM,
Room thisRoom,
java.lang.String rest) |
|
boolean |
subjectToWearAndTear() |
Whether the usesRemaining() number above is used to determine the percentage health of
the item.
|
boolean |
tick(Tickable ticking,
int tickID) |
this is the method which is called periodically by the threading engine.
|
int |
value() |
The default value of the item, represented in the base CoffeeMud currency.
|
int |
weaponClassification() |
Gets the general classification of this weapon, denoting how the
weapon is used and the skills required.
|
int |
weaponDamageType() |
Gets the type of damage this weapon does, from the weapon damage
type list of codes.
|
protected java.lang.String |
weaponHealth() |
addEffect, addNonUninvokableEffect, basePhyStats, delAllEffects, delEffect, eachEffect, effects, fetchEffect, fetchEffect, numEffects, phyStats, setBasePhyStats
addBehavior, addScript, behaviors, delAllBehaviors, delAllScripts, delBehavior, delScript, eachBehavior, eachScript, fetchBehavior, fetchBehavior, fetchScript, numBehaviors, numScripts, scripts
copyOf, initializeClass, newInstance
amDestroyed, isSavable, setSavable
canSaveDatabaseID, databaseID, setDatabaseID
description, displayText, image, isGeneric, L, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setImage, setMiscText, setName, text
expirationDate, setExpirationDate
baseGoldValue, container, material, numberOfItems, owner, rawSecretIdentity, recursiveWeight, removeFromOwnerContainer, setBaseValue, setContainer, setMaterial, setOwner, setSecretIdentity, stopTicking, ultimateContainer, usesRemaining
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
description, displayText, name
isReadable, readableText, setReadable, setReadableText
affectCharState, affectCharStats, affectPhyStats
canContain, capacity, containTypes, defaultsClosed, defaultsLocked, emptyPlease, getContents, getDeepContents, hasADoor, hasALock, hasContent, isInside, isLocked, isOpen, keyName, numberOfItems, openDelayTicks, recursiveWeight, setCapacity, setContainTypes, setDoorsNLocks, setKeyName, setMiscText, setOpenDelayTicks
abilityImbuesMagic, addBehavior, addEffect, addNonUninvokableEffect, addScript, affectCharState, affectCharStats, alreadyWornMsg, amBeingWornProperly, amDestroyed, amWearingAt, baseGoldValue, basePhyStats, behaviors, canSaveDatabaseID, canWear, canWearComplete, compareProperLocations, compareTo, container, copyOf, databaseID, delAllBehaviors, delAllEffects, delAllScripts, delBehavior, delEffect, delScript, description, description, displayText, eachBehavior, eachEffect, eachScript, effects, expirationDate, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchScript, fitsOn, getSaveStatIndex, getStat, getStatCodes, getTickStatus, I, image, initializeClass, isGeneric, isReadable, isSavable, isStat, L, material, miscTextFormat, name, name, Name, newInstance, numBehaviors, numEffects, numScripts, owner, phyStats, rawImage, rawLogicalAnd, rawProperLocationBitmap, rawSecretIdentity, rawWornCode, readableText, removeFromOwnerContainer, riding, sameAs, scripts, setBasePhyStats, setBaseValue, setContainer, setDatabaseID, setDescription, setDisplayText, setExpirationDate, setImage, setMaterial, setName, setOwner, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, setReadable, setReadableText, setRiding, setSavable, setSecretIdentity, setStat, stopTicking, tackOns, text, ultimateContainer, unWear, usesRemaining, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWear
addRider, affectPhyStats, amRiding, cloneFix, delRider, dismountString, displayText, fetchRider, getDismountString, getMountString, getPutString, getRideBuddies, getRideString, getStateString, getStateStringSubject, isMobileRideBasis, mobileRideBasis, mountString, numRiders, putString, rideBasis, riderCapacity, riders, rideString, savable, setDismountString, setMountString, setPutString, setRideBasis, setRiderCapacity, setRideString, setStateString, setStateStringSubject, stateString, stateStringSubject
getTickStatus, name
amBeingWornProperly, amWearingAt, canWear, compareProperLocations, fitsOn, rawLogicalAnd, rawProperLocationBitmap, rawWornCode, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, unWear, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWear
protected int weaponDamageType
protected int weaponClassification
protected boolean useExtendedMissString
protected int minRange
protected int maxRange
protected int ammoCapacity
protected volatile int nextTacticalMoveDir
protected volatile int lastSpamCt
protected volatile int ticksFromHappen
protected volatile java.lang.String lastSpamMsg
protected SiegableItem siegeTarget
protected Room siegeCombatRoom
protected volatile int[] aiming
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class StdRideable
public java.lang.String genericName()
Physical
genericName
in interface Physical
genericName
in class StdRideable
public int weaponDamageType()
Weapon
weaponDamageType
in interface Weapon
Weapon.TYPE_DESCS
public int weaponClassification()
Weapon
weaponClassification
in interface Weapon
Weapon.CLASS_DESCS
public void setWeaponDamageType(int newType)
Weapon
setWeaponDamageType
in interface Weapon
newType
- get weapon damage type codeWeapon.TYPE_DESCS
public void setWeaponClassification(int newClassification)
Weapon
setWeaponClassification
in interface Weapon
newClassification
- the weapon classification codeWeapon.CLASS_DESCS
public boolean isFreeStanding()
AmmunitionWeapon
isFreeStanding
in interface AmmunitionWeapon
public java.lang.String secretIdentity()
Item
secretIdentity
in interface Item
secretIdentity
in class StdItem
public void recoverPhyStats()
Affectable
recoverPhyStats
in interface Affectable
recoverPhyStats
in class StdRideable
Affectable.basePhyStats()
,
Affectable.phyStats()
,
Affectable.addEffect(Ability)
,
Behavable.addBehavior(Behavior)
,
PhyStats
public void setRangeToTarget(int newRange)
Combatant
setRangeToTarget
in interface Combatant
newRange
- the range from this combatant to their targetMOB.getVictim()
,
Combatant.setCombatant(PhysicalAgent)
,
Combatant.getCombatant()
,
Combatant.rangeToTarget()
,
Combatant.mayIFight(PhysicalAgent)
protected int getDirectionToTarget(PhysicalAgent dirTarget)
public final int getMaxHullPoints()
SiegableItem
getMaxHullPoints
in interface SiegableItem
public int rangeToTarget()
Combatant
rangeToTarget
in interface Combatant
MOB.getVictim()
,
Combatant.setCombatant(PhysicalAgent)
,
Combatant.getCombatant()
,
Combatant.setRangeToTarget(int)
,
Combatant.mayIFight(PhysicalAgent)
public boolean mayPhysicallyAttack(PhysicalAgent victim)
Combatant
mayPhysicallyAttack
in interface Combatant
victim
- the potential combat targetMOB.getVictim()
,
Combatant.setCombatant(PhysicalAgent)
,
Combatant.getCombatant()
,
Combatant.setRangeToTarget(int)
,
Combatant.mayPhysicallyAttack(PhysicalAgent)
public boolean isInCombat()
Combatant
isInCombat
in interface Combatant
MOB.getVictim()
,
MOB.setVictim(MOB)
,
Combatant.setCombatant(PhysicalAgent)
,
Combatant.getCombatant()
,
Combatant.makePeace(boolean)
,
Combatant.setRangeToTarget(int)
,
Combatant.mayIFight(PhysicalAgent)
public boolean amDead()
SiegableItem
amDead
in interface Combatant
amDead
in interface SiegableItem
Combatant.killMeDead(boolean)
,
MOB.bringToLife(Room, boolean)
,
MOB.removeFromGame(boolean, boolean)
public boolean mayIFight(PhysicalAgent victim)
Combatant
mayIFight
in interface Combatant
victim
- the potential combat targetMOB.getVictim()
,
Combatant.setCombatant(PhysicalAgent)
,
Combatant.getCombatant()
,
Combatant.setRangeToTarget(int)
,
Combatant.mayPhysicallyAttack(PhysicalAgent)
protected int[] getMagicCoords()
protected int getTacticalDistance(SiegableItem targetI)
protected boolean isAnyoneAtCoords(int[] xy)
protected boolean amInTacticalMode()
protected void clearTacticalMode()
protected void clearTacticalModeInternal()
public void makePeace(boolean includePlayerFollowers)
Combatant
makePeace
in interface Combatant
includePlayerFollowers
- false to apply only to npc followers, true for npc and playerCombatant.isInCombat()
,
MOB.getVictim()
,
MOB.setVictim(MOB)
,
Combatant.setCombatant(PhysicalAgent)
,
Combatant.getCombatant()
,
Combatant.setRangeToTarget(int)
,
Combatant.mayIFight(PhysicalAgent)
public PhysicalAgent getCombatant()
Combatant
getCombatant
in interface Combatant
Combatant.isInCombat()
,
Combatant.setCombatant(PhysicalAgent)
,
Combatant.makePeace(boolean)
,
Combatant.setRangeToTarget(int)
,
Combatant.mayIFight(PhysicalAgent)
public void setCombatant(PhysicalAgent other)
Combatant
setCombatant
in interface Combatant
other
- the combat target, or null for a peace stateCombatant.isInCombat()
,
Combatant.getCombatant()
,
Combatant.makePeace(boolean)
,
Combatant.setRangeToTarget(int)
,
Combatant.mayIFight(PhysicalAgent)
public int[] getTacticalCoords()
SiegableItem
getTacticalCoords
in interface SiegableItem
public int getDirectionToTarget()
Combatant
getDirectionToTarget
in interface Combatant
MOB.getVictim()
,
Combatant.setCombatant(PhysicalAgent)
,
Combatant.getCombatant()
,
Combatant.setRangeToTarget(int)
,
Combatant.mayIFight(PhysicalAgent)
public PairList<Weapon,int[]> getSiegeWeaponAimings()
SiegableItem
getSiegeWeaponAimings
in interface SiegableItem
public void destroy()
Contingent
destroy
in interface Contingent
destroy
in class StdRideable
public java.lang.String getTacticalView(SiegableItem viewer)
SiegableItem
getTacticalView
in interface SiegableItem
viewer
- an object viewing this onepublic PairList<Item,int[]> getCombatField()
SiegableItem
getCombatField
in interface SiegableItem
public void executeMsg(Environmental myHost, CMMsg msg)
MsgListener
executeMsg
in interface MsgListener
executeMsg
in class StdRideable
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that needs to be executedCMMsg
protected java.lang.Boolean startAttack(MOB sourceM, Room thisRoom, java.lang.String rest)
protected void addPlayerAttacker(MOB M)
protected java.util.List<MOB> getPlayerAttackers()
public void announceToUsers(java.lang.String msgStr)
public boolean tick(Tickable ticking, int tickID)
Tickable
tick
in interface Tickable
tick
in class StdContainer
ticking
- a reference to this Tickable objecttickID
- the TICKID_ constant describing this periodic call, as defined in TickableTickable
,
ServiceEngine
,
TickableGroup
public boolean okMessage(Environmental myHost, CMMsg msg)
MsgListener
okMessage
in interface MsgListener
okMessage
in class StdRideable
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that wants to be executedCMMsg
,
CMMsg.source()
public void setUsesRemaining(int newUses)
Item
setUsesRemaining
in interface Item
setUsesRemaining
in class StdItem
newUses
- a new general numeric value for this field.public java.lang.String healthText(MOB viewer)
Combatant
healthText
in interface Combatant
viewer
- the mob viewing this mobpublic Item killMeDead(boolean createBody)
Combatant
killMeDead
in interface Combatant
createBody
- true to create a corpse, false otherwiseCombatant.amDead()
,
MOB.bringToLife(Room, boolean)
,
MOB.removeFromGame(boolean, boolean)
protected java.lang.String weaponHealth()
public java.lang.String missString()
Weapon
missString
in interface Weapon
Weapon.hitString(int)
public java.lang.String hitString(int damageAmount)
Weapon
hitString
in interface Weapon
damageAmount
- the amount of damage done with this weaponWeapon.missString()
public int minRange()
Environmental
minRange
in interface Environmental
minRange
in class StdItem
public int maxRange()
Environmental
maxRange
in interface Environmental
maxRange
in class StdItem
public void setRanges(int min, int max)
Weapon
setRanges
in interface Weapon
min
- the minimum range 0=meleemax
- the maximum range 0=meleeEnvironmental.maxRange()
,
Environmental.minRange()
public int[] getRanges()
Weapon
getRanges
in interface Weapon
Weapon.setRanges(int, int)
,
Environmental.maxRange()
,
Environmental.minRange()
public boolean requiresAmmunition()
AmmunitionWeapon
requiresAmmunition
in interface AmmunitionWeapon
public void setAmmunitionType(java.lang.String ammo)
AmmunitionWeapon
setAmmunitionType
in interface AmmunitionWeapon
ammo
- the ammunition type stringAmmunition.setAmmunitionType(String)
,
AmmunitionWeapon.ammunitionType()
public java.lang.String ammunitionType()
AmmunitionWeapon
ammunitionType
in interface AmmunitionWeapon
Ammunition.ammunitionType()
,
AmmunitionWeapon.setAmmunitionType(String)
public int ammunitionRemaining()
AmmunitionWeapon
ammunitionRemaining
in interface AmmunitionWeapon
AmmunitionWeapon.setAmmoRemaining(int)
public void setAmmoRemaining(int amount)
AmmunitionWeapon
setAmmoRemaining
in interface AmmunitionWeapon
amount
- the number of units of ammunitionAmmunitionWeapon.ammunitionRemaining()
public int ammunitionCapacity()
AmmunitionWeapon
ammunitionCapacity
in interface AmmunitionWeapon
AmmunitionWeapon.setAmmoCapacity(int)
,
AmmunitionWeapon.rawAmmunitionCapacity()
public int rawAmmunitionCapacity()
AmmunitionWeapon
rawAmmunitionCapacity
in interface AmmunitionWeapon
AmmunitionWeapon.setAmmoCapacity(int)
,
AmmunitionWeapon.ammunitionCapacity()
public void setAmmoCapacity(int amount)
AmmunitionWeapon
setAmmoCapacity
in interface AmmunitionWeapon
amount
- the max number of units of ammunition that can be loadedAmmunitionWeapon.ammunitionCapacity()
,
AmmunitionWeapon.rawAmmunitionCapacity()
public int value()
Item
public boolean subjectToWearAndTear()
Item
subjectToWearAndTear
in interface Item
subjectToWearAndTear
in class StdRideable
public void recoverOwner()