Weapon_info Class Reference

#include <shapeinf.h>

Collaboration diagram for Weapon_info:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Powers {
  sleep = 1, charm = 2, curse = 4, poison = 8,
  paralyze = 16, magebane = 32
}
enum  Damage_type { normal_damage = 0, fire_damage = 1, magic_damage = 2, poison_damage = 3 }
enum  Actor_frames { raise = 1, reach = 2 }

Public Member Functions

 Weapon_info ()
int read (std::istream &mfile, bool bg)
void write (int shapenum, std::ostream &mfile, bool bg)
int get_damage () const
int get_damage_type () const
void set_damage (int dmg, int dmgtype)
unsigned char get_powers () const
void set_powers (unsigned char p)
unsigned char get_actor_frames (bool projectile) const
void set_actor_frames (unsigned char f)
int get_ammo_consumed ()
void set_ammo (int a)
bool uses_charges ()
bool is_thrown () const
bool returns () const
void set_returns (bool tf)
bool explodes () const
void set_explodes (bool tf)
bool no_blocking () const
void set_no_blocking (bool tf)
unsigned char get_uses () const
void set_uses (unsigned char u)
int get_range ()
void set_range (int r)
int get_striking_range ()
int get_projectile_range ()
int get_projectile ()
void set_projectile (int p)
int get_usecode ()
void set_usecode (int u)
int get_sfx ()
int get_hitsfx ()
void set_sfxs (int s, int hits)

Private Attributes

char damage
unsigned char powers
unsigned char damage_type
unsigned char actor_frames
short ammo
short projectile
bool m_explodes
bool m_returns
bool m_no_blocking
short usecode
unsigned char uses
unsigned char range
short sfx
short hitsfx

Friends

class Shape_info

Detailed Description

Definition at line 36 of file shapeinf.h.


Member Enumeration Documentation

enum Weapon_info::Powers

Enumerator:
sleep 
charm 
curse 
poison 
paralyze 
magebane 

Definition at line 40 of file shapeinf.h.

enum Weapon_info::Damage_type

Enumerator:
normal_damage 
fire_damage 
magic_damage 
poison_damage 

Definition at line 49 of file shapeinf.h.

enum Weapon_info::Actor_frames

Enumerator:
raise 
reach 

Definition at line 58 of file shapeinf.h.


Constructor & Destructor Documentation

Weapon_info::Weapon_info (  )  [inline]

Definition at line 85 of file shapeinf.h.


Member Function Documentation

int Weapon_info::read ( std::istream &  mfile,
bool  bg 
)

Definition at line 45 of file shapeinf.cc.

References Actor::ammo, item_names, Read2(), Ucscript::sfx, ShapeID::shapenum, and Ucscript::usecode.

Here is the call graph for this function:

void Weapon_info::write ( int  shapenum,
std::ostream &  mfile,
bool  bg 
)

Definition at line 195 of file shapewrite.cc.

References Ucscript::sfx, Ucscript::usecode, and Write2().

Here is the call graph for this function:

int Weapon_info::get_damage (  )  const [inline]

Definition at line 89 of file shapeinf.h.

References damage.

Referenced by Game_object::attack_object(), Actor::figure_hit_points(), Monster_actor::get_weapon(), Actor::get_weapon(), and Actor::ready_best_weapon().

int Weapon_info::get_damage_type (  )  const [inline]

Definition at line 91 of file shapeinf.h.

References damage_type.

void Weapon_info::set_damage ( int  dmg,
int  dmgtype 
) [inline]

Definition at line 93 of file shapeinf.h.

References damage, and damage_type.

Referenced by ExultStudio::save_shape_notebook().

unsigned char Weapon_info::get_powers (  )  const [inline]

Definition at line 95 of file shapeinf.h.

References powers.

Referenced by Actor::figure_hit_points().

void Weapon_info::set_powers ( unsigned char  p  )  [inline]

Definition at line 97 of file shapeinf.h.

References powers.

Referenced by ExultStudio::save_shape_notebook().

unsigned char Weapon_info::get_actor_frames ( bool  projectile  )  const [inline]

Definition at line 99 of file shapeinf.h.

References actor_frames.

Referenced by Get_weapon_frames().

void Weapon_info::set_actor_frames ( unsigned char  f  )  [inline]

Definition at line 101 of file shapeinf.h.

References actor_frames.

int Weapon_info::get_ammo_consumed (  )  [inline]

Definition at line 103 of file shapeinf.h.

References ammo.

Referenced by Actor::figure_hit_points(), Actor::ready_ammo(), and Swap_weapons().

void Weapon_info::set_ammo ( int  a  )  [inline]

Definition at line 105 of file shapeinf.h.

References ammo.

Referenced by ExultStudio::save_shape_notebook().

bool Weapon_info::uses_charges (  )  [inline]

Definition at line 107 of file shapeinf.h.

References ammo.

bool Weapon_info::is_thrown (  )  const [inline]

Definition at line 109 of file shapeinf.h.

References m_returns, and uses.

Referenced by Actor::figure_hit_points(), and get_projectile_range().

bool Weapon_info::returns (  )  const [inline]

Definition at line 111 of file shapeinf.h.

References m_returns.

Referenced by Actor::figure_hit_points(), and Projectile_effect::handle_event().

void Weapon_info::set_returns ( bool  tf  )  [inline]

Definition at line 113 of file shapeinf.h.

References m_returns.

Referenced by ExultStudio::save_shape_notebook().

bool Weapon_info::explodes (  )  const [inline]

Definition at line 115 of file shapeinf.h.

References m_explodes.

Referenced by Actor::figure_hit_points().

void Weapon_info::set_explodes ( bool  tf  )  [inline]

Definition at line 117 of file shapeinf.h.

References m_explodes.

Referenced by ExultStudio::save_shape_notebook().

bool Weapon_info::no_blocking (  )  const [inline]

Definition at line 119 of file shapeinf.h.

References m_no_blocking.

Referenced by Projectile_effect::init().

void Weapon_info::set_no_blocking ( bool  tf  )  [inline]

Definition at line 121 of file shapeinf.h.

References m_no_blocking.

unsigned char Weapon_info::get_uses (  )  const [inline]

Definition at line 123 of file shapeinf.h.

References uses.

void Weapon_info::set_uses ( unsigned char  u  )  [inline]

Definition at line 125 of file shapeinf.h.

References uses.

Referenced by ExultStudio::save_shape_notebook().

int Weapon_info::get_range (  )  [inline]

Definition at line 127 of file shapeinf.h.

References range.

void Weapon_info::set_range ( int  r  )  [inline]

Definition at line 129 of file shapeinf.h.

References range.

Referenced by ExultStudio::save_shape_notebook().

int Weapon_info::get_striking_range (  )  [inline]

Definition at line 131 of file shapeinf.h.

References range, and uses.

int Weapon_info::get_projectile_range (  )  [inline]

Definition at line 133 of file shapeinf.h.

References is_thrown(), range, and uses.

Here is the call graph for this function:

int Weapon_info::get_projectile (  )  [inline]

Definition at line 135 of file shapeinf.h.

References projectile.

Referenced by Egg_object::activate(), Game_map::find_unused_shapes(), and Projectile_effect::init().

void Weapon_info::set_projectile ( int  p  )  [inline]

Definition at line 137 of file shapeinf.h.

References projectile.

Referenced by ExultStudio::save_shape_notebook().

int Weapon_info::get_usecode (  )  [inline]

Definition at line 139 of file shapeinf.h.

References usecode.

Referenced by Game_object::attack_object(), and Actor::figure_hit_points().

void Weapon_info::set_usecode ( int  u  )  [inline]

Definition at line 141 of file shapeinf.h.

References usecode.

Referenced by ExultStudio::save_shape_notebook().

int Weapon_info::get_sfx (  )  [inline]

Definition at line 143 of file shapeinf.h.

References sfx.

Referenced by Combat_schedule::start_strike().

int Weapon_info::get_hitsfx (  )  [inline]

Definition at line 145 of file shapeinf.h.

References hitsfx.

Referenced by Actor::figure_hit_points().

void Weapon_info::set_sfxs ( int  s,
int  hits 
) [inline]

Definition at line 147 of file shapeinf.h.

References hitsfx, and sfx.

Referenced by ExultStudio::save_shape_notebook().


Friends And Related Function Documentation

friend class Shape_info [friend]

Definition at line 84 of file shapeinf.h.


Member Data Documentation

char Weapon_info::damage [private]

Definition at line 38 of file shapeinf.h.

Referenced by get_damage(), and set_damage().

unsigned char Weapon_info::powers [private]

Definition at line 64 of file shapeinf.h.

Referenced by get_powers(), and set_powers().

unsigned char Weapon_info::damage_type [private]

Definition at line 65 of file shapeinf.h.

Referenced by get_damage_type(), and set_damage().

unsigned char Weapon_info::actor_frames [private]

Definition at line 66 of file shapeinf.h.

Referenced by get_actor_frames(), and set_actor_frames().

short Weapon_info::ammo [private]

Definition at line 70 of file shapeinf.h.

Referenced by get_ammo_consumed(), set_ammo(), and uses_charges().

short Weapon_info::projectile [private]

Definition at line 74 of file shapeinf.h.

Referenced by get_projectile(), and set_projectile().

bool Weapon_info::m_explodes [private]

Definition at line 75 of file shapeinf.h.

Referenced by explodes(), and set_explodes().

bool Weapon_info::m_returns [private]

Definition at line 76 of file shapeinf.h.

Referenced by is_thrown(), returns(), and set_returns().

bool Weapon_info::m_no_blocking [private]

Definition at line 77 of file shapeinf.h.

Referenced by no_blocking(), and set_no_blocking().

short Weapon_info::usecode [private]

Definition at line 78 of file shapeinf.h.

Referenced by get_usecode(), and set_usecode().

unsigned char Weapon_info::uses [private]

Definition at line 79 of file shapeinf.h.

Referenced by get_projectile_range(), get_striking_range(), get_uses(), is_thrown(), and set_uses().

unsigned char Weapon_info::range [private]

Definition at line 81 of file shapeinf.h.

Referenced by get_projectile_range(), get_range(), get_striking_range(), and set_range().

short Weapon_info::sfx [private]

Definition at line 82 of file shapeinf.h.

Referenced by get_sfx(), and set_sfxs().

short Weapon_info::hitsfx [private]

Definition at line 82 of file shapeinf.h.

Referenced by get_hitsfx(), and set_sfxs().


The documentation for this class was generated from the following files:
Generated on Mon Jul 9 15:06:04 2007 for ExultEngine by  doxygen 1.5.1