The Battle for Wesnoth  1.19.7+dev
Namespaces | Functions
helper.cpp File Reference

Support functions for dealing with units. More...

#include "units/unit.hpp"
#include "units/helper.hpp"
#include "units/types.hpp"
#include "play_controller.hpp"
#include "serialization/markup.hpp"
Include dependency graph for helper.cpp:

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)
 

Detailed Description

Support functions for dealing with units.

Definition in file helper.cpp.