attack_result_ptr readonly_context_impl::check_attack_action(const map_location& attacker_loc, const map_location& defender_loc, int attacker_weapon){ unit_map::iterator i = resources::units->find(attacker_loc); double m_aggression = i.valid() && i->can_recruit() ? get_leader_aggression() : get_aggression(); const unit_advancements_aspect& m_advancements = get_advancements(); return actions::execute_attack_action(get_side(),false,attacker_loc,defender_loc,attacker_weapon, m_aggression, m_advancements); }
attack_result_ptr readwrite_context_impl::execute_attack_action(const map_location& attacker_loc, const map_location& defender_loc, int attacker_weapon){ unit_map::iterator i = resources::units->find(attacker_loc); double m_aggression = i.valid() && i->can_recruit() ? get_leader_aggression() : get_aggression(); return actions::execute_attack_action(get_side(),true,attacker_loc,defender_loc,attacker_weapon, m_aggression); }