Project Alice
Loading...
Searching...
No Matches
military.hpp
Go to the documentation of this file.
1#pragma once
2#include "dcon_generated.hpp"
3#include "container_types.hpp"
4#include "modifiers.hpp"
5
6namespace military {
7namespace cb_flag {
8
9inline constexpr uint32_t is_civil_war = 0x00000001;
10inline constexpr uint32_t always = 0x00000002;
11inline constexpr uint32_t is_triggered_only = 0x00000004;
12inline constexpr uint32_t is_not_constructing_cb = 0x00000008;
13inline constexpr uint32_t great_war_obligatory = 0x00000010;
14inline constexpr uint32_t all_allowed_states = 0x00000020;
15inline constexpr uint32_t not_in_crisis = 0x00000040;
16inline constexpr uint32_t po_clear_union_sphere = 0x00000080;
17inline constexpr uint32_t po_gunboat = 0x00000100;
18inline constexpr uint32_t po_annex = 0x00000200;
19inline constexpr uint32_t po_demand_state = 0x00000400;
20inline constexpr uint32_t po_add_to_sphere = 0x00000800;
21inline constexpr uint32_t po_disarmament = 0x00001000;
22inline constexpr uint32_t po_reparations = 0x00002000;
23inline constexpr uint32_t po_transfer_provinces = 0x00004000;
24inline constexpr uint32_t po_remove_prestige = 0x00008000;
25inline constexpr uint32_t po_make_puppet = 0x00010000;
26inline constexpr uint32_t po_release_puppet = 0x00020000;
27inline constexpr uint32_t po_status_quo = 0x00040000;
28inline constexpr uint32_t po_install_communist_gov_type = 0x00080000;
29inline constexpr uint32_t po_uninstall_communist_gov_type = 0x00100000;
30inline constexpr uint32_t po_remove_cores = 0x00200000;
31inline constexpr uint32_t po_colony = 0x00400000;
32inline constexpr uint32_t po_destroy_forts = 0x00800000;
33inline constexpr uint32_t po_destroy_naval_bases = 0x01000000;
34
35} // namespace cb_flag
36
38 static constexpr uint16_t distance_mask = 0x03FF;
39
40 static constexpr uint16_t mode_mask = 0x1C00;
41 static constexpr uint16_t mode_seeking = 0x0400;
42 static constexpr uint16_t mode_approaching = 0x0800;
43 static constexpr uint16_t mode_engaged = 0x0C00;
44 static constexpr uint16_t mode_retreating = 0x1000;
45 static constexpr uint16_t mode_retreated = 0x1400;
46 static constexpr uint16_t mode_sunk = 0x0000;
47
48 static constexpr uint16_t is_attacking = 0x2000;
49
50 static constexpr uint16_t type_mask = 0xC000;
51 static constexpr uint16_t type_big = 0x4000;
52 static constexpr uint16_t type_small = 0x8000;
53 static constexpr uint16_t type_transport = 0x0000;
54
55 dcon::ship_id ship;
56 uint16_t target_slot = 0;
57 uint16_t flags = 0;
58};
59static_assert(sizeof(ship_in_battle) ==
62 + sizeof(ship_in_battle::flags));
63
66 dcon::province_id where; //2
67};
68static_assert(sizeof(mobilization_order) ==
70 + sizeof(mobilization_order::when));
71
73 static constexpr uint16_t is_attacking = 0x0001;
74
75 static constexpr uint16_t type_mask = 0x0006;
76 static constexpr uint16_t type_infantry = 0x0000;
77 static constexpr uint16_t type_cavalry = 0x0002;
78 static constexpr uint16_t type_support = 0x0004;
79
80 dcon::regiment_id regiment;
81 uint16_t flags = 0;
82};
83static_assert(sizeof(reserve_regiment) ==
85 + sizeof(reserve_regiment::flags));
86
87constexpr inline uint8_t defender_bonus_crossing_mask = 0xC0;
88constexpr inline uint8_t defender_bonus_crossing_none = 0x00;
89constexpr inline uint8_t defender_bonus_crossing_river = 0x40;
90constexpr inline uint8_t defender_bonus_crossing_sea = 0x80;
91constexpr inline uint8_t defender_bonus_dig_in_mask = 0x3F;
92
93enum class unit_type : uint8_t {
95};
96
100
101 float maneuver = 0.0f;
102 int32_t colonial_points = 0;
103 int32_t min_port_level = 0;
105
106 int32_t icon = 0;
107 int32_t naval_icon = 0;
108
109 dcon::text_key name;
110
111 bool is_land = true;
112 bool capital = false;
114 bool primary_culture = false;
115 bool active = true;
116
118 uint16_t padding = 0;
119
121};
122static_assert(sizeof(unit_definition) ==
130 + sizeof(unit_definition::icon)
132 + sizeof(unit_definition::name)
138 + sizeof(unit_definition::type)
139 + sizeof(unit_definition::padding));
140
143
144 dcon::leader_trait_id first_background_trait;
145
146 bool great_wars_enabled = false;
147 bool world_wars_enabled = false;
148
149 dcon::unit_type_id base_army_unit;
150 dcon::unit_type_id base_naval_unit;
151
152 dcon::cb_type_id standard_civil_war;
153 dcon::cb_type_id standard_great_war;
154
155 dcon::cb_type_id standard_status_quo;
156
157 dcon::cb_type_id liberate;
158 dcon::cb_type_id uninstall_communist_gov;
159
160 dcon::cb_type_id crisis_colony;
161 dcon::cb_type_id crisis_liberate;
162 dcon::cb_type_id crisis_annex;
163
164 dcon::unit_type_id irregular;
165 dcon::unit_type_id infantry;
166 dcon::unit_type_id artillery;
167
169};
170
173 dcon::nation_id target; //2
174 dcon::cb_type_id cb_type; //2
175 dcon::state_definition_id target_state;
176};
177static_assert(sizeof(available_cb) ==
178 +sizeof(available_cb::target)
180 + sizeof(available_cb::cb_type) +
182
184 dcon::nation_id secondary_nation;
185 dcon::national_identity_id wg_tag;
186 dcon::state_definition_id state;
187 dcon::cb_type_id cb;
188};
189
191 float warscore_effect = 0.0f;
192 float prestige_effect = 0.0f;
193
197
201
205
209
210 dcon::leader_id attacking_admiral;
211 dcon::leader_id defending_admiral;
212
213 dcon::nation_id attacking_nation;
214 dcon::nation_id defending_nation;
215
216 dcon::province_id location;
217
220};
221
223 float warscore_effect = 0.0f;
224 float prestige_effect = 0.0f;
225
229
233
237
241
242 dcon::leader_id attacking_general;
243 dcon::leader_id defending_general;
244
245 dcon::nation_id attacking_nation;
246 dcon::nation_id defending_nation;
247
248 dcon::province_id location;
249
252};
253
254constexpr inline int32_t days_before_retreat = 11;
255
256enum class battle_result {
258};
259
260void reset_unit_stats(sys::state& state);
262void restore_unsaved_values(sys::state& state); // must run after determining connectivity
263
264bool is_infantry_better(sys::state& state, dcon::nation_id n, dcon::unit_type_id best, dcon::unit_type_id given);
265bool is_artillery_better(sys::state& state, dcon::nation_id n, dcon::unit_type_id best, dcon::unit_type_id given);
266bool is_cavalry_better(sys::state& state, dcon::nation_id n, dcon::unit_type_id best, dcon::unit_type_id given);
267
268dcon::unit_type_id get_best_infantry(sys::state& state, dcon::nation_id n, bool primary_culture = false);
269dcon::unit_type_id get_best_artillery(sys::state& state, dcon::nation_id n, bool primary_culture = false);
270dcon::unit_type_id get_best_cavalry(sys::state& state, dcon::nation_id n, bool primary_culture = false);
271
272bool are_at_war(sys::state const& state, dcon::nation_id a, dcon::nation_id b);
273bool are_allied_in_war(sys::state const& state, dcon::nation_id a, dcon::nation_id b);
274bool are_in_common_war(sys::state const& state, dcon::nation_id a, dcon::nation_id b);
275void remove_from_common_allied_wars(sys::state& state, dcon::nation_id a, dcon::nation_id b);
276dcon::war_id find_war_between(sys::state const& state, dcon::nation_id a, dcon::nation_id b);
277bool has_truce_with(sys::state& state, dcon::nation_id attacker, dcon::nation_id target);
278bool can_use_cb_against(sys::state& state, dcon::nation_id from, dcon::nation_id target);
279bool leader_is_in_combat(sys::state& state, dcon::leader_id l);
280dcon::leader_id make_new_leader(sys::state& state, dcon::nation_id n, bool is_general);
281void kill_leader(sys::state& state, dcon::leader_id l);
282
283// tests whether joining the war would violate the constraint that you can't both be in a war with and
284// fighting against the same nation or fighting against them twice
285bool joining_war_does_not_violate_constraints(sys::state const& state, dcon::nation_id a, dcon::war_id w, bool as_attacker);
286
287bool is_civil_war(sys::state const& state, dcon::war_id w);
288bool standard_war_joining_is_possible(sys::state& state, dcon::war_id wfor, dcon::nation_id n, bool as_attacker);
289bool joining_as_attacker_would_break_truce(sys::state& state, dcon::nation_id a, dcon::war_id w);
290bool defenders_have_non_status_quo_wargoal(sys::state const& state, dcon::war_id w);
291bool defenders_have_status_quo_wargoal(sys::state const& state, dcon::war_id w);
292bool attackers_have_status_quo_wargoal(sys::state const& state, dcon::war_id w);
293bool 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);
294bool is_attacker(sys::state& state, dcon::war_id w, dcon::nation_id n);
295bool 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);
296bool 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);
298std::string get_war_name(sys::state& state, dcon::war_id war);
299
300// war score from the perspective of the primary attacker offering a peace deal to the primary defender; -100 to 100
301float primary_warscore(sys::state& state, dcon::war_id w);
302float primary_warscore_from_occupation(sys::state& state, dcon::war_id w);
303float primary_warscore_from_battles(sys::state& state, dcon::war_id w);
304float primary_warscore_from_war_goals(sys::state& state, dcon::war_id w);
305float primary_warscore_from_blockades(sys::state& state, dcon::war_id w);
306
307// war score from the perspective of the primary nation offering peace to the secondary nation; 0 to 100
308// DO NOT use this when calculating the overall score of the war or when looking at a peace deal between primary attacker and
309// defender
310float directed_warscore(sys::state& state, dcon::war_id w, dcon::nation_id primary, dcon::nation_id secondary);
311
312bool is_defender_wargoal(sys::state const& state, dcon::war_id w, dcon::wargoal_id wg);
313
314enum class war_role {
316};
317war_role get_role(sys::state const& state, dcon::war_id w, dcon::nation_id n);
318
319bool province_is_blockaded(sys::state const& state, dcon::province_id ids);
320bool province_is_under_siege(sys::state const& state, dcon::province_id ids);
322
323float recruited_pop_fraction(sys::state const& state, dcon::nation_id n);
324bool state_has_naval_base(sys::state const& state, dcon::state_instance_id si);
325uint32_t state_naval_base_level(sys::state const& state, dcon::state_instance_id si);
326uint32_t state_railroad_level(sys::state const& state, dcon::state_instance_id si);
327
328int32_t supply_limit_in_province(sys::state& state, dcon::nation_id n, dcon::province_id p);
329int32_t regiments_possible_from_pop(sys::state& state, dcon::pop_id p);
330int32_t regiments_created_from_province(sys::state& state, dcon::province_id p); // does not include mobilized regiments
331int32_t regiments_max_possible_from_province(sys::state& state, dcon::province_id p);
332int32_t main_culture_regiments_created_from_province(sys::state& state, dcon::province_id p);
333int32_t main_culture_regiments_max_possible_from_province(sys::state& state, dcon::province_id p);
334int32_t regiments_under_construction_in_province(sys::state& state, dcon::province_id p);
335int32_t main_culture_regiments_under_construction_in_province(sys::state& state, dcon::province_id p);
336int32_t mobilized_regiments_created_from_province(sys::state& state, dcon::province_id p);
337int32_t mobilized_regiments_possible_from_province(sys::state& state, dcon::province_id p);
338dcon::pop_id find_available_soldier(sys::state& state, dcon::province_id p, bool require_accepted);
339dcon::pop_id find_available_soldier(sys::state& state, dcon::province_id p, dcon::culture_id pop_culture);
340int32_t mobilized_regiments_pop_limit(sys::state& state, dcon::nation_id n);
342
343int32_t total_regiments(sys::state& state, dcon::nation_id n);
344int32_t total_ships(sys::state& state, dcon::nation_id n);
345
346dcon::regiment_id create_new_regiment(sys::state& state, dcon::nation_id n, dcon::unit_type_id t);
347dcon::ship_id create_new_ship(sys::state& state, dcon::nation_id n, dcon::unit_type_id t);
348
349void update_recruitable_regiments(sys::state& state, dcon::nation_id n);
352
355
356int32_t naval_supply_points(sys::state& state, dcon::nation_id n);
357int32_t naval_supply_points_used(sys::state& state, dcon::nation_id n);
358
359float mobilization_size(sys::state const& state, dcon::nation_id n);
360float mobilization_impact(sys::state const& state, dcon::nation_id n);
361ve::fp_vector ve_mobilization_impact(sys::state const& state, ve::tagged_vector<dcon::nation_id> nations);
362
363uint32_t naval_supply_from_naval_base(sys::state& state, dcon::province_id prov, dcon::nation_id nation);
364void update_naval_supply_points(sys::state& state); // must run after determining connectivity
365void update_cbs(sys::state& state);
368
369bool cb_conditions_satisfied(sys::state& state, dcon::nation_id actor, dcon::nation_id target, dcon::cb_type_id cb);
370bool 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);
371void add_cb(sys::state& state, dcon::nation_id n, dcon::cb_type_id cb, dcon::nation_id target, dcon::state_definition_id target_state); // do not call this function directly unless you know what you are doing
372void execute_cb_discovery(sys::state& state, dcon::nation_id n);
373
374void give_military_access(sys::state& state, dcon::nation_id accessing_nation, dcon::nation_id target);
375void remove_military_access(sys::state& state, dcon::nation_id accessing_nation, dcon::nation_id target);
376void end_wars_between(sys::state& state, dcon::nation_id a, dcon::nation_id b);
377
378dcon::war_id create_war(sys::state& state, dcon::nation_id primary_attacker, dcon::nation_id primary_defender,
379 dcon::cb_type_id primary_wargoal, dcon::state_definition_id primary_wargoal_state,
380 dcon::national_identity_id primary_wargoal_tag, dcon::nation_id primary_wargoal_secondary);
381void call_defender_allies(sys::state& state, dcon::war_id wfor);
382void call_attacker_allies(sys::state& state, dcon::war_id wfor);
383void add_wargoal(sys::state& state, dcon::war_id wfor, dcon::nation_id added_by, dcon::nation_id target, dcon::cb_type_id type,
384 dcon::state_definition_id sd, dcon::national_identity_id tag, dcon::nation_id secondary_nation);
385void add_to_war(sys::state& state, dcon::war_id w, dcon::nation_id n, bool as_attacker, bool on_war_creation = false);
386
387float truce_break_cb_prestige_cost(sys::state& state, dcon::cb_type_id type);
388float truce_break_cb_militancy(sys::state& state, dcon::cb_type_id type);
389float truce_break_cb_infamy(sys::state& state, dcon::cb_type_id type, dcon::nation_id target, dcon::state_definition_id cb_state = dcon::state_definition_id{});
390
391
392int32_t peace_cost(sys::state& state, dcon::war_id war, dcon::cb_type_id wargoal, dcon::nation_id from, dcon::nation_id target,
393 dcon::nation_id secondary_nation, dcon::state_definition_id wargoal_state, dcon::national_identity_id wargoal_t);
394int32_t cost_of_peace_offer(sys::state& state, dcon::peace_offer_id offer);
395int32_t peace_offer_truce_months(sys::state& state, dcon::peace_offer_id offer);
396int32_t attacker_peace_cost(sys::state& state, dcon::war_id war);
397int32_t defender_peace_cost(sys::state& state, dcon::war_id war);
398
399float successful_cb_prestige(sys::state& state, dcon::cb_type_id type, dcon::nation_id actor);
400float cb_infamy(sys::state& state, dcon::cb_type_id t, dcon::nation_id target, dcon::state_definition_id cb_state = dcon::state_definition_id{}); // the fabrication cost in infamy
401
402float cb_addition_infamy_cost(sys::state& state, dcon::war_id war, dcon::cb_type_id type, dcon::nation_id from,
403 dcon::nation_id target, dcon::state_definition_id cb_state = dcon::state_definition_id{ }); // the cost of adding a particular cb to the war -- does NOT check if the CB is valid to add
404float crisis_cb_addition_infamy_cost(sys::state& state, dcon::cb_type_id type, dcon::nation_id from, dcon::nation_id target, dcon::state_definition_id cb_state);
405
406bool cb_requires_selection_of_a_valid_nation(sys::state const& state, dcon::cb_type_id t);
407bool cb_requires_selection_of_a_liberatable_tag(sys::state const& state, dcon::cb_type_id t);
408bool cb_requires_selection_of_a_state(sys::state const& state, dcon::cb_type_id t);
409
410void remove_from_war(sys::state& state, dcon::war_id w, dcon::nation_id n, bool as_loss);
412void cleanup_war(sys::state& state, dcon::war_id w, war_result result);
413
414void cleanup_army(sys::state& state, dcon::army_id n);
415void cleanup_navy(sys::state& state, dcon::navy_id n);
416
417void implement_war_goal(sys::state& state, dcon::war_id war, dcon::cb_type_id wargoal, dcon::nation_id from,
418 dcon::nation_id target, dcon::nation_id secondary_nation, dcon::state_definition_id wargoal_state,
419 dcon::national_identity_id wargoal_t);
420void implement_peace_offer(sys::state& state, dcon::peace_offer_id offer);
421void reject_peace_offer(sys::state& state, dcon::peace_offer_id offer);
422void add_truce(sys::state& state, dcon::nation_id a, dcon::nation_id b, int32_t days);
423
425
426void start_mobilization(sys::state& state, dcon::nation_id n);
427void end_mobilization(sys::state& state, dcon::nation_id n);
429
430int32_t transport_capacity(sys::state& state, dcon::navy_id n);
431int32_t free_transport_capacity(sys::state& state, dcon::navy_id n);
432bool can_embark_onto_sea_tile(sys::state& state, dcon::nation_id n, dcon::province_id p, dcon::army_id a);
433dcon::navy_id find_embark_target(sys::state& state, dcon::nation_id from, dcon::province_id p, dcon::army_id a);
434float effective_army_speed(sys::state& state, dcon::army_id a);
435float effective_navy_speed(sys::state& state, dcon::navy_id n);
436bool will_recieve_attrition(sys::state& state, dcon::navy_id a);
437bool will_recieve_attrition(sys::state& state, dcon::army_id a);
438float attrition_amount(sys::state& state, dcon::navy_id a);
439float attrition_amount(sys::state& state, dcon::army_id a);
440float relative_attrition_amount(sys::state& state, dcon::navy_id a, dcon::province_id prov);
441float relative_attrition_amount(sys::state& state, dcon::army_id a, dcon::province_id prov);
442float local_army_weight(sys::state& state, dcon::province_id prov);
443float local_army_weight_max(sys::state& state, dcon::province_id prov);
444float local_enemy_army_weight_max(sys::state& state, dcon::province_id prov, dcon::nation_id nation);
445float attrition_amount(sys::state& state, dcon::navy_id a);
446float attrition_amount(sys::state& state, dcon::army_id a);
447float peacetime_attrition_limit(sys::state& state, dcon::nation_id n, dcon::province_id prov);
448float calculate_army_combined_reinforce(sys::state& state, dcon::army_id a);
449
450int32_t movement_time_from_to(sys::state& state, dcon::army_id a, dcon::province_id from, dcon::province_id to);
451int32_t movement_time_from_to(sys::state& state, dcon::navy_id n, dcon::province_id from, dcon::province_id to);
452sys::date arrival_time_to(sys::state& state, dcon::army_id a, dcon::province_id p);
453sys::date arrival_time_to(sys::state& state, dcon::navy_id n, dcon::province_id p);
454float fractional_distance_covered(sys::state& state, dcon::army_id a);
455float fractional_distance_covered(sys::state& state, dcon::navy_id a);
456
457enum class crossing_type { none, river, sea };
458void army_arrives_in_province(sys::state& state, dcon::army_id a, dcon::province_id p, crossing_type crossing, dcon::land_battle_id from = dcon::land_battle_id{}); // only for land provinces
459void navy_arrives_in_province(sys::state& state, dcon::navy_id n, dcon::province_id p, dcon::naval_battle_id from = dcon::naval_battle_id{}); // only for sea provinces
460void end_battle(sys::state& state, dcon::naval_battle_id b, battle_result result);
461void end_battle(sys::state& state, dcon::land_battle_id b, battle_result result);
462
464void update_blackflag_status(sys::state& state, dcon::province_id p);
465void eject_ships(sys::state& state, dcon::province_id p);
466void update_movement(sys::state& state);
467bool siege_potential(sys::state& state, dcon::nation_id army_controller, dcon::nation_id province_controller);
472void apply_attrition(sys::state& state);
473void increase_dig_in(sys::state& state);
474economy::commodity_set get_required_supply(sys::state& state, dcon::nation_id owner, dcon::army_id army);
475economy::commodity_set get_required_supply(sys::state& state, dcon::nation_id owner, dcon::navy_id navy);
476void recover_org(sys::state& state);
477float unit_get_strength(sys::state& state, dcon::regiment_id regiment_id);
478float unit_get_strength(sys::state & state, dcon::ship_id ship_id);
479float unit_calculate_reinforcement(sys::state& state, dcon::regiment_id reg);
480float unit_calculate_reinforcement(sys::state& state, dcon::ship_id reg);
482void repair_ships(sys::state& state);
483void run_gc(sys::state& state);
485void send_rebel_hunter_to_next_province(sys::state& state, dcon::army_id ar, dcon::province_id prov);
486
487bool can_retreat_from_battle(sys::state& state, dcon::naval_battle_id battle);
488bool can_retreat_from_battle(sys::state& state, dcon::land_battle_id battle);
489
490dcon::nation_id get_land_battle_lead_attacker(sys::state& state, dcon::land_battle_id b);
491dcon::nation_id get_land_battle_lead_defender(sys::state& state, dcon::land_battle_id b);
492dcon::nation_id get_naval_battle_lead_defender(sys::state& state, dcon::naval_battle_id b);
493dcon::nation_id get_naval_battle_lead_attacker(sys::state& state, dcon::naval_battle_id b);
494
495float get_leader_select_score(sys::state& state, dcon::leader_id l);
496void update_battle_leaders(sys::state& state, dcon::land_battle_id b);
497void update_battle_leaders(sys::state& state, dcon::naval_battle_id b);
498
499bool rebel_army_in_province(sys::state& state, dcon::province_id p);
500dcon::province_id find_land_rally_pt(sys::state& state, dcon::nation_id by, dcon::province_id start);
501dcon::province_id find_naval_rally_pt(sys::state& state, dcon::nation_id by, dcon::province_id start);
502void move_land_to_merge(sys::state& state, dcon::nation_id by, dcon::army_id a, dcon::province_id start, dcon::province_id dest);
503void move_navy_to_merge(sys::state& state, dcon::nation_id by, dcon::navy_id a, dcon::province_id start, dcon::province_id dest);
504bool pop_eligible_for_mobilization(sys::state& state, dcon::pop_id p);
505
506void disband_regiment_w_pop_death(sys::state& state, dcon::regiment_id reg_id);
507
508} // namespace military
constexpr uint32_t po_transfer_provinces
Definition: military.hpp:23
constexpr uint32_t po_destroy_naval_bases
Definition: military.hpp:33
constexpr uint32_t po_reparations
Definition: military.hpp:22
constexpr uint32_t po_add_to_sphere
Definition: military.hpp:20
constexpr uint32_t po_demand_state
Definition: military.hpp:19
constexpr uint32_t po_install_communist_gov_type
Definition: military.hpp:28
constexpr uint32_t all_allowed_states
Definition: military.hpp:14
constexpr uint32_t po_annex
Definition: military.hpp:18
constexpr uint32_t po_status_quo
Definition: military.hpp:27
constexpr uint32_t is_triggered_only
Definition: military.hpp:11
constexpr uint32_t po_disarmament
Definition: military.hpp:21
constexpr uint32_t po_remove_prestige
Definition: military.hpp:24
constexpr uint32_t is_not_constructing_cb
Definition: military.hpp:12
constexpr uint32_t great_war_obligatory
Definition: military.hpp:13
constexpr uint32_t not_in_crisis
Definition: military.hpp:15
constexpr uint32_t po_remove_cores
Definition: military.hpp:30
constexpr uint32_t po_gunboat
Definition: military.hpp:17
constexpr uint32_t is_civil_war
Definition: military.hpp:9
constexpr uint32_t po_destroy_forts
Definition: military.hpp:32
constexpr uint32_t po_release_puppet
Definition: military.hpp:26
constexpr uint32_t po_clear_union_sphere
Definition: military.hpp:16
constexpr uint32_t po_make_puppet
Definition: military.hpp:25
constexpr uint32_t always
Definition: military.hpp:10
constexpr uint32_t po_colony
Definition: military.hpp:31
constexpr uint32_t po_uninstall_communist_gov_type
Definition: military.hpp:29
void execute_cb_discovery(sys::state &state, dcon::nation_id n)
Definition: military.cpp:2071
bool province_is_under_siege(sys::state const &state, dcon::province_id ids)
Definition: military.cpp:603
bool are_allied_in_war(sys::state const &state, dcon::nation_id a, dcon::nation_id b)
Definition: military.cpp:662
float truce_break_cb_prestige_cost(sys::state &state, dcon::cb_type_id t)
Definition: military.cpp:1587
bool cb_conditions_satisfied(sys::state &state, dcon::nation_id actor, dcon::nation_id target, dcon::cb_type_id cb)
Definition: military.cpp:404
int32_t naval_supply_points_used(sys::state &state, dcon::nation_id n)
Definition: military.cpp:1252
float primary_warscore(sys::state &state, dcon::war_id w)
Definition: military.cpp:3997
float unit_calculate_reinforcement(sys::state &state, dcon::regiment_id reg_id)
Definition: military.cpp:7382
float mobilization_size(sys::state const &state, dcon::nation_id n)
Definition: military.cpp:1334
void run_gc(sys::state &state)
Definition: military.cpp:3314
void update_naval_supply_points(sys::state &state)
Definition: military.cpp:1274
void send_rebel_hunter_to_next_province(sys::state &state, dcon::army_id ar, dcon::province_id prov)
Definition: military.cpp:6862
void army_arrives_in_province(sys::state &state, dcon::army_id a, dcon::province_id p, crossing_type crossing, dcon::land_battle_id from)
Definition: military.cpp:4387
float crisis_cb_addition_infamy_cost(sys::state &state, dcon::cb_type_id type, dcon::nation_id from, dcon::nation_id target, dcon::state_definition_id cb_state)
Definition: military.cpp:2030
int32_t free_transport_capacity(sys::state &state, dcon::navy_id n)
Definition: military.cpp:6851
void add_to_war(sys::state &state, dcon::war_id w, dcon::nation_id n, bool as_attacker, bool on_war_creation)
Definition: military.cpp:2368
float recruited_pop_fraction(sys::state const &state, dcon::nation_id n)
Definition: military.cpp:607
bool is_artillery_better(sys::state &state, dcon::nation_id n, dcon::unit_type_id best, dcon::unit_type_id given)
Definition: military.cpp:57
int32_t total_regiments(sys::state &state, dcon::nation_id n)
Definition: military.cpp:25
void eject_ships(sys::state &state, dcon::province_id p)
Definition: military.cpp:7175
uint8_t make_dice_rolls(sys::state &state, uint32_t seed)
Definition: military.cpp:6508
float directed_warscore(sys::state &state, dcon::war_id w, dcon::nation_id primary, dcon::nation_id secondary)
Definition: military.cpp:4054
void disband_regiment_w_pop_death(sys::state &state, dcon::regiment_id reg_id)
Definition: military.cpp:7900
constexpr uint8_t defender_bonus_crossing_none
Definition: military.hpp:88
bool rebel_army_in_province(sys::state &state, dcon::province_id p)
Definition: military.cpp:7775
int32_t defender_peace_cost(sys::state &state, dcon::war_id war)
Definition: military.cpp:1952
constexpr uint8_t defender_bonus_crossing_river
Definition: military.hpp:89
void end_battle(sys::state &state, dcon::land_battle_id b, battle_result result)
Definition: military.cpp:4918
bool can_use_cb_against(sys::state &state, dcon::nation_id from, dcon::nation_id target)
Definition: military.cpp:245
dcon::unit_type_id get_best_artillery(sys::state &state, dcon::nation_id n, bool primary_culture)
Definition: military.cpp:130
void remove_from_common_allied_wars(sys::state &state, dcon::nation_id a, dcon::nation_id b)
Definition: military.cpp:683
void navy_arrives_in_province(sys::state &state, dcon::navy_id n, dcon::province_id p, dcon::naval_battle_id from)
Definition: military.cpp:6515
int32_t peace_offer_truce_months(sys::state &state, dcon::peace_offer_id offer)
Definition: military.cpp:1934
dcon::pop_id find_available_soldier(sys::state &state, dcon::province_id p, dcon::culture_id pop_culture)
Definition: military.cpp:1009
void apply_base_unit_stat_modifiers(sys::state &state)
Definition: military.cpp:195
float calculate_army_combined_reinforce(sys::state &state, dcon::army_id a)
Definition: military.cpp:7343
void update_blockade_status(sys::state &state)
Definition: military.cpp:597
void end_wars_between(sys::state &state, dcon::nation_id a, dcon::nation_id b)
Definition: military.cpp:2343
bool is_cavalry_better(sys::state &state, dcon::nation_id n, dcon::unit_type_id best, dcon::unit_type_id given)
Definition: military.cpp:74
bool has_truce_with(sys::state &state, dcon::nation_id attacker, dcon::nation_id target)
Definition: military.cpp:2296
int32_t regiments_under_construction_in_province(sys::state &state, dcon::province_id p)
Definition: military.cpp:986
float mobilization_impact(sys::state const &state, dcon::nation_id n)
Definition: military.cpp:1344
void reject_peace_offer(sys::state &state, dcon::peace_offer_id offer)
Definition: military.cpp:3802
void update_ticking_war_score(sys::state &state)
Definition: military.cpp:3842
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, dcon::state_definition_id cb_state)
Definition: military.cpp:2038
bool standard_war_joining_is_possible(sys::state &state, dcon::war_id wfor, dcon::nation_id n, bool as_attacker)
Definition: military.cpp:2603
dcon::nation_id get_naval_battle_lead_defender(sys::state &state, dcon::naval_battle_id b)
Definition: military.cpp:4654
void increase_dig_in(sys::state &state)
Definition: military.cpp:7200
war_role get_role(sys::state const &state, dcon::war_id w, dcon::nation_id n)
Definition: military.cpp:2501
constexpr uint8_t defender_bonus_dig_in_mask
Definition: military.hpp:91
int32_t main_culture_regiments_under_construction_in_province(sys::state &state, dcon::province_id p)
Definition: military.cpp:996
bool can_retreat_from_battle(sys::state &state, dcon::naval_battle_id battle)
Definition: military.cpp:7645
uint32_t state_naval_base_level(sys::state const &state, dcon::state_instance_id si)
Definition: military.cpp:625
void apply_attrition(sys::state &state)
Definition: military.cpp:5478
void reset_unit_stats(sys::state &state)
Definition: military.cpp:186
float effective_army_speed(sys::state &state, dcon::army_id a)
Definition: military.cpp:4217
int32_t attacker_peace_cost(sys::state &state, dcon::war_id war)
Definition: military.cpp:1941
void update_land_battles(sys::state &state)
Definition: military.cpp:5619
void update_battle_leaders(sys::state &state, dcon::land_battle_id b)
Definition: military.cpp:4757
float attrition_amount(sys::state &state, dcon::navy_id a)
Definition: military.cpp:5471
void remove_from_war(sys::state &state, dcon::war_id w, dcon::nation_id n, bool as_loss)
Definition: military.cpp:2759
void update_cbs(sys::state &state)
Definition: military.cpp:1361
void cleanup_war(sys::state &state, dcon::war_id w, war_result result)
Definition: military.cpp:2848
bool is_attacker(sys::state &state, dcon::war_id w, dcon::nation_id n)
Definition: military.cpp:2493
uint32_t state_railroad_level(sys::state const &state, dcon::state_instance_id si)
Definition: military.cpp:637
float local_enemy_army_weight_max(sys::state &state, dcon::province_id prov, dcon::nation_id nation)
Definition: military.cpp:5417
dcon::ship_id create_new_ship(sys::state &state, dcon::nation_id n, dcon::unit_type_id t)
Definition: military.cpp:2317
float truce_break_cb_infamy(sys::state &state, dcon::cb_type_id t, dcon::nation_id target, dcon::state_definition_id cb_state)
Definition: military.cpp:1709
void cleanup_navy(sys::state &state, dcon::navy_id n)
Definition: military.cpp:4862
bool joining_as_attacker_would_break_truce(sys::state &state, dcon::nation_id a, dcon::war_id w)
Definition: military.cpp:783
bool is_infantry_better(sys::state &state, dcon::nation_id n, dcon::unit_type_id best, dcon::unit_type_id given)
Definition: military.cpp:37
bool is_defender_wargoal(sys::state const &state, dcon::war_id w, dcon::wargoal_id wg)
Definition: military.cpp:751
void regenerate_land_unit_average(sys::state &state)
Definition: military.cpp:1202
dcon::unit_type_id get_best_cavalry(sys::state &state, dcon::nation_id n, bool primary_culture)
Definition: military.cpp:158
dcon::nation_id get_land_battle_lead_attacker(sys::state &state, dcon::land_battle_id b)
Definition: military.cpp:4674
void recover_org(sys::state &state)
Definition: military.cpp:7278
void update_recruitable_regiments(sys::state &state, dcon::nation_id n)
Definition: military.cpp:1175
float primary_warscore_from_blockades(sys::state &state, dcon::war_id w)
Definition: military.cpp:3958
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)
Definition: military.cpp:2668
constexpr uint8_t defender_bonus_crossing_mask
Definition: military.hpp:87
bool cb_requires_selection_of_a_valid_nation(sys::state const &state, dcon::cb_type_id t)
Definition: military.cpp:2057
economy::commodity_set get_required_supply(sys::state &state, dcon::nation_id owner, dcon::army_id army)
Definition: military.cpp:7217
dcon::unit_type_id get_best_infantry(sys::state &state, dcon::nation_id n, bool primary_culture)
Definition: military.cpp:96
int32_t mobilized_regiments_created_from_province(sys::state &state, dcon::province_id p)
Definition: military.cpp:833
bool are_in_common_war(sys::state const &state, dcon::nation_id a, dcon::nation_id b)
Definition: military.cpp:673
bool can_embark_onto_sea_tile(sys::state &state, dcon::nation_id from, dcon::province_id p, dcon::army_id a)
Definition: military.cpp:4191
sys::date arrival_time_to(sys::state &state, dcon::army_id a, dcon::province_id p)
Definition: military.cpp:4284
dcon::war_id find_war_between(sys::state const &state, dcon::nation_id a, dcon::nation_id b)
Definition: military.cpp:718
void advance_mobilizations(sys::state &state)
Definition: military.cpp:7570
void add_cb(sys::state &state, dcon::nation_id n, dcon::cb_type_id cb, dcon::nation_id target, dcon::state_definition_id target_state=dcon::state_definition_id{})
Definition: military.cpp:1456
void update_movement(sys::state &state)
Definition: military.cpp:6585
bool will_recieve_attrition(sys::state &state, dcon::navy_id a)
Definition: military.cpp:5340
uint32_t naval_supply_from_naval_base(sys::state &state, dcon::province_id prov, dcon::nation_id nation)
Definition: military.cpp:1256
int32_t regiments_possible_from_pop(sys::state &state, dcon::pop_id p)
Definition: military.cpp:851
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)
Definition: military.cpp:2509
void reinforce_regiments(sys::state &state)
Definition: military.cpp:7390
bool state_has_naval_base(sys::state const &state, dcon::state_instance_id si)
Definition: military.cpp:613
void move_land_to_merge(sys::state &state, dcon::nation_id by, dcon::army_id a, dcon::province_id start, dcon::province_id dest)
Definition: military.cpp:7819
void add_truce(sys::state &state, dcon::nation_id a, dcon::nation_id b, int32_t days)
Definition: military.cpp:3493
dcon::nation_id get_naval_battle_lead_attacker(sys::state &state, dcon::naval_battle_id b)
Definition: military.cpp:4634
ve::fp_vector ve_mobilization_impact(sys::state const &state, ve::tagged_vector< dcon::nation_id > nations)
Definition: military.cpp:1355
int32_t regiments_created_from_province(sys::state &state, dcon::province_id p)
Definition: military.cpp:823
void give_military_access(sys::state &state, dcon::nation_id accessing_nation, dcon::nation_id target)
Definition: military.cpp:2329
void apply_regiment_damage(sys::state &state)
Definition: military.cpp:5537
void monthly_leaders_update(sys::state &state)
Definition: military.cpp:2204
float local_army_weight_max(sys::state &state, dcon::province_id prov)
Definition: military.cpp:5405
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)
Definition: military.cpp:471
float truce_break_cb_militancy(sys::state &state, dcon::cb_type_id t)
Definition: military.cpp:1648
void update_naval_battles(sys::state &state)
Definition: military.cpp:6155
float primary_warscore_from_battles(sys::state &state, dcon::war_id w)
Definition: military.cpp:4036
dcon::province_id find_land_rally_pt(sys::state &state, dcon::nation_id by, dcon::province_id start)
Definition: military.cpp:7782
float cb_infamy(sys::state &state, dcon::cb_type_id t, dcon::nation_id target, dcon::state_definition_id cb_state)
Definition: military.cpp:1519
dcon::regiment_id create_new_regiment(sys::state &state, dcon::nation_id n, dcon::unit_type_id t)
Definition: military.cpp:2306
void update_siege_progress(sys::state &state)
Definition: military.cpp:6928
void move_navy_to_merge(sys::state &state, dcon::nation_id by, dcon::navy_id a, dcon::province_id start, dcon::province_id dest)
Definition: military.cpp:7856
void start_mobilization(sys::state &state, dcon::nation_id n)
Definition: military.cpp:7472
void update_all_recruitable_regiments(sys::state &state)
Definition: military.cpp:1181
float effective_navy_speed(sys::state &state, dcon::navy_id n)
Definition: military.cpp:4242
float local_army_weight(sys::state &state, dcon::province_id prov)
Definition: military.cpp:5393
void call_attacker_allies(sys::state &state, dcon::war_id wfor)
Definition: military.cpp:2648
bool leader_is_in_combat(sys::state &state, dcon::leader_id l)
Definition: military.cpp:2106
float primary_warscore_from_occupation(sys::state &state, dcon::war_id w)
Definition: military.cpp:4005
float unit_get_strength(sys::state &state, dcon::regiment_id regiment_id)
Definition: military.cpp:7334
int32_t mobilized_regiments_possible_from_province(sys::state &state, dcon::province_id p)
Definition: military.cpp:1137
void remove_military_access(sys::state &state, dcon::nation_id accessing_nation, dcon::nation_id target)
Definition: military.cpp:2336
bool are_at_war(sys::state const &state, dcon::nation_id a, dcon::nation_id b)
Definition: military.cpp:649
void set_initial_leaders(sys::state &state)
Definition: military.cpp:2877
bool defenders_have_non_status_quo_wargoal(sys::state const &state, dcon::war_id w)
Definition: military.cpp:760
void invalidate_unowned_wargoals(sys::state &state)
Definition: military.cpp:213
int32_t main_culture_regiments_created_from_province(sys::state &state, dcon::province_id p)
Definition: military.cpp:929
void regenerate_total_regiment_counts(sys::state &state)
Definition: military.cpp:1190
int32_t supply_limit_in_province(sys::state &state, dcon::nation_id n, dcon::province_id p)
Definition: military.cpp:794
float primary_warscore_from_war_goals(sys::state &state, dcon::war_id w)
Definition: military.cpp:4040
void end_mobilization(sys::state &state, dcon::nation_id n)
Definition: military.cpp:7543
bool attackers_have_status_quo_wargoal(sys::state const &state, dcon::war_id w)
Definition: military.cpp:775
int32_t transport_capacity(sys::state &state, dcon::navy_id n)
Definition: military.cpp:6843
dcon::leader_id make_new_leader(sys::state &state, dcon::nation_id n, bool is_general)
Definition: military.cpp:2116
void cleanup_army(sys::state &state, dcon::army_id n)
Definition: military.cpp:4812
void repair_ships(sys::state &state)
Definition: military.cpp:7449
constexpr uint8_t defender_bonus_crossing_sea
Definition: military.hpp:90
int32_t total_ships(sys::state &state, dcon::nation_id n)
Definition: military.cpp:28
void daily_leaders_update(sys::state &state)
Definition: military.cpp:2258
void kill_leader(sys::state &state, dcon::leader_id l)
Definition: military.cpp:2150
float relative_attrition_amount(sys::state &state, dcon::navy_id a, dcon::province_id prov)
Definition: military.cpp:5389
bool joining_war_does_not_violate_constraints(sys::state const &state, dcon::nation_id a, dcon::war_id w, bool as_attacker)
Definition: military.cpp:722
void restore_unsaved_values(sys::state &state)
Definition: military.cpp:233
constexpr int32_t days_before_retreat
Definition: military.hpp:254
void implement_peace_offer(sys::state &state, dcon::peace_offer_id offer)
Definition: military.cpp:3505
void call_defender_allies(sys::state &state, dcon::war_id wfor)
Definition: military.cpp:2617
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)
Definition: military.cpp:2937
float get_leader_select_score(sys::state &state, dcon::leader_id l)
Definition: military.cpp:4736
int32_t movement_time_from_to(sys::state &state, dcon::army_id a, dcon::province_id from, dcon::province_id to)
Definition: military.cpp:4258
bool is_civil_war(sys::state const &state, dcon::war_id w)
Definition: military.cpp:743
bool pop_eligible_for_mobilization(sys::state &state, dcon::pop_id p)
Definition: military.cpp:7892
int32_t regiments_max_possible_from_province(sys::state &state, dcon::province_id p)
Definition: military.cpp:885
int32_t naval_supply_points(sys::state &state, dcon::nation_id n)
Definition: military.cpp:1249
bool cb_requires_selection_of_a_liberatable_tag(sys::state const &state, dcon::cb_type_id t)
Definition: military.cpp:2061
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)
Definition: military.cpp:7652
dcon::nation_id get_land_battle_lead_defender(sys::state &state, dcon::land_battle_id b)
Definition: military.cpp:4705
dcon::province_id find_naval_rally_pt(sys::state &state, dcon::nation_id by, dcon::province_id start)
Definition: military.cpp:7802
void regenerate_ship_scores(sys::state &state)
Definition: military.cpp:1227
void update_blackflag_status(sys::state &state, dcon::province_id p)
Definition: military.cpp:7166
float peacetime_attrition_limit(sys::state &state, dcon::nation_id n, dcon::province_id prov)
Definition: military.cpp:5344
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)
Definition: military.cpp:1799
std::string get_war_name(sys::state &, dcon::war_id)
Definition: military.cpp:2575
int32_t main_culture_regiments_max_possible_from_province(sys::state &state, dcon::province_id p)
Definition: military.cpp:939
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)
Definition: military.cpp:260
bool defenders_have_status_quo_wargoal(sys::state const &state, dcon::war_id w)
Definition: military.cpp:768
bool siege_potential(sys::state &state, dcon::nation_id army_controller, dcon::nation_id province_controller)
Definition: military.cpp:6913
float fractional_distance_covered(sys::state &state, dcon::army_id a)
Definition: military.cpp:6800
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)
Definition: military.cpp:7693
float successful_cb_prestige(sys::state &state, dcon::cb_type_id t, dcon::nation_id actor)
Definition: military.cpp:1964
int32_t cost_of_peace_offer(sys::state &state, dcon::peace_offer_id offer)
Definition: military.cpp:1924
bool province_is_blockaded(sys::state const &state, dcon::province_id ids)
Definition: military.cpp:572
bool cb_requires_selection_of_a_state(sys::state const &state, dcon::cb_type_id t)
Definition: military.cpp:2065
dcon::navy_id find_embark_target(sys::state &state, dcon::nation_id from, dcon::province_id p, dcon::army_id a)
Definition: military.cpp:4203
int32_t mobilized_regiments_pop_limit(sys::state &state, dcon::nation_id n)
Definition: military.cpp:1166
uint uint32_t
uchar uint8_t
dcon::state_definition_id target_state
Definition: military.hpp:175
dcon::cb_type_id cb_type
Definition: military.hpp:174
dcon::nation_id target
Definition: military.hpp:173
dcon::cb_type_id standard_civil_war
Definition: military.hpp:152
dcon::cb_type_id uninstall_communist_gov
Definition: military.hpp:158
dcon::unit_type_id base_army_unit
Definition: military.hpp:149
dcon::unit_type_id irregular
Definition: military.hpp:164
tagged_vector< unit_definition, dcon::unit_type_id > unit_base_definitions
Definition: military.hpp:142
dcon::unit_type_id infantry
Definition: military.hpp:165
dcon::cb_type_id crisis_annex
Definition: military.hpp:162
dcon::cb_type_id standard_status_quo
Definition: military.hpp:155
dcon::cb_type_id crisis_liberate
Definition: military.hpp:161
dcon::cb_type_id crisis_colony
Definition: military.hpp:160
dcon::cb_type_id standard_great_war
Definition: military.hpp:153
dcon::unit_type_id base_naval_unit
Definition: military.hpp:150
dcon::unit_type_id artillery
Definition: military.hpp:166
dcon::leader_trait_id first_background_trait
Definition: military.hpp:144
dcon::nation_id defending_nation
Definition: military.hpp:246
dcon::leader_id attacking_general
Definition: military.hpp:242
dcon::leader_id defending_general
Definition: military.hpp:243
dcon::province_id location
Definition: military.hpp:248
dcon::nation_id attacking_nation
Definition: military.hpp:245
dcon::province_id where
Definition: military.hpp:66
dcon::nation_id attacking_nation
Definition: military.hpp:213
dcon::nation_id defending_nation
Definition: military.hpp:214
dcon::leader_id defending_admiral
Definition: military.hpp:211
dcon::leader_id attacking_admiral
Definition: military.hpp:210
dcon::province_id location
Definition: military.hpp:216
static constexpr uint16_t type_infantry
Definition: military.hpp:76
static constexpr uint16_t type_support
Definition: military.hpp:78
dcon::regiment_id regiment
Definition: military.hpp:80
static constexpr uint16_t is_attacking
Definition: military.hpp:73
static constexpr uint16_t type_cavalry
Definition: military.hpp:77
static constexpr uint16_t type_mask
Definition: military.hpp:75
dcon::ship_id ship
Definition: military.hpp:55
static constexpr uint16_t mode_engaged
Definition: military.hpp:43
static constexpr uint16_t type_mask
Definition: military.hpp:50
static constexpr uint16_t type_big
Definition: military.hpp:51
static constexpr uint16_t mode_retreated
Definition: military.hpp:45
static constexpr uint16_t mode_sunk
Definition: military.hpp:46
static constexpr uint16_t type_transport
Definition: military.hpp:53
static constexpr uint16_t distance_mask
Definition: military.hpp:38
static constexpr uint16_t mode_approaching
Definition: military.hpp:42
static constexpr uint16_t mode_seeking
Definition: military.hpp:41
static constexpr uint16_t mode_retreating
Definition: military.hpp:44
static constexpr uint16_t mode_mask
Definition: military.hpp:40
static constexpr uint16_t is_attacking
Definition: military.hpp:48
static constexpr uint16_t type_small
Definition: military.hpp:52
economy::commodity_set supply_cost
Definition: military.hpp:99
economy::commodity_set build_cost
Definition: military.hpp:98
dcon::national_identity_id wg_tag
Definition: military.hpp:185
dcon::nation_id secondary_nation
Definition: military.hpp:184
dcon::state_definition_id state
Definition: military.hpp:186
dcon::cb_type_id cb
Definition: military.hpp:187
Holds important data about the game world, state, and other data regarding windowing,...