Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

ogs::items::Weapon Class Reference

An item used in combat to damage opponents. More...

#include <Weapon.h>

Inheritance diagram for ogs::items::Weapon:

Inheritance graph
[legend]
Collaboration diagram for ogs::items::Weapon:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::bitset< 3 > Type
 Indicates the type of damage inflicted by the weapon.

enum  Proficiency { SIMPLE = 1, MARTIAL = 2, EXOTIC = 3 }
 Indicates the proficiency required to wield the weapon. More...

enum  { BASHING = 0, PIERCING = 1, SLASHING = 2 }

Public Member Functions

 Weapon ()
 Create a new weapon.

 Weapon (Entity::Weight weight, ogs::core::Size::Type size, Item::Worth worth, Proficiency proficiency, Type type, const ogs::core::Die &damage, unsigned criticalMultiplier, ogs::core::Die::Value threatRange)
Proficiency getProficiency () const
 Determine the proficiency of this weapon.

Type getType () const
 Determine the type of this weapon.

ogs::core::Die getDamage () const
 Determine the damage caused by this weapon.

unsigned getCriticalMultiplier () const
 Determine the critical multiplier of this weapon.

ogs::core::Die::Value getThreatRange () const
 Determine the threat range of this weapon.


Detailed Description

Since most weapons differ only in attributes (data) rather than operation (behavior), this class can be instantiated.


Member Typedef Documentation

typedef std::bitset<3> ogs::items::Weapon::Type
 

Most weapons inflict only one type of damage but some may inflict two types.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
BASHING  Indicates that this weapon inflicts bashing damage.
PIERCING  Indicates that this weapon Inflicts piercing damage.
SLASHING  Indicates that this weapon inflicts slashing damage.

enum ogs::items::Weapon::Proficiency
 

All weapons fall into exactly one of these categories.

Enumeration values:
SIMPLE  Requires simple weapon proficiency.
MARTIAL  Requires martial weapon proficiency.
EXOTIC  Requires exotic weapon proficiency.


Constructor & Destructor Documentation

Weapon::Weapon  ) 
 

The initial values of the weapon are unspecified.


Member Function Documentation

unsigned ogs::items::Weapon::getCriticalMultiplier  )  const [inline]
 

Returns:
Critical multiplier of this weapon.

ogs::core::Die ogs::items::Weapon::getDamage  )  const [inline]
 

Returns:
Damage from this weapon.

Weapon::Proficiency ogs::items::Weapon::getProficiency  )  const [inline]
 

Returns:
Proficiency of this weapon: SIMPLE, MARTIAL, or EXOTIC.

ogs::core::Die::Value ogs::items::Weapon::getThreatRange  )  const [inline]
 

Returns:
Threat range of this weapon.

Weapon::Type ogs::items::Weapon::getType  )  const [inline]
 

Returns:
Type of this weapon.


The documentation for this class was generated from the following files:
Generated on Sun Apr 20 03:39:54 2003 for Open Gaming System (OGS) by doxygen1.3