Combat_schedule Class Reference

#include <combat.h>

Inheritance diagram for Combat_schedule:

Inheritance graph
[legend]
Collaboration diagram for Combat_schedule:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Combat_schedule (Actor *n, Schedule_types prev_sched)
virtual void now_what ()
virtual void im_dormant ()
virtual void ending (int newtype)
virtual void set_weapon ()
bool has_started_battle () const

Static Public Member Functions

static void monster_died ()

Protected Types

enum  Phase {
  initial = 0, approach = 1, retreat = 2, flee = 3,
  strike = 4, fire = 5, parry = 6, stunned = 7,
  wait_return = 8
}

Protected Member Functions

void start_battle ()
bool teleport ()
virtual void find_opponents ()
Actorfind_protected_attacker ()
Game_objectfind_foe (int mode)
Game_objectfind_foe ()
void approach_foe ()
void start_strike ()
void run_away ()
Spellbook_objectreadied_spellbook ()

Protected Attributes

enum Combat_schedule::Phase state
Schedule_types prev_schedule
Actor_queue opponents
Game_objectpractice_target
int weapon_shape
int ammo_shape
int projectile_shape
Spellbook_objectspellbook
unsigned char strike_range
unsigned char projectile_range
unsigned char max_range
bool is_thrown
bool returns
bool no_blocking
unsigned char yelled
bool started_battle
unsigned char fleed
bool can_yell
int failures
unsigned int teleport_time

Static Protected Attributes

static unsigned long battle_time
static unsigned long battle_end_time

Detailed Description

Definition at line 33 of file combat.h.


Member Enumeration Documentation

enum Combat_schedule::Phase [protected]

Enumerator:
initial 
approach 
retreat 
flee 
strike 
fire 
parry 
stunned 
wait_return 

Definition at line 38 of file combat.h.


Constructor & Destructor Documentation

Combat_schedule::Combat_schedule ( Actor n,
Schedule_types  prev_sched 
)


Member Function Documentation

void Combat_schedule::start_battle (  )  [protected]

Definition at line 78 of file combat.cc.

References CSAttacked1, CSAttacked2, Game_window::get_camera_actor(), Game_window::get_main_actor(), Audio::get_ptr(), Game::get_ticks(), gwin, and Audio::start_music_combat().

Here is the call graph for this function:

bool Combat_schedule::teleport (  )  [protected]

Definition at line 155 of file combat.cc.

References c_tiles_per_chunk, Tile_coord::distance(), Map_chunk::find_spot(), Game_object::get_tile(), Exult_server::npc, Tile_coord::tx, Tile_coord::ty, and Tile_coord::tz.

Here is the call graph for this function:

void Combat_schedule::find_opponents (  )  [protected, virtual]

Reimplemented in Duel_schedule.

Definition at line 208 of file combat.cc.

References Game_object::as_actor(), Exult_queue< T >::begin(), Exult_queue< T >::end(), Actor::friendly, Actor::get_alignment(), Game_window::get_camera_actor(), Game_object::get_flag(), Ireg_game_object::get_flag(), Game_window::get_instance(), Game_window::get_main_actor(), Game_window::get_nearby_npcs(), Game_window::get_party(), Actor::get_target(), gwin, Actor::hostile, Obj_flags::in_party, Obj_flags::invisible, Exult_server::npc, and Obj_flags::si_tournament.

Here is the call graph for this function:

Actor * Combat_schedule::find_protected_attacker (  )  [protected]

Definition at line 269 of file combat.cc.

References c_tiles_per_chunk, first_will_help, Game_window::get_instance(), Game_window::get_party(), gwin, last_will_help, and Exult_server::npc.

Here is the call graph for this function:

Game_object * Combat_schedule::find_foe ( int  mode  )  [protected]

Definition at line 314 of file combat.cc.

References c_tiles_per_chunk, Actor::flee, Actor::nearest, Exult_server::npc, Actor::protect, Actor::random, Actor::remove(), Actor::strength, Actor::strongest, and Actor::weakest.

Here is the call graph for this function:

Game_object * Combat_schedule::find_foe (  )  [inline, protected]

Definition at line 413 of file combat.cc.

References Actor::manual, and Exult_server::npc.

void Combat_schedule::approach_foe (  )  [protected]

Definition at line 426 of file combat.cc.

References Game_window::add_dirty(), Actor::beserk, Can_teleport(), first_to_battle, Actor::flee, Game::get_game_type(), Game_window::get_instance(), Game_window::get_main_actor(), Game_object::get_name(), Game_window::get_std_delay(), Game_object::get_tile(), gwin, Actor::health, last_to_battle, Actor::manual, MOVE_ALL, Actor::nearest, PathFinder::NewPath(), Exult_server::npc, Off_screen(), and SERPENT_ISLE.

Here is the call graph for this function:

void Combat_schedule::start_strike (  )  [protected]

Definition at line 571 of file combat.cc.

References Actor::ammo, Schedule::duel, Rectangle::enlarge(), Game_object::get_footprint(), ShapeID::get_info(), Game_window::get_instance(), Game_object::get_lift(), Game_window::get_main_actor(), Game_object::get_name(), Audio::get_ptr(), Weapon_info::get_sfx(), ShapeID::get_shapenum(), Game_window::get_std_delay(), Game_object::get_tile(), Shape_info::get_weapon_info(), gwin, In_ammo_family(), Rectangle::intersects(), Fast_pathfinder_client::is_straight_path(), Exult_server::npc, Audio::play_sound_effect(), set_weapon(), Ucscript::sfx, Swap_weapons(), Tile_coord::tx, Tile_coord::ty, Rectangle::x, and Rectangle::y.

Here is the call graph for this function:

void Combat_schedule::run_away (  )  [protected]

Definition at line 669 of file combat.cc.

References Game_window::add_dirty(), first_flee, Game_window::get_instance(), Game_window::get_std_delay(), gwin, last_flee, Exult_server::npc, Obj_flags::si_tournament, Tile_coord::tx, and Tile_coord::ty.

Here is the call graph for this function:

Spellbook_object * Combat_schedule::readied_spellbook (  )  [protected]

Definition at line 700 of file combat.cc.

References Spellbook_object::can_do_spell(), Actor::lhand, Exult_server::npc, Exult_server::obj, Actor::rhand, and Shape_info::spellbook.

Here is the call graph for this function:

void Combat_schedule::monster_died (  )  [static]

Definition at line 105 of file combat.cc.

References Exult_queue< T >::begin(), CSBattle_Over, CSVictory, Exult_queue< T >::end(), Actor::flee, Game_window::get_nearby_npcs(), Audio::get_ptr(), Game::get_ticks(), gwin, Actor::hostile, len, and Audio::start_music_combat().

Referenced by Actor::die().

Here is the call graph for this function:

void Combat_schedule::now_what (  )  [virtual]

Implements Schedule.

Reimplemented in Duel_schedule.

Definition at line 864 of file combat.cc.

References Effects_manager::add_effect(), Game_object::as_actor(), Obj_flags::asleep, c_any_framenum, c_any_qual, Schedule::combat, Actor::flee, Schedule::follow_avatar, Actor::friendly, Game_window::get_camera_actor(), Game_window::get_effects(), Game_window::get_instance(), Game_window::get_main_actor(), Game_window::get_shape_rect(), Game_window::get_std_delay(), Actor::get_target(), Game_object::get_tile(), Game_window::get_tqueue(), Game_window::get_win_rect(), gwin, Game_window::in_combat(), Rectangle::intersects(), Need_new_opponent(), Exult_server::npc, Time_queue::remove(), Actor::set_target(), set_weapon(), Actor::standing, Tile_coord::tx, Tile_coord::ty, Tile_coord::tz, and Use_ammo().

Referenced by Duel_schedule::now_what().

Here is the call graph for this function:

void Combat_schedule::im_dormant (  )  [virtual]

Reimplemented from Schedule.

Definition at line 1035 of file combat.cc.

References Actor::friendly, and Exult_server::npc.

void Combat_schedule::ending ( int  newtype  )  [virtual]

Reimplemented from Schedule.

Definition at line 1049 of file combat.cc.

References c_tilesize, CSRun_Away, Tile_coord::distance(), Game_window::get_instance(), Game_window::get_main_actor(), Audio::get_ptr(), Game_window::get_usecode(), gwin, Usecode_machine::in_usecode(), Fast_pathfinder_client::is_grabable(), Exult_server::npc, and Audio::start_music_combat().

Here is the call graph for this function:

void Combat_schedule::set_weapon (  )  [virtual]

Reimplemented from Schedule.

Definition at line 727 of file combat.cc.

References Schedule::duel, Shape_info::get_ammo_info(), ShapeID::get_info(), gwin, Exult_server::info, Game_window::is_dragging(), Ammo_info::no_blocking(), and Exult_server::npc.

Referenced by Duel_schedule::find_opponents(), now_what(), and start_strike().

Here is the call graph for this function:

bool Combat_schedule::has_started_battle (  )  const [inline]

Definition at line 86 of file combat.h.

References started_battle.


Member Data Documentation

unsigned long Combat_schedule::battle_time [static, protected]

Definition at line 36 of file combat.h.

unsigned long Combat_schedule::battle_end_time [static, protected]

Definition at line 37 of file combat.h.

enum Combat_schedule::Phase Combat_schedule::state [protected]

Schedule_types Combat_schedule::prev_schedule [protected]

Definition at line 50 of file combat.h.

Actor_queue Combat_schedule::opponents [protected]

Definition at line 51 of file combat.h.

Game_object* Combat_schedule::practice_target [protected]

Definition at line 52 of file combat.h.

int Combat_schedule::weapon_shape [protected]

Definition at line 53 of file combat.h.

int Combat_schedule::ammo_shape [protected]

Definition at line 54 of file combat.h.

int Combat_schedule::projectile_shape [protected]

Definition at line 55 of file combat.h.

Spellbook_object* Combat_schedule::spellbook [protected]

Definition at line 56 of file combat.h.

unsigned char Combat_schedule::strike_range [protected]

Definition at line 59 of file combat.h.

unsigned char Combat_schedule::projectile_range [protected]

Definition at line 59 of file combat.h.

unsigned char Combat_schedule::max_range [protected]

Definition at line 59 of file combat.h.

bool Combat_schedule::is_thrown [protected]

Definition at line 60 of file combat.h.

bool Combat_schedule::returns [protected]

Definition at line 61 of file combat.h.

bool Combat_schedule::no_blocking [protected]

Definition at line 62 of file combat.h.

unsigned char Combat_schedule::yelled [protected]

Definition at line 63 of file combat.h.

bool Combat_schedule::started_battle [protected]

Definition at line 64 of file combat.h.

Referenced by has_started_battle().

unsigned char Combat_schedule::fleed [protected]

Definition at line 65 of file combat.h.

bool Combat_schedule::can_yell [protected]

Definition at line 66 of file combat.h.

int Combat_schedule::failures [protected]

Definition at line 67 of file combat.h.

unsigned int Combat_schedule::teleport_time [protected]

Definition at line 68 of file combat.h.


The documentation for this class was generated from the following files:
Generated on Mon Jul 9 14:48:55 2007 for ExultEngine by  doxygen 1.5.1