Support functions for dealing with units. More...
#include "actions/create.hpp"
#include "formula/string_utils.hpp"
#include "resources.hpp"
#include "units/unit.hpp"
#include "units/helper.hpp"
#include "units/types.hpp"
#include "play_controller.hpp"
#include "serialization/markup.hpp"
#include "utils/general.hpp"
#include "whiteboard/manager.hpp"
Go to the source code of this file.
Namespaces | |
unit_helper | |
Functions | |
int | unit_helper::number_of_possible_advances (const unit &unit) |
Determines the total number of available advancements (of any kind) for a given unit. More... | |
bool | unit_helper::will_certainly_advance (const unit_map::iterator &u) |
Encapsulates the logic for deciding whether an iterator u points to a unit that can advance. More... | |
std::string | unit_helper::resistance_color (const int resistance) |
Maps resistance <= -60 (resistance value <= -60%) to intense red. More... | |
static std::string | unit_helper::unit_level_tooltip (const int level, const std::vector< std::string > &adv_to_types, const std::vector< config > &adv_to_mods) |
std::string | unit_helper::unit_level_tooltip (const unit &u) |
std::string | unit_helper::unit_level_tooltip (const unit_type &type) |
std::string | unit_helper::maybe_inactive (const std::string &str, bool active) |
std::string | unit_helper::format_cost_string (int unit_recall_cost, bool active) |
std::string | unit_helper::format_cost_string (int unit_recall_cost, const int team_recall_cost) |
std::string | unit_helper::format_level_string (const int level, bool recallable) |
std::string | unit_helper::format_movement_string (const int moves_left, const int moves_max, bool active) |
int | unit_helper::planned_gold_spent (int side_number) |
std::string | unit_helper::check_recruit_purse (int unit_cost, int current_purse, int investments) |
std::string | unit_helper::check_recruit_list (const std::string &type, int side_number, const map_location &target_hex) |
std::tuple< std::string, map_location, map_location > | unit_helper::validate_recruit_target (const std::string &type, int side_number, const map_location &target_hex) |
Verifies that target_hex is a valid recruit location for the given side. More... | |
Support functions for dealing with units.
Definition in file helper.cpp.