#include <attack.hpp>


Public Member Functions | |
| attack (size_t team_index, bool hidden, unit &mover, const map_location &target_hex, int weapon_choice, const pathfind::marked_route &route, arrow_ptr arrow, fake_unit_ptr fake_unit) | |
| attack (config const &, bool hidden) | |
| virtual | ~attack () |
| virtual std::ostream & | print (std::ostream &s) const |
| virtual void | accept (visitor &v) |
| virtual void | execute (bool &success, bool &complete) |
| Output parameters: success: Whether or not to continue an execute-all after this execution complete: Whether or not to delete this action after execution. | |
| virtual void | apply_temp_modifier (unit_map &unit_map) |
| Applies temporarily the result of this action to the specified unit map. | |
| virtual void | remove_temp_modifier (unit_map &unit_map) |
| Removes the result of this action from the specified unit map. | |
| virtual void | draw_hex (const map_location &hex) |
| Gets called by display when drawing a hex, to allow actions to draw to the screen. | |
| map_location const & | get_target_hex () const |
| virtual config | to_config () const |
| Constructs and returns a config object representing this object. | |
Protected Member Functions | |
| boost::shared_ptr< attack > | shared_from_this () |
Private Member Functions | |
| void | init () |
| virtual void | do_hide () |
| Called by the non-virtual hide() and show(), respectively. | |
| virtual void | do_show () |
| void | invalidate () |
| invalidates the move-destination and attack-target hexes | |
Private Attributes | |
| map_location | target_hex_ |
| the target of the attack | |
| int | weapon_choice_ |
| int | attack_movement_cost_ |
| int | temp_movement_subtracted_ |
Friends | |
| class | validate_visitor |
| class | highlight_visitor |
Definition at line 28 of file attack.hpp.
| attack::attack | ( | size_t | team_index, | |
| bool | hidden, | |||
| unit & | mover, | |||
| const map_location & | target_hex, | |||
| int | weapon_choice, | |||
| const pathfind::marked_route & | route, | |||
| arrow_ptr | arrow, | |||
| fake_unit_ptr | fake_unit | |||
| ) |
Definition at line 44 of file attack.cpp.
References get_target_hex(), and print().

| attack::attack | ( | config const & | cfg, | |
| bool | hidden | |||
| ) |
Definition at line 55 of file attack.cpp.
References ai::registry::init().

| attack::~attack | ( | ) | [virtual] |
Definition at line 81 of file attack.cpp.
| void attack::accept | ( | visitor & | v | ) | [virtual] |
Reimplemented from wb::move.
Definition at line 86 of file attack.cpp.
| void attack::apply_temp_modifier | ( | unit_map & | unit_map | ) | [virtual] |
Applies temporarily the result of this action to the specified unit map.
Reimplemented from wb::move.
Definition at line 138 of file attack.cpp.
| virtual void wb::attack::do_hide | ( | ) | [inline, private, virtual] |
Called by the non-virtual hide() and show(), respectively.
Reimplemented from wb::move.
Definition at line 67 of file attack.hpp.
References invalidate().

| virtual void wb::attack::do_show | ( | ) | [inline, private, virtual] |
Reimplemented from wb::move.
Definition at line 68 of file attack.hpp.
References invalidate().

| void attack::draw_hex | ( | const map_location & | hex | ) | [virtual] |
Gets called by display when drawing a hex, to allow actions to draw to the screen.
Reimplemented from wb::move.
Definition at line 178 of file attack.cpp.
| void attack::execute | ( | bool & | success, | |
| bool & | complete | |||
| ) | [virtual] |
Output parameters: success: Whether or not to continue an execute-all after this execution complete: Whether or not to delete this action after execution.
Reimplemented from wb::move.
Definition at line 102 of file attack.cpp.
References wb::move::get_dest_hex(), display::invalidate(), resources::screen, and target_hex_.

| map_location const& wb::attack::get_target_hex | ( | ) | const [inline] |
Definition at line 53 of file attack.hpp.
References target_hex_.
Referenced by attack().

| void attack::init | ( | ) | [private] |
Reimplemented from wb::move.
Definition at line 76 of file attack.cpp.
| void attack::invalidate | ( | ) | [private] |
invalidates the move-destination and attack-target hexes
Definition at line 92 of file attack.cpp.
Referenced by do_hide(), and do_show().

| std::ostream & attack::print | ( | std::ostream & | s | ) | const [virtual] |
Reimplemented from wb::move.
Definition at line 37 of file attack.cpp.
Referenced by attack().

| void attack::remove_temp_modifier | ( | unit_map & | unit_map | ) | [virtual] |
Removes the result of this action from the specified unit map.
Reimplemented from wb::move.
Definition at line 163 of file attack.cpp.
References unit::attacks_left(), wb::move::fake_unit_, and unit::movement_left().

| boost::shared_ptr<attack> wb::attack::shared_from_this | ( | ) | [inline, protected] |
Reimplemented from wb::move.
Definition at line 59 of file attack.hpp.
| config attack::to_config | ( | ) | const [virtual] |
Constructs and returns a config object representing this object.
Reimplemented from wb::move.
Definition at line 209 of file attack.cpp.
friend class highlight_visitor [friend] |
Reimplemented from wb::move.
Definition at line 32 of file attack.hpp.
friend class validate_visitor [friend] |
Reimplemented from wb::move.
Definition at line 31 of file attack.hpp.
int wb::attack::attack_movement_cost_ [private] |
Definition at line 77 of file attack.hpp.
map_location wb::attack::target_hex_ [private] |
the target of the attack
Definition at line 74 of file attack.hpp.
Referenced by execute(), and get_target_hex().
int wb::attack::temp_movement_subtracted_ [private] |
Definition at line 78 of file attack.hpp.
int wb::attack::weapon_choice_ [private] |
Definition at line 76 of file attack.hpp.
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:26:23 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |