![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
Include dependency graph for unit_utils.cpp:Go to the source code of this file.
Functions | |
| static int | hp_gain_coord (struct unit *punit) |
| returns how many hp's a unit will gain on this square depends on whether or not it's inside city or fortress. More... | |
| void | unit_restore_hitpoints (struct unit *punit) |
| add hitpoints to the unit, hp_gain_coord returns the amount to add united nations will speed up the process by 2 hp's / turn, means helicopters will actually not lose hp's every turn if player have that wonder. More... | |
|
static |
returns how many hp's a unit will gain on this square depends on whether or not it's inside city or fortress.
barracks will regen landunits completely airports will regen airunits completely ports will regen navalunits completely fortify will add a little extra.
Definition at line 20 of file unit_utils.cpp.
Referenced by unit_restore_hitpoints().
| void unit_restore_hitpoints | ( | struct unit * | punit | ) |
add hitpoints to the unit, hp_gain_coord returns the amount to add united nations will speed up the process by 2 hp's / turn, means helicopters will actually not lose hp's every turn if player have that wonder.
Units which have moved don't gain hp, except the United Nations and helicopter effects still occur.
If 'game.info.killunhomed' is greater than 0, unhomed units lose 'game.info.killunhomed' hitpoints each turn, killing the unit at the end.
Definition at line 45 of file unit_utils.cpp.
Referenced by freeciv::path_finder::path_finder_private::maybe_insert_vertex(), and player_restore_units().