#include <shapeinf.h>
Collaboration diagram for Weapon_info:
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 |
Definition at line 36 of file shapeinf.h.
enum Weapon_info::Powers |
Definition at line 49 of file shapeinf.h.
Weapon_info::Weapon_info | ( | ) | [inline] |
Definition at line 85 of file shapeinf.h.
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] |
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] |
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] |
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] |
unsigned char Weapon_info::get_uses | ( | ) | const [inline] |
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] |
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] |
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] |
friend class Shape_info [friend] |
Definition at line 84 of file shapeinf.h.
char Weapon_info::damage [private] |
unsigned char Weapon_info::powers [private] |
unsigned char Weapon_info::damage_type [private] |
unsigned char Weapon_info::actor_frames [private] |
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] |
bool Weapon_info::m_explodes [private] |
bool Weapon_info::m_returns [private] |
bool Weapon_info::m_no_blocking [private] |
short Weapon_info::usecode [private] |
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] |
short Weapon_info::hitsfx [private] |