#include <combat.h>
Inheritance diagram for Combat_schedule:
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 () |
Actor * | find_protected_attacker () |
Game_object * | find_foe (int mode) |
Game_object * | find_foe () |
void | approach_foe () |
void | start_strike () |
void | run_away () |
Spellbook_object * | readied_spellbook () |
Protected Attributes | |
enum Combat_schedule::Phase | state |
Schedule_types | prev_schedule |
Actor_queue | opponents |
Game_object * | practice_target |
int | weapon_shape |
int | ammo_shape |
int | projectile_shape |
Spellbook_object * | spellbook |
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 |
Definition at line 33 of file combat.h.
enum Combat_schedule::Phase [protected] |
Combat_schedule::Combat_schedule | ( | Actor * | n, | |
Schedule_types | prev_sched | |||
) |
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] |
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] |
unsigned long Combat_schedule::battle_time [static, protected] |
unsigned long Combat_schedule::battle_end_time [static, protected] |
enum Combat_schedule::Phase Combat_schedule::state [protected] |
Schedule_types Combat_schedule::prev_schedule [protected] |
Actor_queue Combat_schedule::opponents [protected] |
Game_object* Combat_schedule::practice_target [protected] |
int Combat_schedule::weapon_shape [protected] |
int Combat_schedule::ammo_shape [protected] |
int Combat_schedule::projectile_shape [protected] |
Spellbook_object* Combat_schedule::spellbook [protected] |
unsigned char Combat_schedule::strike_range [protected] |
unsigned char Combat_schedule::projectile_range [protected] |
unsigned char Combat_schedule::max_range [protected] |
bool Combat_schedule::is_thrown [protected] |
bool Combat_schedule::returns [protected] |
bool Combat_schedule::no_blocking [protected] |
unsigned char Combat_schedule::yelled [protected] |
bool Combat_schedule::started_battle [protected] |
unsigned char Combat_schedule::fleed [protected] |
bool Combat_schedule::can_yell [protected] |
int Combat_schedule::failures [protected] |
unsigned int Combat_schedule::teleport_time [protected] |