45 const struct tile *ptile)
75 const struct unit *attacker)
87 const struct unit *attacker,
88 const struct tile *location)
126 const struct tile *dest_tile)
191 const struct tile *ptile)
212 }
else if (result !=
ATT_OK) {
232 const struct tile *ptile)
259 const struct tile *ptile)
273 const struct tile *ptile)
314 const struct tile *dest_tile)
412 const struct unit *attacker,
413 const struct unit *defender,
481 const struct unit *attacker,
482 const struct unit *defender,
505 const struct tile *ptile)
551 int veteran,
int moves_left)
562 *
vlevel->power_fact / 100;
586 *
vlevel->power_fact / 100;
616 const struct unit *defender,
651 const struct unit *def,
653 const struct tile *ptile,
773 const struct unit *defender)
787 struct unit *defender)
794 if (attacker !=
NULL) {
820 const struct unit *attacker,
821 const struct unit *defender)
842 const struct unit *attacker,
843 const struct tile *ptile,
912 const struct unit *defender,
913 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
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 int const struct action *paction struct unit struct city * pcity
int get_target_bonus_effects(struct effect_list *plist, const struct req_context *context, const struct req_context *other_context, 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
int low_firepower_pearl_harbor
bool damage_reduces_bombard_rate
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_)