Project Alice
Loading...
Searching...
No Matches
military Namespace Reference

Namespaces

namespace  cb_flag
 

Classes

struct  available_cb
 
struct  full_wg
 
struct  global_military_state
 
struct  land_battle_report
 
struct  leader_counts
 
struct  mobilization_order
 
struct  naval_battle_report
 
struct  participation
 
struct  reserve_regiment
 
struct  ship_in_battle
 
struct  unit_definition
 
struct  wg_summary
 

Enumerations

enum class  unit_type : uint8_t {
  support , big_ship , cavalry , transport ,
  light_ship , special , infantry
}
 
enum class  battle_result { indecisive , attacker_won , defender_won }
 
enum class  war_role { none , attacker , defender }
 
enum class  war_result { draw , attacker_won , defender_won }
 
enum class  crossing_type { none , river , sea }
 

Functions

std::string get_war_name (sys::state &, dcon::war_id)
 
template auto province_is_blockaded< ve::tagged_vector< dcon::province_id > > (sys::state const &, ve::tagged_vector< dcon::province_id >)
 
template auto province_is_under_siege< ve::tagged_vector< dcon::province_id > > (sys::state const &, ve::tagged_vector< dcon::province_id >)
 
template auto battle_is_ongoing_in_province< ve::tagged_vector< dcon::province_id > > (sys::state const &, ve::tagged_vector< dcon::province_id >)
 
int32_t total_regiments (sys::state &state, dcon::nation_id n)
 
int32_t total_ships (sys::state &state, dcon::nation_id n)
 
void reset_unit_stats (sys::state &state)
 
void apply_base_unit_stat_modifiers (sys::state &state)
 
void invalidate_unowned_wargoals (sys::state &state)
 
void restore_unsaved_values (sys::state &state)
 
bool can_use_cb_against (sys::state &state, dcon::nation_id from, dcon::nation_id target)
 
bool can_add_always_cb_to_war (sys::state &state, dcon::nation_id actor, dcon::nation_id target, dcon::cb_type_id cb, dcon::war_id w)
 
bool cb_conditions_satisfied (sys::state &state, dcon::nation_id actor, dcon::nation_id target, dcon::cb_type_id cb)
 
bool cb_instance_conditions_satisfied (sys::state &state, dcon::nation_id actor, dcon::nation_id target, dcon::cb_type_id cb, dcon::state_definition_id st, dcon::national_identity_id tag, dcon::nation_id secondary)
 
bool province_is_blockaded (sys::state const &state, dcon::province_id ids)
 
bool compute_blockade_status (sys::state &state, dcon::province_id p)
 
void update_blockade_status (sys::state &state)
 
bool province_is_under_siege (sys::state const &state, dcon::province_id ids)
 
float recruited_pop_fraction (sys::state const &state, dcon::nation_id n)
 
bool state_has_naval_base (sys::state const &state, dcon::state_instance_id si)
 
bool are_at_war (sys::state const &state, dcon::nation_id a, dcon::nation_id b)
 
bool are_allied_in_war (sys::state const &state, dcon::nation_id a, dcon::nation_id b)
 
bool are_in_common_war (sys::state const &state, dcon::nation_id a, dcon::nation_id b)
 
void remove_from_common_allied_wars (sys::state &state, dcon::nation_id a, dcon::nation_id b)
 
participation internal_find_war_between (sys::state const &state, dcon::nation_id a, dcon::nation_id b)
 
dcon::war_id find_war_between (sys::state const &state, dcon::nation_id a, dcon::nation_id b)
 
bool joining_war_does_not_violate_constraints (sys::state const &state, dcon::nation_id a, dcon::war_id w, bool as_attacker)
 
bool is_civil_war (sys::state const &state, dcon::war_id w)
 
bool is_defender_wargoal (sys::state const &state, dcon::war_id w, dcon::wargoal_id wg)
 
bool defenders_have_non_status_quo_wargoal (sys::state const &state, dcon::war_id w)
 
bool defenders_have_status_quo_wargoal (sys::state const &state, dcon::war_id w)
 
bool attackers_have_status_quo_wargoal (sys::state const &state, dcon::war_id w)
 
bool joining_as_attacker_would_break_truce (sys::state &state, dcon::nation_id a, dcon::war_id w)
 
int32_t supply_limit_in_province (sys::state &state, dcon::nation_id n, dcon::province_id p)
 
int32_t regiments_created_from_province (sys::state &state, dcon::province_id p)
 
int32_t mobilized_regiments_created_from_province (sys::state &state, dcon::province_id p)
 
int32_t regiments_possible_from_pop (sys::state &state, dcon::pop_id p)
 
int32_t regiments_max_possible_from_province (sys::state &state, dcon::province_id p)
 
int32_t main_culture_regiments_created_from_province (sys::state &state, dcon::province_id p)
 
int32_t main_culture_regiments_max_possible_from_province (sys::state &state, dcon::province_id p)
 
int32_t regiments_under_construction_in_province (sys::state &state, dcon::province_id p)
 
int32_t main_culture_regiments_under_construction_in_province (sys::state &state, dcon::province_id p)
 
dcon::pop_id find_available_soldier (sys::state &state, dcon::province_id p, dcon::culture_id pop_culture)
 
dcon::pop_id find_available_soldier (sys::state &state, dcon::province_id p, bool require_accepted)
 
int32_t mobilized_regiments_possible_from_province (sys::state &state, dcon::province_id p)
 
int32_t mobilized_regiments_pop_limit (sys::state &state, dcon::nation_id n)
 
void update_recruitable_regiments (sys::state &state, dcon::nation_id n)
 
void update_all_recruitable_regiments (sys::state &state)
 
void regenerate_total_regiment_counts (sys::state &state)
 
void regenerate_land_unit_average (sys::state &state)
 
void regenerate_ship_scores (sys::state &state)
 
int32_t naval_supply_points (sys::state &state, dcon::nation_id n)
 
int32_t naval_supply_points_used (sys::state &state, dcon::nation_id n)
 
uint32_t naval_supply_from_naval_base (sys::state &state, dcon::province_id prov, dcon::nation_id nation)
 
void update_naval_supply_points (sys::state &state)
 
float mobilization_size (sys::state const &state, dcon::nation_id n)
 
float mobilization_impact (sys::state const &state, dcon::nation_id n)
 
void update_cbs (sys::state &state)
 
void add_cb (sys::state &state, dcon::nation_id n, dcon::cb_type_id cb, dcon::nation_id target)
 
float cb_infamy (sys::state const &state, dcon::cb_type_id t)
 
float truce_break_cb_prestige_cost (sys::state &state, dcon::cb_type_id t)
 
float truce_break_cb_militancy (sys::state &state, dcon::cb_type_id t)
 
float truce_break_cb_infamy (sys::state &state, dcon::cb_type_id t)
 
int32_t province_point_cost (sys::state &state, dcon::province_id p, dcon::nation_id n)
 
int32_t peace_cost (sys::state &state, dcon::war_id war, dcon::cb_type_id wargoal, dcon::nation_id from, dcon::nation_id target, dcon::nation_id secondary_nation, dcon::state_definition_id wargoal_state, dcon::national_identity_id wargoal_tag)
 
int32_t cost_of_peace_offer (sys::state &state, dcon::peace_offer_id offer)
 
int32_t peace_offer_truce_months (sys::state &state, dcon::peace_offer_id offer)
 
int32_t attacker_peace_cost (sys::state &state, dcon::war_id war)
 
int32_t defender_peace_cost (sys::state &state, dcon::war_id war)
 
float successful_cb_prestige (sys::state &state, dcon::cb_type_id t, dcon::nation_id actor)
 
float crisis_cb_addition_infamy_cost (sys::state &state, dcon::cb_type_id type, dcon::nation_id from, dcon::nation_id target)
 
float cb_addition_infamy_cost (sys::state &state, dcon::war_id war, dcon::cb_type_id type, dcon::nation_id from, dcon::nation_id target)
 
bool cb_requires_selection_of_a_valid_nation (sys::state const &state, dcon::cb_type_id t)
 
bool cb_requires_selection_of_a_liberatable_tag (sys::state const &state, dcon::cb_type_id t)
 
bool cb_requires_selection_of_a_state (sys::state const &state, dcon::cb_type_id t)
 
void execute_cb_discovery (sys::state &state, dcon::nation_id n)
 
bool leader_is_in_combat (sys::state &state, dcon::leader_id l)
 
dcon::leader_id make_new_leader (sys::state &state, dcon::nation_id n, bool is_general)
 
void kill_leader (sys::state &state, dcon::leader_id l)
 
leader_counts count_leaders (sys::state &state, dcon::nation_id n)
 
int32_t count_armies (sys::state &state, dcon::nation_id n)
 
int32_t count_navies (sys::state &state, dcon::nation_id n)
 
void monthly_leaders_update (sys::state &state)
 
void daily_leaders_update (sys::state &state)
 
bool has_truce_with (sys::state &state, dcon::nation_id attacker, dcon::nation_id target)
 
dcon::regiment_id create_new_regiment (sys::state &state, dcon::nation_id n, dcon::unit_type_id t)
 
dcon::ship_id create_new_ship (sys::state &state, dcon::nation_id n, dcon::unit_type_id t)
 
void give_military_access (sys::state &state, dcon::nation_id accessing_nation, dcon::nation_id target)
 
void remove_military_access (sys::state &state, dcon::nation_id accessing_nation, dcon::nation_id target)
 
void end_wars_between (sys::state &state, dcon::nation_id a, dcon::nation_id b)
 
void populate_war_text_subsitutions (sys::state &state, dcon::war_id w, text::substitution_map &sub)
 
void add_to_war (sys::state &state, dcon::war_id w, dcon::nation_id n, bool as_attacker, bool on_war_creation)
 
bool is_attacker (sys::state &state, dcon::war_id w, dcon::nation_id n)
 
war_role get_role (sys::state const &state, dcon::war_id w, dcon::nation_id n)
 
dcon::war_id create_war (sys::state &state, dcon::nation_id primary_attacker, dcon::nation_id primary_defender, dcon::cb_type_id primary_wargoal, dcon::state_definition_id primary_wargoal_state, dcon::national_identity_id primary_wargoal_tag, dcon::nation_id primary_wargoal_secondary)
 
bool standard_war_joining_is_possible (sys::state &state, dcon::war_id wfor, dcon::nation_id n, bool as_attacker)
 
void call_defender_allies (sys::state &state, dcon::war_id wfor)
 
void call_attacker_allies (sys::state &state, dcon::war_id wfor)
 
void add_wargoal (sys::state &state, dcon::war_id wfor, dcon::nation_id added_by, dcon::nation_id target, dcon::cb_type_id type, dcon::state_definition_id sd, dcon::national_identity_id tag, dcon::nation_id secondary_nation)
 
void remove_from_war (sys::state &state, dcon::war_id w, dcon::nation_id n, bool as_loss)
 
void cleanup_war (sys::state &state, dcon::war_id w, war_result result)
 
void set_initial_leaders (sys::state &state)
 
void take_from_sphere (sys::state &state, dcon::nation_id member, dcon::nation_id new_gp)
 
void implement_war_goal (sys::state &state, dcon::war_id war, dcon::cb_type_id wargoal, dcon::nation_id from, dcon::nation_id target, dcon::nation_id secondary_nation, dcon::state_definition_id wargoal_state, dcon::national_identity_id wargoal_t)
 
void run_gc (sys::state &state)
 
void add_truce_between_sides (sys::state &state, dcon::war_id w, int32_t months)
 
void add_truce_from_nation (sys::state &state, dcon::war_id w, dcon::nation_id n, int32_t months)
 
void add_truce (sys::state &state, dcon::nation_id a, dcon::nation_id b, int32_t days)
 
void implement_peace_offer (sys::state &state, dcon::peace_offer_id offer)
 
void reject_peace_offer (sys::state &state, dcon::peace_offer_id offer)
 
void update_ticking_war_score (sys::state &state)
 
float primary_warscore_from_blockades (sys::state &state, dcon::war_id w)
 
float primary_warscore (sys::state &state, dcon::war_id w)
 
float primary_warscore_from_occupation (sys::state &state, dcon::war_id w)
 
float primary_warscore_from_battles (sys::state &state, dcon::war_id w)
 
float primary_warscore_from_war_goals (sys::state &state, dcon::war_id w)
 
float directed_warscore (sys::state &state, dcon::war_id w, dcon::nation_id primary, dcon::nation_id secondary)
 
bool can_embark_onto_sea_tile (sys::state &state, dcon::nation_id from, dcon::province_id p, dcon::army_id a)
 
dcon::navy_id find_embark_target (sys::state &state, dcon::nation_id from, dcon::province_id p, dcon::army_id a)
 
float effective_army_speed (sys::state &state, dcon::army_id a)
 
float effective_navy_speed (sys::state &state, dcon::navy_id n)
 
sys::date arrival_time_to (sys::state &state, dcon::army_id a, dcon::province_id p)
 
sys::date arrival_time_to (sys::state &state, dcon::navy_id n, dcon::province_id p)
 
void add_army_to_battle (sys::state &state, dcon::army_id a, dcon::land_battle_id b, war_role r)
 
void army_arrives_in_province (sys::state &state, dcon::army_id a, dcon::province_id p, crossing_type crossing, dcon::land_battle_id from)
 
void add_navy_to_battle (sys::state &state, dcon::navy_id n, dcon::naval_battle_id b, war_role r)
 
bool retreat (sys::state &state, dcon::navy_id n)
 
bool retreat (sys::state &state, dcon::army_id n)
 
dcon::nation_id get_naval_battle_lead_attacker (sys::state &state, dcon::naval_battle_id b)
 
dcon::nation_id get_naval_battle_lead_defender (sys::state &state, dcon::naval_battle_id b)
 
dcon::nation_id get_land_battle_lead_attacker (sys::state &state, dcon::land_battle_id b)
 
dcon::nation_id get_land_battle_lead_defender (sys::state &state, dcon::land_battle_id b)
 
float get_leader_select_score (sys::state &state, dcon::leader_id l)
 
void update_battle_leaders (sys::state &state, dcon::land_battle_id b)
 
void update_battle_leaders (sys::state &state, dcon::naval_battle_id b)
 
void cleanup_army (sys::state &state, dcon::army_id n)
 
void cleanup_navy (sys::state &state, dcon::navy_id n)
 
void adjust_leader_prestige (sys::state &state, dcon::leader_id l, float value)
 
void adjust_regiment_experience (sys::state &state, dcon::nation_id n, dcon::regiment_id l, float value)
 
void adjust_ship_experience (sys::state &state, dcon::nation_id n, dcon::ship_id r, float value)
 
void end_battle (sys::state &state, dcon::land_battle_id b, battle_result result)
 
void end_battle (sys::state &state, dcon::naval_battle_id b, battle_result result)
 
dcon::nation_id tech_nation_for_regiment (sys::state &state, dcon::regiment_id r)
 
bool will_recieve_attrition (sys::state &state, dcon::navy_id a)
 
float peacetime_attrition_limit (sys::state &state, dcon::nation_id n, dcon::province_id prov)
 
bool will_recieve_attrition (sys::state &state, dcon::army_id a)
 
float relative_attrition_amount (sys::state &state, dcon::navy_id a, dcon::province_id prov)
 
float local_army_weight (sys::state &state, dcon::province_id prov)
 
float local_army_weight_max (sys::state &state, dcon::province_id prov)
 
float local_enemy_army_weight_max (sys::state &state, dcon::province_id prov, dcon::nation_id nation)
 
float relative_attrition_amount (sys::state &state, dcon::army_id a, dcon::province_id prov)
 
float attrition_amount (sys::state &state, dcon::navy_id a)
 
float attrition_amount (sys::state &state, dcon::army_id a)
 
void apply_attrition (sys::state &state)
 
void apply_regiment_damage (sys::state &state)
 
void update_land_battles (sys::state &state)
 
void update_naval_battles (sys::state &state)
 
uint8_t make_dice_rolls (sys::state &state, uint32_t seed)
 
void navy_arrives_in_province (sys::state &state, dcon::navy_id n, dcon::province_id p, dcon::naval_battle_id from)
 
void update_movement (sys::state &state)
 
float fractional_distance_covered (sys::state &state, dcon::army_id a)
 
float fractional_distance_covered (sys::state &state, dcon::navy_id a)
 
int32_t transport_capacity (sys::state &state, dcon::navy_id n)
 
int32_t free_transport_capacity (sys::state &state, dcon::navy_id n)
 
void send_rebel_hunter_to_next_province (sys::state &state, dcon::army_id ar, dcon::province_id prov)
 
bool siege_potential (sys::state &state, dcon::nation_id army_controller, dcon::nation_id province_controller)
 
void update_siege_progress (sys::state &state)
 
void update_blackflag_status (sys::state &state, dcon::province_id p)
 
void eject_ships (sys::state &state, dcon::province_id p)
 
void increase_dig_in (sys::state &state)
 
economy::commodity_set get_required_supply (sys::state &state, dcon::nation_id owner, dcon::army_id army)
 
economy::commodity_set get_required_supply (sys::state &state, dcon::nation_id owner, dcon::navy_id navy)
 
void recover_org (sys::state &state)
 
float reinforce_amount (sys::state &state, dcon::army_id a)
 
void reinforce_regiments (sys::state &state)
 
void repair_ships (sys::state &state)
 
void start_mobilization (sys::state &state, dcon::nation_id n)
 
void end_mobilization (sys::state &state, dcon::nation_id n)
 
void advance_mobilizations (sys::state &state)
 
bool can_retreat_from_battle (sys::state &state, dcon::naval_battle_id battle)
 
bool can_retreat_from_battle (sys::state &state, dcon::land_battle_id battle)
 
bool state_claimed_in_war (sys::state &state, dcon::war_id w, dcon::nation_id from, dcon::nation_id target, dcon::state_definition_id cb_state)
 
bool war_goal_would_be_duplicate (sys::state &state, dcon::nation_id source, dcon::war_id w, dcon::nation_id target, dcon::cb_type_id cb_type, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation)
 
void update_blackflag_status (sys::state &state)
 
bool rebel_army_in_province (sys::state &state, dcon::province_id p)
 
dcon::province_id find_land_rally_pt (sys::state &state, dcon::nation_id by, dcon::province_id start)
 
dcon::province_id find_naval_rally_pt (sys::state &state, dcon::nation_id by, dcon::province_id start)
 
void move_land_to_merge (sys::state &state, dcon::nation_id by, dcon::army_id a, dcon::province_id start, dcon::province_id dest)
 
void move_navy_to_merge (sys::state &state, dcon::nation_id by, dcon::navy_id a, dcon::province_id start, dcon::province_id dest)
 
bool pop_eligible_for_mobilization (sys::state &state, dcon::pop_id p)
 
void disband_regiment_w_pop_death (sys::state &state, dcon::regiment_id reg_id)
 
template<typename T >
auto province_is_blockaded (sys::state const &state, T ids)
 
template<typename T >
auto province_is_under_siege (sys::state const &state, T ids)
 
template<typename T >
auto battle_is_ongoing_in_province (sys::state const &state, T ids)
 

Variables

constexpr float org_dam_mul = 0.18f
 
constexpr float str_dam_mul = 0.14f
 
constexpr float combat_modifier_table []
 
constexpr float siege_speed_mul = 1.0f / 50.0f
 
constexpr uint8_t defender_bonus_crossing_mask = 0xC0
 
constexpr uint8_t defender_bonus_crossing_none = 0x00
 
constexpr uint8_t defender_bonus_crossing_river = 0x40
 
constexpr uint8_t defender_bonus_crossing_sea = 0x80
 
constexpr uint8_t defender_bonus_dig_in_mask = 0x3F
 
constexpr int32_t days_before_retreat = 11
 

Enumeration Type Documentation

◆ battle_result

enum class military::battle_result
strong
Enumerator
indecisive 
attacker_won 
defender_won 

Definition at line 259 of file military.hpp.

◆ crossing_type

enum class military::crossing_type
strong
Enumerator
none 
river 
sea 

Definition at line 441 of file military.hpp.

◆ unit_type

enum class military::unit_type : uint8_t
strong
Enumerator
support 
big_ship 
cavalry 
transport 
light_ship 
special 
infantry 

Definition at line 93 of file military.hpp.

◆ war_result

enum class military::war_result
strong
Enumerator
draw 
attacker_won 
defender_won 

Definition at line 397 of file military.hpp.

◆ war_role

enum class military::war_role
strong
Enumerator
none 
attacker 
defender 

Definition at line 307 of file military.hpp.

Function Documentation

◆ add_army_to_battle()

void military::add_army_to_battle ( sys::state state,
dcon::army_id  a,
dcon::land_battle_id  b,
war_role  r 
)

Definition at line 3917 of file military.cpp.

◆ add_cb()

void military::add_cb ( sys::state state,
dcon::nation_id  n,
dcon::cb_type_id  cb,
dcon::nation_id  target 
)

Definition at line 1261 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_navy_to_battle()

void military::add_navy_to_battle ( sys::state state,
dcon::navy_id  n,
dcon::naval_battle_id  b,
war_role  r 
)

Definition at line 4121 of file military.cpp.

◆ add_to_war()

void military::add_to_war ( sys::state state,
dcon::war_id  w,
dcon::nation_id  n,
bool  as_attacker,
bool  on_war_creation 
)

Definition at line 2109 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_truce()

void military::add_truce ( sys::state state,
dcon::nation_id  a,
dcon::nation_id  b,
int32_t  days 
)

Definition at line 3193 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_truce_between_sides()

void military::add_truce_between_sides ( sys::state state,
dcon::war_id  w,
int32_t  months 
)

Definition at line 3143 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_truce_from_nation()

void military::add_truce_from_nation ( sys::state state,
dcon::war_id  w,
dcon::nation_id  n,
int32_t  months 
)

Definition at line 3173 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_wargoal()

void military::add_wargoal ( sys::state state,
dcon::war_id  wfor,
dcon::nation_id  added_by,
dcon::nation_id  target,
dcon::cb_type_id  type,
dcon::state_definition_id  sd,
dcon::national_identity_id  tag,
dcon::nation_id  secondary_nation 
)

Definition at line 2409 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adjust_leader_prestige()

void military::adjust_leader_prestige ( sys::state state,
dcon::leader_id  l,
float  value 
)

Definition at line 4500 of file military.cpp.

◆ adjust_regiment_experience()

void military::adjust_regiment_experience ( sys::state state,
dcon::nation_id  n,
dcon::regiment_id  l,
float  value 
)

Definition at line 4505 of file military.cpp.

◆ adjust_ship_experience()

void military::adjust_ship_experience ( sys::state state,
dcon::nation_id  n,
dcon::ship_id  r,
float  value 
)

Definition at line 4514 of file military.cpp.

◆ advance_mobilizations()

void military::advance_mobilizations ( sys::state state)

Definition at line 7128 of file military.cpp.

Here is the caller graph for this function:

◆ apply_attrition()

void military::apply_attrition ( sys::state state)

Definition at line 5083 of file military.cpp.

Here is the caller graph for this function:

◆ apply_base_unit_stat_modifiers()

void military::apply_base_unit_stat_modifiers ( sys::state state)

Definition at line 45 of file military.cpp.

Here is the caller graph for this function:

◆ apply_regiment_damage()

void military::apply_regiment_damage ( sys::state state)

Definition at line 5142 of file military.cpp.

Here is the caller graph for this function:

◆ are_allied_in_war()

bool military::are_allied_in_war ( sys::state const &  state,
dcon::nation_id  a,
dcon::nation_id  b 
)

Definition at line 486 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ are_at_war()

bool military::are_at_war ( sys::state const &  state,
dcon::nation_id  a,
dcon::nation_id  b 
)

Definition at line 475 of file military.cpp.

Here is the call graph for this function:

◆ are_in_common_war()

bool military::are_in_common_war ( sys::state const &  state,
dcon::nation_id  a,
dcon::nation_id  b 
)

Definition at line 497 of file military.cpp.

Here is the caller graph for this function:

◆ army_arrives_in_province()

void military::army_arrives_in_province ( sys::state state,
dcon::army_id  a,
dcon::province_id  p,
crossing_type  crossing,
dcon::land_battle_id  from 
)

Definition at line 3992 of file military.cpp.

Here is the caller graph for this function:

◆ arrival_time_to() [1/2]

sys::date military::arrival_time_to ( sys::state state,
dcon::army_id  a,
dcon::province_id  p 
)

Definition at line 3889 of file military.cpp.

Here is the caller graph for this function:

◆ arrival_time_to() [2/2]

sys::date military::arrival_time_to ( sys::state state,
dcon::navy_id  n,
dcon::province_id  p 
)

Definition at line 3903 of file military.cpp.

◆ attacker_peace_cost()

int32_t military::attacker_peace_cost ( sys::state state,
dcon::war_id  war 
)

Definition at line 1682 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ attackers_have_status_quo_wargoal()

bool military::attackers_have_status_quo_wargoal ( sys::state const &  state,
dcon::war_id  w 
)

Definition at line 599 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ attrition_amount() [1/2]

float military::attrition_amount ( sys::state state,
dcon::army_id  a 
)

Definition at line 5079 of file military.cpp.

Here is the call graph for this function:

◆ attrition_amount() [2/2]

float military::attrition_amount ( sys::state state,
dcon::navy_id  a 
)

Definition at line 5076 of file military.cpp.

Here is the caller graph for this function:

◆ battle_is_ongoing_in_province()

template<typename T >
auto military::battle_is_ongoing_in_province ( sys::state const &  state,
ids 
)

Definition at line 17 of file military_templates.hpp.

Here is the caller graph for this function:

◆ battle_is_ongoing_in_province< ve::tagged_vector< dcon::province_id > >()

template auto military::battle_is_ongoing_in_province< ve::tagged_vector< dcon::province_id > > ( sys::state const &  ,
ve::tagged_vector< dcon::province_id >   
)

◆ call_attacker_allies()

void military::call_attacker_allies ( sys::state state,
dcon::war_id  wfor 
)

Definition at line 2389 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ call_defender_allies()

void military::call_defender_allies ( sys::state state,
dcon::war_id  wfor 
)

Definition at line 2358 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ can_add_always_cb_to_war()

bool military::can_add_always_cb_to_war ( sys::state state,
dcon::nation_id  actor,
dcon::nation_id  target,
dcon::cb_type_id  cb,
dcon::war_id  w 
)

Definition at line 110 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ can_embark_onto_sea_tile()

bool military::can_embark_onto_sea_tile ( sys::state state,
dcon::nation_id  from,
dcon::province_id  p,
dcon::army_id  a 
)

Definition at line 3822 of file military.cpp.

Here is the caller graph for this function:

◆ can_retreat_from_battle() [1/2]

bool military::can_retreat_from_battle ( sys::state state,
dcon::land_battle_id  battle 
)

Definition at line 7206 of file military.cpp.

◆ can_retreat_from_battle() [2/2]

bool military::can_retreat_from_battle ( sys::state state,
dcon::naval_battle_id  battle 
)

Definition at line 7203 of file military.cpp.

Here is the caller graph for this function:

◆ can_use_cb_against()

bool military::can_use_cb_against ( sys::state state,
dcon::nation_id  from,
dcon::nation_id  target 
)

Definition at line 95 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cb_addition_infamy_cost()

float military::cb_addition_infamy_cost ( sys::state state,
dcon::war_id  war,
dcon::cb_type_id  type,
dcon::nation_id  from,
dcon::nation_id  target 
)

Definition at line 1779 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cb_conditions_satisfied()

bool military::cb_conditions_satisfied ( sys::state state,
dcon::nation_id  actor,
dcon::nation_id  target,
dcon::cb_type_id  cb 
)

Definition at line 254 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cb_infamy()

float military::cb_infamy ( sys::state const &  state,
dcon::cb_type_id  t 
)

Definition at line 1266 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cb_instance_conditions_satisfied()

bool military::cb_instance_conditions_satisfied ( sys::state state,
dcon::nation_id  actor,
dcon::nation_id  target,
dcon::cb_type_id  cb,
dcon::state_definition_id  st,
dcon::national_identity_id  tag,
dcon::nation_id  secondary 
)

Definition at line 321 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cb_requires_selection_of_a_liberatable_tag()

bool military::cb_requires_selection_of_a_liberatable_tag ( sys::state const &  state,
dcon::cb_type_id  t 
)

Definition at line 1802 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cb_requires_selection_of_a_state()

bool military::cb_requires_selection_of_a_state ( sys::state const &  state,
dcon::cb_type_id  t 
)

Definition at line 1806 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cb_requires_selection_of_a_valid_nation()

bool military::cb_requires_selection_of_a_valid_nation ( sys::state const &  state,
dcon::cb_type_id  t 
)

Definition at line 1798 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cleanup_army()

void military::cleanup_army ( sys::state state,
dcon::army_id  n 
)

Definition at line 4417 of file military.cpp.

Here is the caller graph for this function:

◆ cleanup_navy()

void military::cleanup_navy ( sys::state state,
dcon::navy_id  n 
)

Definition at line 4467 of file military.cpp.

Here is the caller graph for this function:

◆ cleanup_war()

void military::cleanup_war ( sys::state state,
dcon::war_id  w,
war_result  result 
)

Definition at line 2589 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_blockade_status()

bool military::compute_blockade_status ( sys::state state,
dcon::province_id  p 
)

Definition at line 426 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cost_of_peace_offer()

int32_t military::cost_of_peace_offer ( sys::state state,
dcon::peace_offer_id  offer 
)

Definition at line 1665 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ count_armies()

int32_t military::count_armies ( sys::state state,
dcon::nation_id  n 
)

Definition at line 1936 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ count_leaders()

leader_counts military::count_leaders ( sys::state state,
dcon::nation_id  n 
)

Definition at line 1926 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ count_navies()

int32_t military::count_navies ( sys::state state,
dcon::nation_id  n 
)

Definition at line 1940 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_new_regiment()

dcon::regiment_id military::create_new_regiment ( sys::state state,
dcon::nation_id  n,
dcon::unit_type_id  t 
)

Definition at line 2047 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_new_ship()

dcon::ship_id military::create_new_ship ( sys::state state,
dcon::nation_id  n,
dcon::unit_type_id  t 
)

Definition at line 2058 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_war()

dcon::war_id military::create_war ( sys::state state,
dcon::nation_id  primary_attacker,
dcon::nation_id  primary_defender,
dcon::cb_type_id  primary_wargoal,
dcon::state_definition_id  primary_wargoal_state,
dcon::national_identity_id  primary_wargoal_tag,
dcon::nation_id  primary_wargoal_secondary 
)

Definition at line 2250 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ crisis_cb_addition_infamy_cost()

float military::crisis_cb_addition_infamy_cost ( sys::state state,
dcon::cb_type_id  type,
dcon::nation_id  from,
dcon::nation_id  target 
)

Definition at line 1771 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ daily_leaders_update()

void military::daily_leaders_update ( sys::state state)

Definition at line 1999 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ defender_peace_cost()

int32_t military::defender_peace_cost ( sys::state state,
dcon::war_id  war 
)

Definition at line 1693 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ defenders_have_non_status_quo_wargoal()

bool military::defenders_have_non_status_quo_wargoal ( sys::state const &  state,
dcon::war_id  w 
)

Definition at line 584 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ defenders_have_status_quo_wargoal()

bool military::defenders_have_status_quo_wargoal ( sys::state const &  state,
dcon::war_id  w 
)

Definition at line 592 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ directed_warscore()

float military::directed_warscore ( sys::state state,
dcon::war_id  w,
dcon::nation_id  primary,
dcon::nation_id  secondary 
)

Definition at line 3685 of file military.cpp.

Here is the caller graph for this function:

◆ disband_regiment_w_pop_death()

void military::disband_regiment_w_pop_death ( sys::state state,
dcon::regiment_id  reg_id 
)

Definition at line 7458 of file military.cpp.

◆ effective_army_speed()

float military::effective_army_speed ( sys::state state,
dcon::army_id  a 
)

Definition at line 3848 of file military.cpp.

Here is the caller graph for this function:

◆ effective_navy_speed()

float military::effective_navy_speed ( sys::state state,
dcon::navy_id  n 
)

Definition at line 3873 of file military.cpp.

Here is the caller graph for this function:

◆ eject_ships()

void military::eject_ships ( sys::state state,
dcon::province_id  p 
)

Definition at line 6771 of file military.cpp.

Here is the caller graph for this function:

◆ end_battle() [1/2]

void military::end_battle ( sys::state state,
dcon::land_battle_id  b,
battle_result  result 
)

Definition at line 4523 of file military.cpp.

Here is the caller graph for this function:

◆ end_battle() [2/2]

void military::end_battle ( sys::state state,
dcon::naval_battle_id  b,
battle_result  result 
)

Definition at line 4725 of file military.cpp.

◆ end_mobilization()

void military::end_mobilization ( sys::state state,
dcon::nation_id  n 
)

Definition at line 7101 of file military.cpp.

Here is the caller graph for this function:

◆ end_wars_between()

void military::end_wars_between ( sys::state state,
dcon::nation_id  a,
dcon::nation_id  b 
)

Definition at line 2084 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute_cb_discovery()

void military::execute_cb_discovery ( sys::state state,
dcon::nation_id  n 
)

Definition at line 1812 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_available_soldier() [1/2]

dcon::pop_id military::find_available_soldier ( sys::state state,
dcon::province_id  p,
bool  require_accepted 
)

Definition at line 889 of file military.cpp.

◆ find_available_soldier() [2/2]

dcon::pop_id military::find_available_soldier ( sys::state state,
dcon::province_id  p,
dcon::culture_id  pop_culture 
)

Definition at line 831 of file military.cpp.

Here is the caller graph for this function:

◆ find_embark_target()

dcon::navy_id military::find_embark_target ( sys::state state,
dcon::nation_id  from,
dcon::province_id  p,
dcon::army_id  a 
)

Definition at line 3834 of file military.cpp.

Here is the caller graph for this function:

◆ find_land_rally_pt()

dcon::province_id military::find_land_rally_pt ( sys::state state,
dcon::nation_id  by,
dcon::province_id  start 
)

Definition at line 7340 of file military.cpp.

◆ find_naval_rally_pt()

dcon::province_id military::find_naval_rally_pt ( sys::state state,
dcon::nation_id  by,
dcon::province_id  start 
)

Definition at line 7360 of file military.cpp.

◆ find_war_between()

dcon::war_id military::find_war_between ( sys::state const &  state,
dcon::nation_id  a,
dcon::nation_id  b 
)

Definition at line 542 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fractional_distance_covered() [1/2]

float military::fractional_distance_covered ( sys::state state,
dcon::army_id  a 
)

Definition at line 6395 of file military.cpp.

Here is the caller graph for this function:

◆ fractional_distance_covered() [2/2]

float military::fractional_distance_covered ( sys::state state,
dcon::navy_id  a 
)

Definition at line 6416 of file military.cpp.

◆ free_transport_capacity()

int32_t military::free_transport_capacity ( sys::state state,
dcon::navy_id  n 
)

Definition at line 6446 of file military.cpp.

Here is the caller graph for this function:

◆ get_land_battle_lead_attacker()

dcon::nation_id military::get_land_battle_lead_attacker ( sys::state state,
dcon::land_battle_id  b 
)

Definition at line 4279 of file military.cpp.

Here is the caller graph for this function:

◆ get_land_battle_lead_defender()

dcon::nation_id military::get_land_battle_lead_defender ( sys::state state,
dcon::land_battle_id  b 
)

Definition at line 4310 of file military.cpp.

Here is the caller graph for this function:

◆ get_leader_select_score()

float military::get_leader_select_score ( sys::state state,
dcon::leader_id  l 
)

Definition at line 4341 of file military.cpp.

◆ get_naval_battle_lead_attacker()

dcon::nation_id military::get_naval_battle_lead_attacker ( sys::state state,
dcon::naval_battle_id  b 
)

Definition at line 4239 of file military.cpp.

Here is the caller graph for this function:

◆ get_naval_battle_lead_defender()

dcon::nation_id military::get_naval_battle_lead_defender ( sys::state state,
dcon::naval_battle_id  b 
)

Definition at line 4259 of file military.cpp.

Here is the caller graph for this function:

◆ get_required_supply() [1/2]

economy::commodity_set military::get_required_supply ( sys::state state,
dcon::nation_id  owner,
dcon::army_id  army 
)

Definition at line 6813 of file military.cpp.

Here is the caller graph for this function:

◆ get_required_supply() [2/2]

economy::commodity_set military::get_required_supply ( sys::state state,
dcon::nation_id  owner,
dcon::navy_id  navy 
)

Definition at line 6841 of file military.cpp.

◆ get_role()

war_role military::get_role ( sys::state const &  state,
dcon::war_id  w,
dcon::nation_id  n 
)

Definition at line 2242 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_war_name()

std::string military::get_war_name ( sys::state ,
dcon::war_id   
)

Definition at line 2316 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ give_military_access()

void military::give_military_access ( sys::state state,
dcon::nation_id  accessing_nation,
dcon::nation_id  target 
)

Definition at line 2070 of file military.cpp.

Here is the caller graph for this function:

◆ has_truce_with()

bool military::has_truce_with ( sys::state state,
dcon::nation_id  attacker,
dcon::nation_id  target 
)

Definition at line 2037 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ implement_peace_offer()

void military::implement_peace_offer ( sys::state state,
dcon::peace_offer_id  offer 
)

Definition at line 3205 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ implement_war_goal()

void military::implement_war_goal ( sys::state state,
dcon::war_id  war,
dcon::cb_type_id  wargoal,
dcon::nation_id  from,
dcon::nation_id  target,
dcon::nation_id  secondary_nation,
dcon::state_definition_id  wargoal_state,
dcon::national_identity_id  wargoal_t 
)

Definition at line 2678 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ increase_dig_in()

void military::increase_dig_in ( sys::state state)

Definition at line 6796 of file military.cpp.

Here is the caller graph for this function:

◆ internal_find_war_between()

participation military::internal_find_war_between ( sys::state const &  state,
dcon::nation_id  a,
dcon::nation_id  b 
)

Definition at line 527 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ invalidate_unowned_wargoals()

void military::invalidate_unowned_wargoals ( sys::state state)

Definition at line 63 of file military.cpp.

Here is the caller graph for this function:

◆ is_attacker()

bool military::is_attacker ( sys::state state,
dcon::war_id  w,
dcon::nation_id  n 
)

Definition at line 2234 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_civil_war()

bool military::is_civil_war ( sys::state const &  state,
dcon::war_id  w 
)

Definition at line 567 of file military.cpp.

Here is the caller graph for this function:

◆ is_defender_wargoal()

bool military::is_defender_wargoal ( sys::state const &  state,
dcon::war_id  w,
dcon::wargoal_id  wg 
)

Definition at line 575 of file military.cpp.

Here is the caller graph for this function:

◆ joining_as_attacker_would_break_truce()

bool military::joining_as_attacker_would_break_truce ( sys::state state,
dcon::nation_id  a,
dcon::war_id  w 
)

Definition at line 607 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ joining_war_does_not_violate_constraints()

bool military::joining_war_does_not_violate_constraints ( sys::state const &  state,
dcon::nation_id  a,
dcon::war_id  w,
bool  as_attacker 
)

Definition at line 546 of file military.cpp.

Here is the caller graph for this function:

◆ kill_leader()

void military::kill_leader ( sys::state state,
dcon::leader_id  l 
)

Definition at line 1891 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ leader_is_in_combat()

bool military::leader_is_in_combat ( sys::state state,
dcon::leader_id  l 
)

Definition at line 1847 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ local_army_weight()

float military::local_army_weight ( sys::state state,
dcon::province_id  prov 
)

Definition at line 4998 of file military.cpp.

◆ local_army_weight_max()

float military::local_army_weight_max ( sys::state state,
dcon::province_id  prov 
)

Definition at line 5010 of file military.cpp.

Here is the caller graph for this function:

◆ local_enemy_army_weight_max()

float military::local_enemy_army_weight_max ( sys::state state,
dcon::province_id  prov,
dcon::nation_id  nation 
)

Definition at line 5022 of file military.cpp.

Here is the caller graph for this function:

◆ main_culture_regiments_created_from_province()

int32_t military::main_culture_regiments_created_from_province ( sys::state state,
dcon::province_id  p 
)

Definition at line 753 of file military.cpp.

◆ main_culture_regiments_max_possible_from_province()

int32_t military::main_culture_regiments_max_possible_from_province ( sys::state state,
dcon::province_id  p 
)

Definition at line 763 of file military.cpp.

◆ main_culture_regiments_under_construction_in_province()

int32_t military::main_culture_regiments_under_construction_in_province ( sys::state state,
dcon::province_id  p 
)

Definition at line 820 of file military.cpp.

◆ make_dice_rolls()

uint8_t military::make_dice_rolls ( sys::state state,
uint32_t  seed 
)

Definition at line 6106 of file military.cpp.

◆ make_new_leader()

dcon::leader_id military::make_new_leader ( sys::state state,
dcon::nation_id  n,
bool  is_general 
)

Definition at line 1857 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mobilization_impact()

float military::mobilization_impact ( sys::state const &  state,
dcon::nation_id  n 
)

Definition at line 1160 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mobilization_size()

float military::mobilization_size ( sys::state const &  state,
dcon::nation_id  n 
)

Definition at line 1156 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mobilized_regiments_created_from_province()

int32_t military::mobilized_regiments_created_from_province ( sys::state state,
dcon::province_id  p 
)

Definition at line 657 of file military.cpp.

Here is the caller graph for this function:

◆ mobilized_regiments_pop_limit()

int32_t military::mobilized_regiments_pop_limit ( sys::state state,
dcon::nation_id  n 
)

Definition at line 988 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mobilized_regiments_possible_from_province()

int32_t military::mobilized_regiments_possible_from_province ( sys::state state,
dcon::province_id  p 
)

Definition at line 959 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ monthly_leaders_update()

void military::monthly_leaders_update ( sys::state state)

Definition at line 1945 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ move_land_to_merge()

void military::move_land_to_merge ( sys::state state,
dcon::nation_id  by,
dcon::army_id  a,
dcon::province_id  start,
dcon::province_id  dest 
)

Definition at line 7377 of file military.cpp.

Here is the caller graph for this function:

◆ move_navy_to_merge()

void military::move_navy_to_merge ( sys::state state,
dcon::nation_id  by,
dcon::navy_id  a,
dcon::province_id  start,
dcon::province_id  dest 
)

Definition at line 7414 of file military.cpp.

◆ naval_supply_from_naval_base()

uint32_t military::naval_supply_from_naval_base ( sys::state state,
dcon::province_id  prov,
dcon::nation_id  nation 
)

Definition at line 1078 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ naval_supply_points()

int32_t military::naval_supply_points ( sys::state state,
dcon::nation_id  n 
)

Definition at line 1071 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ naval_supply_points_used()

int32_t military::naval_supply_points_used ( sys::state state,
dcon::nation_id  n 
)

Definition at line 1074 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ navy_arrives_in_province()

void military::navy_arrives_in_province ( sys::state state,
dcon::navy_id  n,
dcon::province_id  p,
dcon::naval_battle_id  from 
)

Definition at line 6113 of file military.cpp.

Here is the caller graph for this function:

◆ peace_cost()

int32_t military::peace_cost ( sys::state state,
dcon::war_id  war,
dcon::cb_type_id  wargoal,
dcon::nation_id  from,
dcon::nation_id  target,
dcon::nation_id  secondary_nation,
dcon::state_definition_id  wargoal_state,
dcon::national_identity_id  wargoal_tag 
)

Definition at line 1540 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ peace_offer_truce_months()

int32_t military::peace_offer_truce_months ( sys::state state,
dcon::peace_offer_id  offer 
)

Definition at line 1675 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ peacetime_attrition_limit()

float military::peacetime_attrition_limit ( sys::state state,
dcon::nation_id  n,
dcon::province_id  prov 
)

Definition at line 4949 of file military.cpp.

Here is the caller graph for this function:

◆ pop_eligible_for_mobilization()

bool military::pop_eligible_for_mobilization ( sys::state state,
dcon::pop_id  p 
)

Definition at line 7450 of file military.cpp.

Here is the caller graph for this function:

◆ populate_war_text_subsitutions()

void military::populate_war_text_subsitutions ( sys::state state,
dcon::war_id  w,
text::substitution_map sub 
)

Definition at line 2093 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ primary_warscore()

float military::primary_warscore ( sys::state state,
dcon::war_id  w 
)

Definition at line 3628 of file military.cpp.

Here is the caller graph for this function:

◆ primary_warscore_from_battles()

float military::primary_warscore_from_battles ( sys::state state,
dcon::war_id  w 
)

Definition at line 3667 of file military.cpp.

Here is the caller graph for this function:

◆ primary_warscore_from_blockades()

float military::primary_warscore_from_blockades ( sys::state state,
dcon::war_id  w 
)

Definition at line 3589 of file military.cpp.

Here is the caller graph for this function:

◆ primary_warscore_from_occupation()

float military::primary_warscore_from_occupation ( sys::state state,
dcon::war_id  w 
)

Definition at line 3636 of file military.cpp.

Here is the caller graph for this function:

◆ primary_warscore_from_war_goals()

float military::primary_warscore_from_war_goals ( sys::state state,
dcon::war_id  w 
)

Definition at line 3671 of file military.cpp.

Here is the caller graph for this function:

◆ province_is_blockaded() [1/2]

bool military::province_is_blockaded ( sys::state const &  state,
dcon::province_id  ids 
)

Definition at line 422 of file military.cpp.

Here is the caller graph for this function:

◆ province_is_blockaded() [2/2]

template<typename T >
auto military::province_is_blockaded ( sys::state const &  state,
ids 
)

Definition at line 7 of file military_templates.hpp.

◆ province_is_blockaded< ve::tagged_vector< dcon::province_id > >()

template auto military::province_is_blockaded< ve::tagged_vector< dcon::province_id > > ( sys::state const &  ,
ve::tagged_vector< dcon::province_id >   
)

◆ province_is_under_siege() [1/2]

bool military::province_is_under_siege ( sys::state const &  state,
dcon::province_id  ids 
)

Definition at line 453 of file military.cpp.

Here is the caller graph for this function:

◆ province_is_under_siege() [2/2]

template<typename T >
auto military::province_is_under_siege ( sys::state const &  state,
ids 
)

Definition at line 12 of file military_templates.hpp.

◆ province_is_under_siege< ve::tagged_vector< dcon::province_id > >()

template auto military::province_is_under_siege< ve::tagged_vector< dcon::province_id > > ( sys::state const &  ,
ve::tagged_vector< dcon::province_id >   
)

◆ province_point_cost()

int32_t military::province_point_cost ( sys::state state,
dcon::province_id  p,
dcon::nation_id  n 
)

Definition at line 1512 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rebel_army_in_province()

bool military::rebel_army_in_province ( sys::state state,
dcon::province_id  p 
)

Definition at line 7333 of file military.cpp.

Here is the caller graph for this function:

◆ recover_org()

void military::recover_org ( sys::state state)

Definition at line 6874 of file military.cpp.

Here is the caller graph for this function:

◆ recruited_pop_fraction()

float military::recruited_pop_fraction ( sys::state const &  state,
dcon::nation_id  n 
)

Definition at line 457 of file military.cpp.

Here is the caller graph for this function:

◆ regenerate_land_unit_average()

void military::regenerate_land_unit_average ( sys::state state)

Definition at line 1024 of file military.cpp.

Here is the caller graph for this function:

◆ regenerate_ship_scores()

void military::regenerate_ship_scores ( sys::state state)

Definition at line 1049 of file military.cpp.

Here is the caller graph for this function:

◆ regenerate_total_regiment_counts()

void military::regenerate_total_regiment_counts ( sys::state state)

Definition at line 1012 of file military.cpp.

Here is the caller graph for this function:

◆ regiments_created_from_province()

int32_t military::regiments_created_from_province ( sys::state state,
dcon::province_id  p 
)

Definition at line 647 of file military.cpp.

Here is the caller graph for this function:

◆ regiments_max_possible_from_province()

int32_t military::regiments_max_possible_from_province ( sys::state state,
dcon::province_id  p 
)

Definition at line 709 of file military.cpp.

Here is the caller graph for this function:

◆ regiments_possible_from_pop()

int32_t military::regiments_possible_from_pop ( sys::state state,
dcon::pop_id  p 
)

Definition at line 675 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ regiments_under_construction_in_province()

int32_t military::regiments_under_construction_in_province ( sys::state state,
dcon::province_id  p 
)

Definition at line 810 of file military.cpp.

Here is the caller graph for this function:

◆ reinforce_amount()

float military::reinforce_amount ( sys::state state,
dcon::army_id  a 
)

Definition at line 6928 of file military.cpp.

Here is the caller graph for this function:

◆ reinforce_regiments()

void military::reinforce_regiments ( sys::state state)

Definition at line 6954 of file military.cpp.

Here is the caller graph for this function:

◆ reject_peace_offer()

void military::reject_peace_offer ( sys::state state,
dcon::peace_offer_id  offer 
)

Definition at line 3446 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ relative_attrition_amount() [1/2]

float military::relative_attrition_amount ( sys::state state,
dcon::army_id  a,
dcon::province_id  prov 
)

Definition at line 5039 of file military.cpp.

◆ relative_attrition_amount() [2/2]

float military::relative_attrition_amount ( sys::state state,
dcon::navy_id  a,
dcon::province_id  prov 
)

Definition at line 4994 of file military.cpp.

Here is the caller graph for this function:

◆ remove_from_common_allied_wars()

void military::remove_from_common_allied_wars ( sys::state state,
dcon::nation_id  a,
dcon::nation_id  b 
)

Definition at line 507 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_from_war()

void military::remove_from_war ( sys::state state,
dcon::war_id  w,
dcon::nation_id  n,
bool  as_loss 
)

Definition at line 2500 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_military_access()

void military::remove_military_access ( sys::state state,
dcon::nation_id  accessing_nation,
dcon::nation_id  target 
)

Definition at line 2077 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ repair_ships()

void military::repair_ships ( sys::state state)

Definition at line 6997 of file military.cpp.

Here is the caller graph for this function:

◆ reset_unit_stats()

void military::reset_unit_stats ( sys::state state)

Definition at line 36 of file military.cpp.

Here is the caller graph for this function:

◆ restore_unsaved_values()

void military::restore_unsaved_values ( sys::state state)

Definition at line 83 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ retreat() [1/2]

bool military::retreat ( sys::state state,
dcon::army_id  n 
)

Definition at line 4218 of file military.cpp.

◆ retreat() [2/2]

bool military::retreat ( sys::state state,
dcon::navy_id  n 
)

Definition at line 4194 of file military.cpp.

◆ run_gc()

void military::run_gc ( sys::state state)

Definition at line 3014 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_rebel_hunter_to_next_province()

void military::send_rebel_hunter_to_next_province ( sys::state state,
dcon::army_id  ar,
dcon::province_id  prov 
)

Definition at line 6457 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_initial_leaders()

void military::set_initial_leaders ( sys::state state)

Definition at line 2618 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ siege_potential()

bool military::siege_potential ( sys::state state,
dcon::nation_id  army_controller,
dcon::nation_id  province_controller 
)

Definition at line 6508 of file military.cpp.

Here is the caller graph for this function:

◆ standard_war_joining_is_possible()

bool military::standard_war_joining_is_possible ( sys::state state,
dcon::war_id  wfor,
dcon::nation_id  n,
bool  as_attacker 
)

Definition at line 2344 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_mobilization()

void military::start_mobilization ( sys::state state,
dcon::nation_id  n 
)

Definition at line 7030 of file military.cpp.

Here is the caller graph for this function:

◆ state_claimed_in_war()

bool military::state_claimed_in_war ( sys::state state,
dcon::war_id  w,
dcon::nation_id  from,
dcon::nation_id  target,
dcon::state_definition_id  cb_state 
)

Definition at line 7210 of file military.cpp.

◆ state_has_naval_base()

bool military::state_has_naval_base ( sys::state const &  state,
dcon::state_instance_id  si 
)

Definition at line 463 of file military.cpp.

Here is the caller graph for this function:

◆ successful_cb_prestige()

float military::successful_cb_prestige ( sys::state state,
dcon::cb_type_id  t,
dcon::nation_id  actor 
)

Definition at line 1705 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ supply_limit_in_province()

int32_t military::supply_limit_in_province ( sys::state state,
dcon::nation_id  n,
dcon::province_id  p 
)

Definition at line 618 of file military.cpp.

Here is the caller graph for this function:

◆ take_from_sphere()

void military::take_from_sphere ( sys::state state,
dcon::nation_id  member,
dcon::nation_id  new_gp 
)

Definition at line 2643 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tech_nation_for_regiment()

dcon::nation_id military::tech_nation_for_regiment ( sys::state state,
dcon::regiment_id  r 
)

Definition at line 4933 of file military.cpp.

◆ total_regiments()

int32_t military::total_regiments ( sys::state state,
dcon::nation_id  n 
)

Definition at line 24 of file military.cpp.

Here is the caller graph for this function:

◆ total_ships()

int32_t military::total_ships ( sys::state state,
dcon::nation_id  n 
)

Definition at line 27 of file military.cpp.

Here is the caller graph for this function:

◆ transport_capacity()

int32_t military::transport_capacity ( sys::state state,
dcon::navy_id  n 
)

Definition at line 6438 of file military.cpp.

Here is the caller graph for this function:

◆ truce_break_cb_infamy()

float military::truce_break_cb_infamy ( sys::state state,
dcon::cb_type_id  t 
)

Definition at line 1450 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ truce_break_cb_militancy()

float military::truce_break_cb_militancy ( sys::state state,
dcon::cb_type_id  t 
)

Definition at line 1389 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ truce_break_cb_prestige_cost()

float military::truce_break_cb_prestige_cost ( sys::state state,
dcon::cb_type_id  t 
)

Definition at line 1328 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_all_recruitable_regiments()

void military::update_all_recruitable_regiments ( sys::state state)

Definition at line 1003 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_battle_leaders() [1/2]

void military::update_battle_leaders ( sys::state state,
dcon::land_battle_id  b 
)

Definition at line 4362 of file military.cpp.

Here is the caller graph for this function:

◆ update_battle_leaders() [2/2]

void military::update_battle_leaders ( sys::state state,
dcon::naval_battle_id  b 
)

Definition at line 4389 of file military.cpp.

◆ update_blackflag_status() [1/2]

void military::update_blackflag_status ( sys::state state)

Definition at line 7319 of file military.cpp.

Here is the call graph for this function:

◆ update_blackflag_status() [2/2]

void military::update_blackflag_status ( sys::state state,
dcon::province_id  p 
)

Definition at line 6762 of file military.cpp.

Here is the caller graph for this function:

◆ update_blockade_status()

void military::update_blockade_status ( sys::state state)

Definition at line 447 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_cbs()

void military::update_cbs ( sys::state state)

Definition at line 1168 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_land_battles()

void military::update_land_battles ( sys::state state)

Definition at line 5217 of file military.cpp.

Here is the caller graph for this function:

◆ update_movement()

void military::update_movement ( sys::state state)

Definition at line 6183 of file military.cpp.

Here is the caller graph for this function:

◆ update_naval_battles()

void military::update_naval_battles ( sys::state state)

Definition at line 5753 of file military.cpp.

Here is the caller graph for this function:

◆ update_naval_supply_points()

void military::update_naval_supply_points ( sys::state state)

Definition at line 1096 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_recruitable_regiments()

void military::update_recruitable_regiments ( sys::state state,
dcon::nation_id  n 
)

Definition at line 997 of file military.cpp.

Here is the call graph for this function:

◆ update_siege_progress()

void military::update_siege_progress ( sys::state state)

Definition at line 6523 of file military.cpp.

Here is the caller graph for this function:

◆ update_ticking_war_score()

void military::update_ticking_war_score ( sys::state state)

Definition at line 3486 of file military.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ war_goal_would_be_duplicate()

bool military::war_goal_would_be_duplicate ( sys::state state,
dcon::nation_id  source,
dcon::war_id  w,
dcon::nation_id  target,
dcon::cb_type_id  cb_type,
dcon::state_definition_id  cb_state,
dcon::national_identity_id  cb_tag,
dcon::nation_id  cb_secondary_nation 
)

Definition at line 7251 of file military.cpp.

Here is the caller graph for this function:

◆ will_recieve_attrition() [1/2]

bool military::will_recieve_attrition ( sys::state state,
dcon::army_id  a 
)

Definition at line 4957 of file military.cpp.

◆ will_recieve_attrition() [2/2]

bool military::will_recieve_attrition ( sys::state state,
dcon::navy_id  a 
)

Definition at line 4945 of file military.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ combat_modifier_table

constexpr float military::combat_modifier_table[]
inlineconstexpr
Initial value:
= {0.0f, 0.02f, 0.04f, 0.06f, 0.08f, 0.10f, 0.12f, 0.16f, 0.20f, 0.25f, 0.30f,
0.35f, 0.40f, 0.45f, 0.50f, 0.60f, 0.70f, 0.80f, 0.90f}

Definition at line 4930 of file military.cpp.

◆ days_before_retreat

constexpr int32_t military::days_before_retreat = 11
inlineconstexpr

Definition at line 257 of file military.hpp.

◆ defender_bonus_crossing_mask

constexpr uint8_t military::defender_bonus_crossing_mask = 0xC0
inlineconstexpr

Definition at line 87 of file military.hpp.

◆ defender_bonus_crossing_none

constexpr uint8_t military::defender_bonus_crossing_none = 0x00
inlineconstexpr

Definition at line 88 of file military.hpp.

◆ defender_bonus_crossing_river

constexpr uint8_t military::defender_bonus_crossing_river = 0x40
inlineconstexpr

Definition at line 89 of file military.hpp.

◆ defender_bonus_crossing_sea

constexpr uint8_t military::defender_bonus_crossing_sea = 0x80
inlineconstexpr

Definition at line 90 of file military.hpp.

◆ defender_bonus_dig_in_mask

constexpr uint8_t military::defender_bonus_dig_in_mask = 0x3F
inlineconstexpr

Definition at line 91 of file military.hpp.

◆ org_dam_mul

constexpr float military::org_dam_mul = 0.18f
inlineconstexpr

Definition at line 21 of file military.cpp.

◆ siege_speed_mul

constexpr float military::siege_speed_mul = 1.0f / 50.0f
inlineconstexpr

Definition at line 6455 of file military.cpp.

◆ str_dam_mul

constexpr float military::str_dam_mul = 0.14f
inlineconstexpr

Definition at line 22 of file military.cpp.