17 #define SINGLE_MOVE (terrain_control.move_fragments)
18 #define MOVE_COST_IGTER (terrain_control.igter_cost)
20 #define MAX_MOVE_FRAGS 65535
52 const struct unit *punit);
57 const struct tile *ptile,
58 const struct tile *pexclude);
61 const struct tile *ptile);
74 const struct tile *ptile)
81 const struct tile *src_tile,
82 const struct tile *dst_tile);
85 const struct tile *ptile);
88 const struct tile *ptile);
90 const struct unit *punit,
91 const struct tile *ptile);
93 const struct unit *punit,
94 const struct tile *ptile);
97 const struct tile *src_tile,
98 const struct tile *dst_tile,
101 const struct unit *punit,
102 const struct tile *ptile,
bool igzoc,
103 bool enter_enemy_city);
106 enum unit_activity activity,
107 const struct tile *src_tile,
108 const struct tile *dst_tile,
bool igzoc,
109 struct unit *embark_to,
bool enter_enemy_city);
111 const struct unit *transported);
119 const struct player *pplayer,
120 const struct unit *punit);
124 const char *none,
bool align);
const char * move_points_text_full(int mp, bool reduce, const char *prefix, const char *none, bool align)
Render positive movement points as text, including fractional movement points, scaled by SINGLE_MOVE.
bool can_exist_at_tile(const struct civ_map *nmap, const struct unit_type *utype, const struct tile *ptile)
Return TRUE iff a unit of the given unit type can "exist" at this location.
bool unit_can_move_to_tile(const struct civ_map *nmap, const struct unit *punit, const struct tile *ptile, bool igzoc, bool enter_enemy_city)
Returns whether the unit can move from its current tile to the destination tile.
bool is_city_channel_tile(const struct unit_class *punitclass, const struct tile *ptile, const struct tile *pexclude)
Check for a city channel.
bool can_unit_exist_at_tile(const struct civ_map *nmap, const struct unit *punit, const struct tile *ptile)
Return TRUE iff the unit can "exist" at this location.
bool is_native_tile(const struct unit_type *punittype, const struct tile *ptile)
This tile is native to unit.
bool can_step_taken_wrt_to_zoc(const struct unit_type *punittype, const struct player *unit_owner, const struct tile *src_tile, const struct tile *dst_tile, const struct civ_map *zmap)
Returns whether the unit is allowed (by ZOC) to move from src_tile to dest_tile (assumed adjacent).
int utype_unknown_move_cost(const struct unit_type *utype)
This function calculates the movement cost to unknown tiles.
bool unit_can_load(const struct unit *punit)
Return whether we can find a suitable transporter for given unit at current location.
bool can_unit_transport(const struct unit *transporter, const struct unit *transported)
Return true iff transporter has ability to transport transported.
int unit_move_rate(const struct unit *punit)
This function calculates the move rate of the unit.
bool unit_could_load_at(const struct unit *punit, const struct tile *ptile)
Return whether we could find a suitable transporter for given unit at 'ptile'.
static bool is_native_tile_to_class(const struct unit_class *punitclass, const struct tile *ptile)
bool can_attack_from_non_native(const struct unit_type *utype)
This unit can attack from non-native tiles (Marines can attack from transport, ships from harbour cit...
@ MR_DESTINATION_OCCUPIED_BY_NON_ALLIED_UNIT
@ MR_NO_TRANSPORTER_CAPACITY
bool is_airunit_refuel_point(const struct tile *ptile, const struct player *pplayer, const struct unit *punit)
Can unit refuel on tile.
bool unit_can_defend_here(const struct civ_map *nmap, const struct unit *punit)
Return TRUE iff the unit can be a defender at its current location.
bool is_native_to_class(const struct unit_class *punitclass, const struct terrain *pterrain, const bv_extras *extras)
This terrain is native to unit class.
int utype_move_rate(const struct unit_type *utype, const struct tile *ptile, const struct player *pplayer, int veteran_level, int hitpoints)
This function calculates the move rate of the unit, taking into account the penalty for reduced hitpo...
bool can_unit_survive_at_tile(const struct civ_map *nmap, const struct unit *punit, const struct tile *ptile)
Return TRUE iff the unit can "survive" at this location.
bool is_unit_being_refueled(const struct unit *punit)
Is unit being refueled in its current position.
bool is_native_near_tile(const struct civ_map *nmap, const struct unit_class *uclass, const struct tile *ptile)
Is there native tile adjacent to given tile.
bool can_unit_type_transport(const struct unit_type *transporter, const struct unit_class *transported)
Return TRUE iff transporter type has ability to transport transported class.
bool is_native_move(const struct unit_class *punitclass, const struct tile *src_tile, const struct tile *dst_tile)
Is the move under consideration a native move? Note that this function does not check for possible mo...
void init_move_fragments()
Call whenever terrain_control.move_fragments / SINGLE_MOVE changes.
bool can_attack_non_native(const struct unit_type *utype)
This unit can attack non-native tiles (eg.
const char * move_points_text(int mp, bool reduce)
Simple version of move_points_text_full() – render positive movement points as text without any prefi...
enum unit_move_result unit_move_to_tile_test(const struct civ_map *nmap, const struct unit *punit, enum unit_activity activity, const struct tile *src_tile, const struct tile *dst_tile, bool igzoc, struct unit *embark_to, bool enter_enemy_city)
Returns whether the unit can move from its current tile to the destination tile.
#define tile_terrain(_tile)
static const bv_extras * tile_extras(const struct tile *ptile)