45 const struct tile *ptile)
74 const struct unit *attacker)
86 const struct unit *attacker,
87 const struct tile *location)
125 const struct tile *dest_tile)
190 const struct tile *ptile)
211 }
else if (result !=
ATT_OK) {
231 const struct tile *ptile)
258 const struct tile *ptile)
272 const struct tile *ptile)
313 const struct tile *dest_tile)
410 const struct unit *attacker,
411 const struct unit *defender,
479 const struct unit *attacker,
480 const struct unit *defender,
503 const struct tile *ptile)
546 int veteran,
int moves_left)
557 *
vlevel->power_fact / 100;
581 *
vlevel->power_fact / 100;
611 const struct unit *defender,
646 const struct unit *def,
648 const struct tile *ptile,
768 const struct unit *defender)
782 struct unit *defender)
789 if (attacker !=
NULL) {
815 const struct unit *attacker,
816 const struct unit *defender)
837 const struct unit *attacker,
838 const struct tile *ptile,
907 const struct unit *defender,
908 const struct tile *ptile)
#define BV_ISSET(bv, bit)
#define city_owner(_pcity_)
static struct fc_sockaddr_list * list
double unit_win_chance(const struct civ_map *nmap, const struct unit *attacker, const struct unit *defender, const struct action *paction)
bool is_unit_reachable_at(const struct unit *defender, const struct unit *attacker, const struct tile *location)
bool is_stack_vulnerable(const struct tile *ptile)
int get_virtual_defense_power(const struct civ_map *nmap, const struct unit_type *att_type, const struct unit_type *def_type, struct player *def_player, struct tile *ptile, bool fortified, int veteran)
static enum unit_attack_result unit_attack_any_at_tile_result(const struct unit *punit, const struct action *paction, const struct tile *ptile)
int get_attack_power(const struct unit *punit)
int unit_bombard_rate(struct unit *punit)
int combat_bonus_against(const struct combat_bonus_list *list, const struct unit_type *enemy, enum combat_bonus_type type)
int get_fortified_defense_power(const struct unit *attacker, struct unit *defender)
enum unit_attack_result unit_attack_units_at_tile_result(const struct unit *punit, const struct action *paction, const struct tile *ptile)
static int get_defense_rating(const struct civ_map *nmap, const struct unit *attacker, const struct unit *defender)
struct unit * get_attacker(const struct civ_map *nmap, const struct unit *defender, const struct tile *ptile)
int base_get_attack_power(const struct unit_type *punittype, int veteran, int moves_left)
struct city * sdi_try_defend(const struct civ_map *nmap, const struct player *owner, const struct tile *ptile)
int get_total_defense_power(const struct unit *attacker, const struct unit *defender)
int get_total_attack_power(const struct unit *attacker, const struct unit *defender, const struct action *paction)
enum unit_attack_result unit_attack_unit_at_tile_result(const struct unit *punit, const struct action *paction, const struct unit *pdefender, const struct tile *dest_tile)
static enum unit_attack_result unit_attack_all_at_tile_result(const struct unit *punit, const struct action *paction, const struct tile *ptile)
static int get_defense_power(const struct unit *punit)
bool is_tired_attack(int moves_left)
static int defense_multiplication(const struct unit_type *att_type, const struct unit *def, const struct player *def_player, const struct tile *ptile, int defensepower)
double win_chance(int as, int ahp, int afp, int ds, int dhp, int dfp)
enum unit_attack_result unit_wipe_units_at_tile_result(const struct unit *punit, const struct tile *ptile)
struct unit * get_defender(const struct civ_map *nmap, const struct unit *attacker, const struct tile *ptile, const struct action *paction)
struct unit * get_diplomatic_defender(const struct unit *act_unit, const struct unit *pvictim, const struct tile *tgt_tile, const struct action *paction)
bool can_unit_attack_tile(const struct unit *punit, const struct action *paction, const struct tile *dest_tile)
int base_get_defense_power(const struct unit *punit)
void get_modified_firepower(const struct civ_map *nmap, const struct unit *attacker, const struct unit *defender, int *att_fp, int *def_fp)
static bool can_player_attack_tile(const struct player *pplayer, const struct tile *ptile)
static bool is_unit_reachable_by_unit(const struct unit *defender, const struct unit *attacker)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
int get_target_bonus_effects(struct effect_list *plist, const struct req_context *context, const struct player *other_player, enum effect_type effect_type)
int get_unittype_bonus(const struct player *pplayer, const struct tile *ptile, const struct unit_type *punittype, const struct action *paction, enum effect_type effect_type)
#define fc_assert_ret_val(condition, val)
#define fc_assert_action(condition, action)
#define square_iterate(nmap, center_tile, radius, tile_itr)
#define square_iterate_end
bool can_exist_at_tile(const struct civ_map *nmap, const struct unit_type *utype, const struct tile *ptile)
bool is_native_tile(const struct unit_type *punittype, const struct tile *ptile)
bool can_attack_non_native_hard_reqs(const struct unit_type *utype)
bool unit_can_defend_here(const struct civ_map *nmap, const struct unit *punit)
static bool is_native_tile_to_class(const struct unit_class *punitclass, const struct tile *ptile)
bool pplayers_at_war(const struct player *pplayer, const struct player *pplayer2)
bool pplayers_allied(const struct player *pplayer, const struct player *pplayer2)
struct packet_game_info info
bool damage_reduces_bombard_rate
int low_firepower_pearl_harbour
int low_firepower_nonnat_bombard
int low_firepower_combat_bonus
bool unreachable_protects
int low_firepower_badwallattacker
struct veteran_system * veteran
enum unit_activity activity
bool tile_has_extra_flag(const struct tile *ptile, enum extra_flag_id flag)
int tile_extras_defense_bonus(const struct tile *ptile, const struct unit_type *punittype)
bool tile_has_native_base(const struct tile *ptile, const struct unit_type *punittype)
struct city * tile_city(const struct tile *ptile)
#define tile_terrain(_tile)
struct unit * unit_virtual_create(struct player *pplayer, struct city *pcity, const struct unit_type *punittype, int veteran_level)
void unit_virtual_destroy(struct unit *punit)
void unit_tile_set(struct unit *punit, struct tile *ptile)
bool unit_transported(const struct unit *pcargo)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const struct unit_type * unit_type_get(const struct unit *punit)
bool utype_has_class_flag(const struct unit_type *ptype, enum unit_class_flag_id flag)
int unit_build_shield_cost_base(const struct unit *punit)
bool utype_can_do_act_when_ustate(const struct unit_type *punit_type, const action_id act_id, const enum ustate_prop prop, const bool is_there)
struct unit_class * unit_class_get(const struct unit *punit)
bool utype_can_do_action_result(const struct unit_type *putype, enum action_result result)
const struct veteran_level * utype_veteran_level(const struct unit_type *punittype, int level)
bool unit_has_type_flag(const struct unit *punit, enum unit_type_flag_id flag)
Unit_type_id utype_index(const struct unit_type *punittype)
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)
static bool uclass_has_flag(const struct unit_class *punitclass, enum unit_class_flag_id flag)
#define combat_bonus_list_iterate_end
#define combat_bonus_list_iterate(bonuslist, pbonus)
static bool utype_has_flag(const struct unit_type *punittype, int flag)
#define uclass_index(_c_)