com.planet_ink.coffee_mud.Items.interfaces
Interface Weapon

All Superinterfaces:
Affectable, Behavable, java.lang.Cloneable, CMObject, java.lang.Comparable<CMObject>, Contingent, DBIdentifiable, Environmental, Item, Modifiable, MsgListener, Physical, PhysicalAgent, Readable, Rider, StatsAffecting, Tickable, Wearable
All Known Subinterfaces:
AmmunitionWeapon
All Known Implementing Classes:
ArchonStaff, Arquebus, BattleAxe, Broom, Cestus, Claymore, Dagger, DaggerOfVenom, Dirk, DragonClaw, DrowDagger, DrowMace, DrowQuarterstaff, DrowSword, EternityQuarterstaff, FlamingSword, GenBlaster, GenBoffWeapon, GenBow, GenDisruptor, GenDisruptor2, GenElecWeapon, GenHandBow, GenLaserGun, GenLasso, GenNet, GenPhaser, GenPhaser2, GenSiegeWeapon, GenSling, GenSonicGun, GenSpear, GenStaff, GenWeapon, Glaive, Halberd, HolyAvenger, Javelin, Katana, Longsword, Mace, Natural, Quarterstaff, Rapier, Ruler, Sabre, Scimitar, ShieldWeapon, Shortsword, Sickle, SmallDagger, SmallMace, Staff, StdBoffWeapon, StdBow, StdElecWeapon, StdLasso, StdNet, StdSiegeWeapon, StdSling, StdSpear, StdWeapon, Stiletto, Sword, ThrowingStone, Trident, TwoHandedSword, WarHammer, Whip

public interface Weapon
extends Item

An item that can be used to do damage to another mob. That's what a weapon is. They are classified by "damage type", which speaks generally to the way the weapon hurts a mob, and a "weapon classification", which speaks to the way in which the weapon is used, or the skills required.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Wearable
Wearable.CODES
 
Field Summary
static int CLASS_AXE
          One of the weapon classification, denotes an axe swinging type weapon
static int CLASS_BLUNT
          One of the weapon classification, denotes a blunt type weapon
static int CLASS_DAGGER
          One of the weapon classification, denotes a dagger type weapon
static java.lang.String[] CLASS_DESCS
          Description code words for the weapon classifications, indexed by the weapon classification code values.
static int CLASS_EDGED
          One of the weapon classification, denotes an edged type weapon
static int CLASS_FLAILED
          One of the weapon classification, denotes a flailed type weapon
static int CLASS_HAMMER
          One of the weapon classification, denotes a hammer swinging type weapon
static int CLASS_NATURAL
          One of the weapon classification, denotes a natural type weapon
static int CLASS_POLEARM
          One of the weapon classification, denotes a polearm type weapon
static int CLASS_RANGED
          One of the weapon classification, denotes a ranged type weapon
static int CLASS_STAFF
          One of the weapon classification, denotes a staff type weapon
static int CLASS_SWORD
          One of the weapon classification, denotes a sword type weapon
static int CLASS_THROWN
          One of the weapon classification, denotes a thrown type weapon
static int TYPE_BASHING
          One of the weapon type, denotes blunt weapon damage
static int TYPE_BURNING
          One of the weapon type, denotes fire weapon damage
static int TYPE_BURSTING
          One of the weapon type, denotes explosive weapon damage
static java.lang.String[] TYPE_DESCS
          Description code words for the weapon/damage types, indexed by the weapon/damage type values.
static int TYPE_FROSTING
          One of the weapon type, denotes cold weapon damage
static int TYPE_GASSING
          One of the weapon type, denotes poisony weapon damage
static int TYPE_LASERING
          One of the weapon type, denotes light weapon damage
static int TYPE_MELTING
          One of the weapon type, denotes acid weapon damage
static int TYPE_NATURAL
          One of the weapon type, denotes natural weapon damage
static int TYPE_PIERCING
          One of the weapon type, denotes poking weapon damage
static int TYPE_SHOOT
          One of the weapon type, denotes shooting weapon damage
static int TYPE_SLASHING
          One of the weapon type, denotes slashing weapon damage
static int TYPE_SONICING
          One of the weapon type, denotes sonic weapon damage
static int TYPE_STRIKING
          One of the weapon type, denotes electric weapon damage
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
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_BEAMWEAPON, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, 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_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
 
Fields inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Wearable
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
 
Method Summary
 java.lang.String hitString(int damageAmount)
          Gets the string that would be shown if someone gets a hit with this weapon.
 java.lang.String missString()
          Gets the string that would be shown if someone misses with this weapon.
 void setRanges(int min, int max)
          Sets the minimum and maximum range of this weapon.
 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.
 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.
 
Methods inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Item
baseGoldValue, container, material, numberOfItems, owner, rawSecretIdentity, recursiveWeight, removeFromOwnerContainer, secretIdentity, setBaseValue, setContainer, setMaterial, setOwner, setSecretIdentity, setUsesRemaining, stopTicking, subjectToWearAndTear, ultimateContainer, usesRemaining, value
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Rider
riding, setRiding
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Physical
description, displayText, name
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental
description, displayText, expirationDate, image, isGeneric, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setExpirationDate, setImage, setMiscText, setName, text
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, name, tick
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.StatsAffecting
affectCharState, affectCharStats, affectPhyStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.MsgListener
executeMsg, okMessage
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Contingent
amDestroyed, destroy, isSavable, setSavable
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Affectable
addEffect, addNonUninvokableEffect, basePhyStats, delAllEffects, delEffect, eachEffect, effects, fetchEffect, fetchEffect, numEffects, phyStats, recoverPhyStats, setBasePhyStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Behavable
addBehavior, addScript, behaviors, delAllBehaviors, delAllScripts, delBehavior, delScript, eachBehavior, eachScript, fetchBehavior, fetchBehavior, fetchScript, numBehaviors, numScripts, scripts
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.DBIdentifiable
canSaveDatabaseID, databaseID, setDatabaseID
 
Methods inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Wearable
amBeingWornProperly, amWearingAt, canWear, compareProperLocations, fitsOn, rawLogicalAnd, rawProperLocationBitmap, rawWornCode, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, unWear, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWear
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Readable
isReadable, readableText, setReadable, setReadableText
 

Field Detail

TYPE_NATURAL

static final int TYPE_NATURAL
One of the weapon type, denotes natural weapon damage

See Also:
Constant Field Values

TYPE_SLASHING

static final int TYPE_SLASHING
One of the weapon type, denotes slashing weapon damage

See Also:
Constant Field Values

TYPE_PIERCING

static final int TYPE_PIERCING
One of the weapon type, denotes poking weapon damage

See Also:
Constant Field Values

TYPE_BASHING

static final int TYPE_BASHING
One of the weapon type, denotes blunt weapon damage

See Also:
Constant Field Values

TYPE_BURNING

static final int TYPE_BURNING
One of the weapon type, denotes fire weapon damage

See Also:
Constant Field Values

TYPE_BURSTING

static final int TYPE_BURSTING
One of the weapon type, denotes explosive weapon damage

See Also:
Constant Field Values

TYPE_SHOOT

static final int TYPE_SHOOT
One of the weapon type, denotes shooting weapon damage

See Also:
Constant Field Values

TYPE_FROSTING

static final int TYPE_FROSTING
One of the weapon type, denotes cold weapon damage

See Also:
Constant Field Values

TYPE_GASSING

static final int TYPE_GASSING
One of the weapon type, denotes poisony weapon damage

See Also:
Constant Field Values

TYPE_MELTING

static final int TYPE_MELTING
One of the weapon type, denotes acid weapon damage

See Also:
Constant Field Values

TYPE_STRIKING

static final int TYPE_STRIKING
One of the weapon type, denotes electric weapon damage

See Also:
Constant Field Values

TYPE_LASERING

static final int TYPE_LASERING
One of the weapon type, denotes light weapon damage

See Also:
Constant Field Values

TYPE_SONICING

static final int TYPE_SONICING
One of the weapon type, denotes sonic weapon damage

See Also:
Constant Field Values

TYPE_DESCS

static final java.lang.String[] TYPE_DESCS
Description code words for the weapon/damage types, indexed by the weapon/damage type values.


CLASS_AXE

static final int CLASS_AXE
One of the weapon classification, denotes an axe swinging type weapon

See Also:
Constant Field Values

CLASS_BLUNT

static final int CLASS_BLUNT
One of the weapon classification, denotes a blunt type weapon

See Also:
Constant Field Values

CLASS_EDGED

static final int CLASS_EDGED
One of the weapon classification, denotes an edged type weapon

See Also:
Constant Field Values

CLASS_FLAILED

static final int CLASS_FLAILED
One of the weapon classification, denotes a flailed type weapon

See Also:
Constant Field Values

CLASS_HAMMER

static final int CLASS_HAMMER
One of the weapon classification, denotes a hammer swinging type weapon

See Also:
Constant Field Values

CLASS_NATURAL

static final int CLASS_NATURAL
One of the weapon classification, denotes a natural type weapon

See Also:
Constant Field Values

CLASS_POLEARM

static final int CLASS_POLEARM
One of the weapon classification, denotes a polearm type weapon

See Also:
Constant Field Values

CLASS_RANGED

static final int CLASS_RANGED
One of the weapon classification, denotes a ranged type weapon

See Also:
Constant Field Values

CLASS_SWORD

static final int CLASS_SWORD
One of the weapon classification, denotes a sword type weapon

See Also:
Constant Field Values

CLASS_DAGGER

static final int CLASS_DAGGER
One of the weapon classification, denotes a dagger type weapon

See Also:
Constant Field Values

CLASS_STAFF

static final int CLASS_STAFF
One of the weapon classification, denotes a staff type weapon

See Also:
Constant Field Values

CLASS_THROWN

static final int CLASS_THROWN
One of the weapon classification, denotes a thrown type weapon

See Also:
Constant Field Values

CLASS_DESCS

static final java.lang.String[] CLASS_DESCS
Description code words for the weapon classifications, indexed by the weapon classification code values.

Method Detail

weaponDamageType

int weaponDamageType()
Gets the type of damage this weapon does, from the weapon damage type list of codes.

Returns:
get weapon damage type code
See Also:
TYPE_DESCS

setWeaponDamageType

void setWeaponDamageType(int newType)
Sets the type of damage this weapon does, from the weapon damage type list of codes.

Parameters:
newType - get weapon damage type code
See Also:
TYPE_DESCS

weaponClassification

int weaponClassification()
Gets the general classification of this weapon, denoting how the weapon is used and the skills required. The code comes from the weapon class list of codes.

Returns:
the weapon classification code
See Also:
CLASS_DESCS

setWeaponClassification

void setWeaponClassification(int newClassification)
Sets the general classification of this weapon, denoting how the weapon is used and the skills required. The code comes from the weapon class list of codes.

Parameters:
newClassification - the weapon classification code
See Also:
CLASS_DESCS

setRanges

void setRanges(int min,
               int max)
Sets the minimum and maximum range of this weapon. Combined with the size of the room, and who attacks first, this can set the distance between two combatants.

Parameters:
min - the minimum range 0=melee
max - the maximum range 0=melee
See Also:
Environmental.maxRange(), Environmental.minRange()

hitString

java.lang.String hitString(int damageAmount)
Gets the string that would be shown if someone gets a hit with this weapon.

Parameters:
damageAmount - the amount of damage done with this weapon
Returns:
the message string to show someone hit with this weapon
See Also:
missString()

missString

java.lang.String missString()
Gets the string that would be shown if someone misses with this weapon.

Returns:
the message string to show someone misses with this weapon
See Also:
hitString(int)