30 hp = (
base - 1) * bonus / 100 + 1;
68 punit->
hp =
MIN(punit->
hp - hp_loss, save_hp - 1);
78 if (was_lower && punit->
activity == ACTIVITY_SENTRY) {
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 f...
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 p...
static void base(QVariant data1, QVariant data2)
Action "Build Base" for choice dialog.
int get_unit_bonus(const struct unit *punit, enum effect_type effect_type)
Returns the effect bonus at a unit.
struct packet_game_info info
enum unit_activity activity
bool tile_has_native_base(const struct tile *ptile, const struct unit_type *punittype)
Check if tile contains base native for unit.
struct city * tile_city(const struct tile *ptile)
Return the city on this tile (or nullptr), checking for city center.
void set_unit_activity(struct unit *punit, enum unit_activity new_activity)
Assign a new untargeted task to a unit.
bool unit_transported(const struct unit *pcargo)
Returns TRUE iff the unit is transported.
const struct unit_type * unit_type_get(const struct unit *punit)
Return the unit type for this unit.
struct unit_class * unit_class_get(const struct unit *punit)
Returns unit class pointer for a unit.
bool unit_has_type_flag(const struct unit *punit, enum unit_type_flag_id flag)
Return whether the unit has the given flag.