attack Class Reference
Executes an
attack.
More...
#include <actions.hpp>
List of all members.
Detailed Description
Executes an
attack.
Definition at line 165 of file actions.hpp.
Constructor & Destructor Documentation
Battle logic.
Definition at line 841 of file actions.cpp.
References _, a_, a_id_, a_stats_, unit_map::add(), config::add_child(), unit::add_modification(), statistics::attack_context::attack_excepted_damage(), statistics::attack_context::attack_result(), attack_with_, attacker_, attacker_cth_, attacker_damage_, attackerxp_, bc_, cfg, battle_context::unit_stats::chance_to_hit, d_, d_id_, d_stats_, battle_context::unit_stats::damage, DBG_NG, statistics::attack_context::defend_result(), defend_with_, defender_, defender_cth_, defender_damage_, defenderxp_, DELAY_END_LEVEL, delayed_exception, battle_context::unit_stats::drains, game_display::draw(), preferences::encountered_units(), boost::foreach_detail_::end(), unit_map::end(), lg::engine, unit_map::erase(), errbuf_, unit_map::find(), game_events::fire(), fire_event(), battle_context::unit_stats::firststrike, battle_context::get_attacker_stats(), battle_context::get_defender_stats(), get_random(), get_random_results(), gui_, unit::heal_all(), statistics::attack_context::HITS, game_display::invalidate(), display::invalidate_all(), game_display::invalidate_unit(), game_config::kill_experience, statistics::attack_context::KILLS, lexical_cast(), LOG_NG, log_scope2, map_, game_events::entity_location::matches_unit(), statistics::attack_context::MISSES, n_attacks_, n_defends_, attack_type::name(), battle_context::unit_stats::num_blows, OOS_error_, orig_attacks_, orig_defends_, battle_context::unit_stats::plague_type, battle_context::unit_stats::plagues, battle_context::unit_stats::poisons, recalculate_fog(), display::recalculate_minimap(), refresh_bc(), battle_context::unit_stats::rounds, unit::set_attacks(), set_random_results(), battle_context::unit_stats::slow_damage, battle_context::unit_stats::slows, state_, battle_context::unit_stats::stones, utils::string_bool(), teams_, THROW_END_LEVEL, replay::throw_error(), unit::type_id(), unit_type_data::types(), unit_display::unit_attack(), unit_display::unit_die(), unit_dump(), units_, update_display_, and battle_context::unit_stats::weapon.
Member Function Documentation
void attack::fire_event |
( |
const std::string & |
n |
) |
[private] |
- Todo:
- FIXME: If the event removes this attack, we should stop attacking.
Definition at line 750 of file actions.cpp.
References a_, a_id_, a_stats_, config::add_child(), attacker_, config::child(), d_, d_id_, d_stats_, defender_, DELAY_END_LEVEL, delayed_exception, game_display::draw(), unit_map::end(), unit_map::find(), game_events::fire(), gui_, attack_type::id(), LOG_NG, map_, recalculate_fog(), display::recalculate_minimap(), teams_, units_, update_display_, config::values, and battle_context::unit_stats::weapon.
Referenced by attack().
void attack::refresh_bc |
( |
|
) |
[private] |
Definition at line 817 of file actions.cpp.
References a_, a_stats_, attack_with_, attacker_, attacker_cth_, attacker_damage_, bc_, battle_context::unit_stats::chance_to_hit, d_, d_stats_, battle_context::unit_stats::damage, defend_with_, defender_, defender_cth_, defender_damage_, unit_map::end(), unit_map::find(), battle_context::get_attacker_stats(), battle_context::get_defender_stats(), map_, state_, teams_, and units_.
Referenced by attack().
Member Data Documentation
The documentation for this class was generated from the following files: