The Battle for Wesnoth  1.19.13+dev
Namespaces | Functions
helper.hpp File Reference
#include "team.hpp"
#include "units/map.hpp"
#include "units/types.hpp"
Include dependency graph for helper.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 unit_helper
 

Functions

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...
 
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...
 
std::string unit_helper::resistance_color (const int resistance)
 Maps resistance <= -60 (resistance value <= -60%) to intense red. More...
 
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, const int team_recall_cost)
 
std::string unit_helper::format_cost_string (int unit_recall_cost, bool active)
 
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_locationunit_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...