30 std::vector<battle_context>&& weapons,
31 const int best_weapon);
41 virtual const std::string&
window_id()
const override;
Various functions that implement attacks and attack calculations.
Abstract base class for all modal dialogs.
virtual void post_show() override
Actions to be taken after the window has been shown.
int selected_weapon_
The index of the selected weapon.
unit_map::iterator defender_itor_
Iterator pointing to the defender.
virtual const std::string & window_id() const override
The ID of the window to build.
int best_weapon_
The best weapon, aka the one high-lighted.
virtual void pre_show() override
Actions to be taken before showing the window.
unit_map::iterator attacker_itor_
Iterator pointing to the attacker.
unit_attack(const unit_map::iterator &attacker_itor, const unit_map::iterator &defender_itor, std::vector< battle_context > &&weapons, const int best_weapon)
void damage_calc_callback()
int get_selected_weapon() const
std::vector< battle_context > weapons_
List of all battle contexts used for getting the weapons.