### Cabinet Trust ### AST_cabinet_trust_change = { #Will swap Cabinet Trust State /AND/ Call for function that swaps ideas IF = { limit = { has_country_flag = AST_cabinet_trust_increase #Is set in AST_cabinet_trust_cat decisions check_variable = { var = AST_cabinet_trust_state value = 5 compare = less_than } } add_to_variable = { var = AST_cabinet_trust_state value = 1 } AST_cabinet_trust_swap_idea = yes } ELSE_IF = { limit = { has_country_flag = AST_cabinet_trust_decrease #Is set in AST_cabinet_trust_cat decisions check_variable = { var = AST_cabinet_trust_state value = 1 compare = greater_than } } add_to_variable = { var = AST_cabinet_trust_state value = -1 } AST_cabinet_trust_swap_idea = yes } clr_country_flag = AST_cabinet_trust_increase clr_country_flag = AST_cabinet_trust_decrease } AST_cabinet_trust_swap_idea = { #Will swap ideas that represent the correct Cabinet Trust State IF = { #Remove old idea IF = { limit = { has_idea = AST_cabinet_trust_state_1_idea OR = { NOT = { check_variable = { var = AST_cabinet_trust_state value = 1 compare = equals } } NOT = { has_country_flag = AST_canberra_air_disaster_flag } } } remove_ideas = AST_cabinet_trust_state_1_idea } ELSE_IF = { limit = { has_idea = AST_cabinet_trust_state_2_idea OR = { NOT = { check_variable = { var = AST_cabinet_trust_state value = 2 compare = equals } } NOT = { has_country_flag = AST_canberra_air_disaster_flag } } } remove_ideas = AST_cabinet_trust_state_2_idea } ELSE_IF = { limit = { has_idea = AST_cabinet_trust_state_3_idea OR = { NOT = { check_variable = { var = AST_cabinet_trust_state value = 3 compare = equals } } NOT = { has_country_flag = AST_canberra_air_disaster_flag } } } remove_ideas = AST_cabinet_trust_state_3_idea } ELSE_IF = { limit = { has_idea = AST_cabinet_trust_state_4_idea OR = { NOT = { check_variable = { var = AST_cabinet_trust_state value = 4 compare = equals } } NOT = { has_country_flag = AST_canberra_air_disaster_flag } } } remove_ideas = AST_cabinet_trust_state_4_idea } ELSE_IF = { limit = { has_idea = AST_cabinet_trust_state_5_idea OR = { NOT = { check_variable = { var = AST_cabinet_trust_state value = 5 compare = equals } } NOT = { has_country_flag = AST_canberra_air_disaster_flag } } } remove_ideas = AST_cabinet_trust_state_5_idea } } IF = { #Add new idea limit = { NOT = { OR = { has_country_flag = AST_cabinet_trust_complete_1_flag has_country_flag = AST_cabinet_trust_complete_2_flag has_country_flag = AST_cabinet_trust_complete_3_flag } } } IF = { limit = { check_variable = { var = AST_cabinet_trust_state value = 1 compare = equals } } add_ideas = AST_cabinet_trust_state_1_idea } ELSE_IF = { limit = { check_variable = { var = AST_cabinet_trust_state value = 2 compare = equals } } add_ideas = AST_cabinet_trust_state_2_idea } ELSE_IF = { limit = { check_variable = { var = AST_cabinet_trust_state value = 3 compare = equals } } add_ideas = AST_cabinet_trust_state_3_idea } ELSE_IF = { limit = { check_variable = { var = AST_cabinet_trust_state value = 4 compare = equals } } add_ideas = AST_cabinet_trust_state_4_idea } ELSE_IF = { limit = { check_variable = { var = AST_cabinet_trust_state value = 5 compare = equals } } add_ideas = AST_cabinet_trust_state_5_idea } } } AST_uap_5_time_discount_effect = { reduce_focus_completion_cost = { focus = AST_solidarity_by_the_empire cost = 5 } reduce_focus_completion_cost = { focus = AST_wool_agreement cost = 5 } reduce_focus_completion_cost = { focus = AST_australian_war_cabinet cost = 5 } reduce_focus_completion_cost = { focus = AST_singapore_strategy cost = 5 } reduce_focus_completion_cost = { focus = AST_british_war_cabinet cost = 5 } reduce_focus_completion_cost = { focus = AST_british_pacific_fleet cost = 5 } reduce_focus_completion_cost = { focus = AST_all_dressed_up cost = 5 } reduce_focus_completion_cost = { focus = AST_overseas_loyalties cost = 5 } reduce_focus_completion_cost = { focus = AST_the_ultimate_overseas_duty cost = 5 } reduce_focus_completion_cost = { focus = AST_eastern_focus cost = 5 } reduce_focus_completion_cost = { focus = AST_australian_command cost = 5 } reduce_focus_completion_cost = { focus = AST_holding_the_battlefield cost = 5 } reduce_focus_completion_cost = { focus = AST_inevitably_independent cost = 5 } IF = { #Shared focuses limit = { NOT = { has_completed_focus = AST_pleading_britain } } reduce_focus_completion_cost = { focus = AST_under_the_rule_of_canberra cost = 5 } reduce_focus_completion_cost = { focus = AST_taking_the_helm cost = 5 } reduce_focus_completion_cost = { focus = AST_a_change_of_authority cost = 5 } } IF = { #Shared focuses limit = { NOT = { has_completed_focus = AST_bring_on_the_giant } } reduce_focus_completion_cost = { focus = AST_allied_after_all cost = 5 } reduce_focus_completion_cost = { focus = AST_the_pacific_resistance cost = 5 } reduce_focus_completion_cost = { focus = AST_equal_training cost = 5 } reduce_focus_completion_cost = { focus = AST_a_northern_barrier cost = 5 } reduce_focus_completion_cost = { focus = AST_demand_resources cost = 5 } reduce_focus_completion_cost = { focus = AST_reclaim_the_lost_territory cost = 5 } } } AST_uap_5_time_discount_effect_reverse = { reduce_focus_completion_cost = { focus = AST_solidarity_by_the_empire cost = -5 } reduce_focus_completion_cost = { focus = AST_wool_agreement cost = -5 } reduce_focus_completion_cost = { focus = AST_australian_war_cabinet cost = -5 } reduce_focus_completion_cost = { focus = AST_singapore_strategy cost = -5 } reduce_focus_completion_cost = { focus = AST_british_war_cabinet cost = -5 } reduce_focus_completion_cost = { focus = AST_british_pacific_fleet cost = -5 } reduce_focus_completion_cost = { focus = AST_all_dressed_up cost = -5 } reduce_focus_completion_cost = { focus = AST_overseas_loyalties cost = -5 } reduce_focus_completion_cost = { focus = AST_the_ultimate_overseas_duty cost = -5 } reduce_focus_completion_cost = { focus = AST_eastern_focus cost = -5 } reduce_focus_completion_cost = { focus = AST_australian_command cost = -5 } reduce_focus_completion_cost = { focus = AST_holding_the_battlefield cost = -5 } reduce_focus_completion_cost = { focus = AST_inevitably_independent cost = -5 } IF = { #Shared focuses limit = { NOT = { has_completed_focus = AST_pleading_britain } } reduce_focus_completion_cost = { focus = AST_under_the_rule_of_canberra cost = -5 } reduce_focus_completion_cost = { focus = AST_taking_the_helm cost = -5 } reduce_focus_completion_cost = { focus = AST_a_change_of_authority cost = -5 } } IF = { #Shared focuses limit = { NOT = { has_completed_focus = AST_bring_on_the_giant } } reduce_focus_completion_cost = { focus = AST_allied_after_all cost = -5 } reduce_focus_completion_cost = { focus = AST_the_pacific_resistance cost = -5 } reduce_focus_completion_cost = { focus = AST_equal_training cost = -5 } reduce_focus_completion_cost = { focus = AST_a_northern_barrier cost = -5 } reduce_focus_completion_cost = { focus = AST_demand_resources cost = -5 } reduce_focus_completion_cost = { focus = AST_reclaim_the_lost_territory cost = -5 } } } AST_alp_5_time_discount_effect = { reduce_focus_completion_cost = { focus = AST_no_foreign_battlefields cost = 5 } reduce_focus_completion_cost = { focus = AST_aerial_defense cost = 5 } reduce_focus_completion_cost = { focus = AST_ratify_westminster_adoption_act cost = 5 } reduce_focus_completion_cost = { focus = AST_administer_the_mandate cost = 5 } reduce_focus_completion_cost = { focus = AST_a_rational_request cost = 5 } reduce_focus_completion_cost = { focus = AST_volunteers cost = 5 } reduce_focus_completion_cost = { focus = AST_until_the_tide_of_battle_swings cost = 5 } reduce_focus_completion_cost = { focus = AST_walls_and_whispers cost = 5 } reduce_focus_completion_cost = { focus = AST_united_states_as_our_keystone cost = 5 } reduce_focus_completion_cost = { focus = AST_liberty_loans cost = 5 } reduce_focus_completion_cost = { focus = AST_bring_on_the_giant cost = 5 } reduce_focus_completion_cost = { focus = AST_conscription_at_last cost = 5 } reduce_focus_completion_cost = { focus = AST_pleading_britain cost = 5 } reduce_focus_completion_cost = { focus = AST_reinforcements cost = 5 } reduce_focus_completion_cost = { focus = AST_ending_overseas_conscription cost = 5 } reduce_focus_completion_cost = { focus = AST_an_uncle_for_father_figure cost = 5 } reduce_focus_completion_cost = { focus = AST_we_endured cost = 5 } reduce_focus_completion_cost = { focus = AST_seven_million_britishers cost = 5 } reduce_focus_completion_cost = { focus = AST_its_fight_work_or_perish cost = 5 } IF = { #Shared focuses limit = { NOT = { has_completed_focus = AST_inevitably_independent } } reduce_focus_completion_cost = { focus = AST_allied_after_all cost = 5 } reduce_focus_completion_cost = { focus = AST_the_pacific_resistance cost = 5 } reduce_focus_completion_cost = { focus = AST_equal_training cost = 5 } reduce_focus_completion_cost = { focus = AST_a_northern_barrier cost = 5 } reduce_focus_completion_cost = { focus = AST_demand_resources cost = 5 } reduce_focus_completion_cost = { focus = AST_reclaim_the_lost_territory cost = 5 } } IF = { #Shared focuses limit = { NOT = { has_completed_focus = AST_the_ultimate_overseas_duty } } reduce_focus_completion_cost = { focus = AST_under_the_rule_of_canberra cost = 5 } reduce_focus_completion_cost = { focus = AST_taking_the_helm cost = 5 } reduce_focus_completion_cost = { focus = AST_a_change_of_authority cost = 5 } } } AST_alp_5_time_discount_effect_reverse = { reduce_focus_completion_cost = { focus = AST_no_foreign_battlefields cost = -5 } reduce_focus_completion_cost = { focus = AST_aerial_defense cost = -5 } reduce_focus_completion_cost = { focus = AST_ratify_westminster_adoption_act cost = -5 } reduce_focus_completion_cost = { focus = AST_administer_the_mandate cost = -5 } reduce_focus_completion_cost = { focus = AST_a_rational_request cost = -5 } reduce_focus_completion_cost = { focus = AST_volunteers cost = -5 } reduce_focus_completion_cost = { focus = AST_until_the_tide_of_battle_swings cost = -5 } reduce_focus_completion_cost = { focus = AST_walls_and_whispers cost = -5 } reduce_focus_completion_cost = { focus = AST_united_states_as_our_keystone cost = -5 } reduce_focus_completion_cost = { focus = AST_liberty_loans cost = -5 } reduce_focus_completion_cost = { focus = AST_bring_on_the_giant cost = -5 } reduce_focus_completion_cost = { focus = AST_conscription_at_last cost = -5 } reduce_focus_completion_cost = { focus = AST_pleading_britain cost = -5 } reduce_focus_completion_cost = { focus = AST_reinforcements cost = -5 } reduce_focus_completion_cost = { focus = AST_ending_overseas_conscription cost = -5 } reduce_focus_completion_cost = { focus = AST_an_uncle_for_father_figure cost = -5 } reduce_focus_completion_cost = { focus = AST_we_endured cost = -5 } reduce_focus_completion_cost = { focus = AST_seven_million_britishers cost = -5 } reduce_focus_completion_cost = { focus = AST_its_fight_work_or_perish cost = -5 } IF = { #Shared focuses limit = { NOT = { has_completed_focus = AST_inevitably_independent } } reduce_focus_completion_cost = { focus = AST_allied_after_all cost = -5 } reduce_focus_completion_cost = { focus = AST_the_pacific_resistance cost = -5 } reduce_focus_completion_cost = { focus = AST_equal_training cost = 5 } reduce_focus_completion_cost = { focus = AST_a_northern_barrier cost = -5 } reduce_focus_completion_cost = { focus = AST_demand_resources cost = -5 } reduce_focus_completion_cost = { focus = AST_reclaim_the_lost_territory cost = -5 } } IF = { #Shared focuses limit = { NOT = { has_completed_focus = AST_the_ultimate_overseas_duty } } reduce_focus_completion_cost = { focus = AST_under_the_rule_of_canberra cost = -5 } reduce_focus_completion_cost = { focus = AST_taking_the_helm cost = -5 } reduce_focus_completion_cost = { focus = AST_a_change_of_authority cost = -5 } } } AST_democratic_votes_increase_5_effect = { IF = { limit = { has_government = democratic has_completed_focus = AST_war_is_coming check_variable = { #UAP is current government var = AST_ruling_party value = 0 compare = equals } } add_to_variable = { #Edit AST_country_party_influence_uap_tt if changed var = AST_uap_votes_var value = 5.00 } add_to_variable = { var = AST_alp_votes_var value = -5.00 } clamp_variable = { var = AST_uap_votes_var min = 0 max = 100 } clamp_variable = { var = AST_alp_votes_var min = 0 max = 100 } custom_effect_tooltip = AST_uap_popularity_increase_5 } ELSE_IF = { limit = { has_government = democratic has_completed_focus = AST_war_is_coming check_variable = { #ALP is current government var = AST_ruling_party value = 1 compare = equals } } add_to_variable = { #Edit AST_country_party_influence_alp_tt if changed var = AST_alp_votes_var value = 5.00 } add_to_variable = { var = AST_uap_votes_var value = -5.00 } clamp_variable = { var = AST_alp_votes_var min = 0 max = 100 } clamp_variable = { var = AST_uap_votes_var min = 0 max = 100 } custom_effect_tooltip = AST_alp_popularity_increase_5 } } AST_democratic_votes_decrease_5_effect = { IF = { limit = { has_government = democratic has_completed_focus = AST_war_is_coming check_variable = { #UAP is current government var = AST_ruling_party value = 0 compare = equals } } add_to_variable = { var = AST_uap_votes_var value = -5.00 } add_to_variable = { var = AST_alp_votes_var value = 5.00 } clamp_variable = { var = AST_uap_votes_var min = 0 max = 100 } clamp_variable = { var = AST_alp_votes_var min = 0 max = 100 } custom_effect_tooltip = AST_uap_popularity_decrease_5 } ELSE_IF = { limit = { has_government = democratic has_completed_focus = AST_war_is_coming check_variable = { #ALP is current government var = AST_ruling_party value = 1 compare = equals } } add_to_variable = { var = AST_alp_votes_var value = -5.00 } add_to_variable = { var = AST_uap_votes_var value = 5.00 } clamp_variable = { var = AST_alp_votes_var min = 0 max = 100 } clamp_variable = { var = AST_uap_votes_var min = 0 max = 100 } custom_effect_tooltip = AST_alp_popularity_decrease_5 } } AST_democratic_votes_decrease_10_effect = { IF = { limit = { has_government = democratic has_completed_focus = AST_war_is_coming check_variable = { #UAP is current government var = AST_ruling_party value = 0 compare = equals } } add_to_variable = { var = AST_uap_votes_var value = -10.00 } add_to_variable = { var = AST_alp_votes_var value = 10.00 } clamp_variable = { var = AST_uap_votes_var min = 0 max = 100 } clamp_variable = { var = AST_alp_votes_var min = 0 max = 100 } custom_effect_tooltip = AST_uap_popularity_decrease_10 } ELSE_IF = { limit = { has_government = democratic has_completed_focus = AST_war_is_coming check_variable = { #ALP is current government var = AST_ruling_party value = 1 compare = equals } } add_to_variable = { var = AST_alp_votes_var value = -10.00 } add_to_variable = { var = AST_uap_votes_var value = 10.00 } clamp_variable = { var = AST_alp_votes_var min = 0 max = 100 } clamp_variable = { var = AST_uap_votes_var min = 0 max = 100 } custom_effect_tooltip = AST_alp_popularity_decrease_10 } } AST_votes_change_effect = { set_variable = { var = AST_uap_votes_change_var value = AST_uap_votes_daily_var } subtract_from_variable = { var = AST_uap_votes_change_var value = AST_alp_votes_daily_var } set_variable = { var = AST_alp_votes_change_var value = AST_alp_votes_daily_var } subtract_from_variable = { var = AST_alp_votes_change_var value = AST_uap_votes_daily_var } set_variable = { var = AST_uap_votes_daily_impact_var value = AST_uap_votes_daily_var } multiply_variable = { var = AST_uap_votes_daily_impact_var value = -1 } set_variable = { var = AST_alp_votes_daily_impact_var value = AST_alp_votes_daily_var } multiply_variable = { var = AST_alp_votes_daily_impact_var value = -1 } } AST_divide_the_pacific_effect = { #Join each other faction if either has on, otherwise enacts JAP/AST non-agression pact if there is no current one IF = { limit = { OR = { NOT = { JAP = { is_in_faction_with = AST } } AST = { has_country_flag = AST_jap_join_ast_faction } AST = { has_country_flag = AST_ast_join_jap_faction } AST = { has_country_flag = AST_non_agression_pact_jap } } } IF = { limit = { OR = { AST = { is_in_faction = yes } AST = { has_country_flag = AST_jap_join_ast_faction } } } AST = { set_country_flag = AST_jap_join_ast_faction faction_leader = { add_to_faction = JAP } } } ELSE_IF = { limit = { OR = { JAP = { is_in_faction = yes } AST = { has_country_flag = AST_ast_join_jap_faction } } } AST = { set_country_flag = AST_ast_join_jap_faction } JAP = { faction_leader = { add_to_faction = AST } } } ELSE_IF = { limit = { OR = { NOT = { JAP = { has_non_aggression_pact_with = AST } } AST = { has_country_flag = AST_non_agression_pact_jap } } } AST = { set_country_flag = AST_non_agression_pact_jap } JAP = { diplomatic_relation = { country = AST relation = non_aggression_pact } } } } custom_effect_tooltip = generic_skip_one_line_tt custom_effect_tooltip = AST_dividing_the_pacific_ast_gain_tt #If MAL/Singapore/SIA isn't controlled by JAP or AST, add AST state claims MAL = { every_core_state = { limit = { NOT = { is_controlled_by = AST is_controlled_by = JAP } } set_state_flag = AST_claims_to_ast add_claim_by = AST } } custom_effect_tooltip = generic_skip_one_line_tt SIA = { every_core_state = { limit = { NOT = { is_controlled_by = AST is_controlled_by = JAP } } set_state_flag = AST_claims_to_ast add_claim_by = ast } } JAP = { add_ai_strategy = { type = avoid_starting_wars id = MAL value = 150 } add_ai_strategy = { type = avoid_starting_wars id = SIA value = 150 } } #If BRM/French Indochina isn't controlled by JAP or AST, add JAP state claims custom_effect_tooltip = generic_skip_one_line_tt custom_effect_tooltip = AST_dividing_the_pacific_jap_gain_tt BRM = { every_core_state = { limit = { NOT = { is_controlled_by = AST is_controlled_by = JAP } } set_state_flag = AST_claims_to_jap add_claim_by = JAP } } custom_effect_tooltip = generic_skip_one_line_tt every_state = { limit = { OR = { #French Indochina = { state = 286 state = 670 state = 671 state = 741 state = 1017 state = 1066 state = 1067 state = 1068 state = 1069 #} } NOT = { is_controlled_by = AST is_controlled_by = JAP } } set_state_flag = AST_claims_to_jap add_claim_by = JAP } AST = { add_ai_strategy = { type = avoid_starting_wars id = BRM value = 150 } add_ai_strategy = { type = avoid_starting_wars id = FRA value = 150 } } IF = { #Only for tooltip limit = { OR = { BRM = { OR = { is_subject_of = AST has_country_flag = AST_brm_puppet_to_jap } } any_state = { is_core_of = BRM OR = { is_controlled_by = AST has_state_flag = AST_transfer_to_jap } } any_state = { OR = { is_controlled_by = AST has_state_flag = AST_transfer_to_jap } OR = { state = 286 state = 670 state = 671 state = 741 state = 1017 state = 1066 state = 1067 state = 1068 state = 1069 } } } } custom_effect_tooltip = generic_skip_one_line_tt custom_effect_tooltip = AST_dividing_the_pacific_tt3 } #If BRM is subject of AST, transfer it to JAP IF = { limit = { BRM = { is_subject_of = AST } } JAP = { puppet = BRM } BRM = { set_country_flag = AST_brm_puppet_to_jap } hidden_effect = { BRM = { country_event = { id = AST_diplomatic_events.37 hours = 3 } } } } #If BRM/French Indochina is controlled by AST, transfer it to JAP BRM = { every_core_state = { limit = { is_controlled_by = AST } set_state_flag = AST_transfer_to_jap transfer_state_to = JAP } } every_state = { limit = { is_controlled_by = AST OR = { #French Indochina = { state = 286 state = 670 state = 671 state = 741 state = 1017 state = 1066 state = 1067 state = 1068 state = 1069 #} } } set_state_flag = AST_transfer_to_jap transfer_state_to = JAP } } AST_nauru_pact_effect = { IF = { limit = { original_tag = GER ROOT = { has_idea = AST_the_promise_of_nauru } } remove_ideas = { AST_the_promise_of_nauru } custom_effect_tooltip = generic_skip_one_line_tt } 725 = { #Nauru transfer_state_to = GER } IF = { limit = { GER = { OR = { has_country_flag = AST_ast_to_ger_faction_flag #tt reasons AND = { is_in_faction = yes is_faction_leader = yes } } } } custom_effect_tooltip = generic_skip_one_line_tt IF = { limit = { AST = { is_subject = no } } effect_tooltip = { set_autonomy = { target = AST autonomy_state = autonomy_free } } } GER = { add_to_faction = AST set_country_flag = AST_ast_to_ger_faction_flag #tt reasons } } ELSE = { custom_effect_tooltip = generic_skip_one_line_tt IF = { limit = { AST = { OR = { has_country_flag = AST_nauru_pact_leave_faction_flag #tt reasons is_in_faction_with = ROOT.OVERLORD } } } AST = { ROOT.OVERLORD = { set_autonomy = { target = AST autonomy_state = autonomy_free } remove_from_faction = AST } set_country_flag = AST_nauru_pact_leave_faction_flag } custom_effect_tooltip = generic_skip_one_line_tt } ELSE_IF = { limit = { AST = { OR = { has_country_flag = AST_nauru_pact_autonomy_free_flag #tt reasons is_subject = yes } } } AST = { ROOT.OVERLORD = { set_autonomy = { target = AST autonomy_state = autonomy_free } } set_country_flag = AST_nauru_pact_autonomy_free_flag } custom_effect_tooltip = generic_skip_one_line_tt } GER = { give_guarantee = AST } } } AST_broken_nauru_pact_effect = { IF = { limit = { ROOT = { has_idea = AST_the_promise_of_nauru } } custom_effect_tooltip = generic_skip_one_line_tt remove_ideas = { AST_the_promise_of_nauru } } 725 = { #Nauru add_claim_by = GER } 634 = { #Solomons add_claim_by = GER } } AST_hand_in_glove_effect = { IF = { limit = { BRM = { is_ai = yes is_subject_of = ENG } } BRM = { every_state = { limit = { OR = { is_owned_by = BRM has_state_flag = AST_hand_in_glove_transfer_to_ast } } set_state_flag = AST_hand_in_glove_transfer_to_ast #For tt reasons transfer_state_to = AST } } } BRM = { every_core_state = { limit = { OR = { is_owned_by = ENG has_state_flag = AST_hand_in_glove_transfer_to_ast } } set_state_flag = AST_hand_in_glove_transfer_to_ast #For tt reasons transfer_state_to = AST } } custom_effect_tooltip = generic_skip_one_line_tt IF = { limit = { MAL = { is_ai = yes is_subject_of = ENG } } MAL = { every_state = { limit = { OR = { is_owned_by = MAL has_state_flag = AST_hand_in_glove_transfer_to_ast } } set_state_flag = AST_hand_in_glove_transfer_to_ast #For tt reasons transfer_state_to = AST } } custom_effect_tooltip = generic_skip_one_line_tt } MAL = { every_core_state = { limit = { OR = { is_owned_by = ENG has_state_flag = AST_hand_in_glove_transfer_to_ast } } set_state_flag = AST_hand_in_glove_transfer_to_ast #For tt reasons transfer_state_to = AST } } } AST_hand_in_glove_deny_effect = { BRM = { every_core_state = { add_claim_by = AST } } custom_effect_tooltip = generic_skip_one_line_tt MAL = { every_core_state = { add_claim_by = AST } } } AST_the_pacific_garrison_effect = { IF = { #If not in faction limit = { AST = { NOT = { is_in_faction_with = ENG has_military_access_to = ENG } } } AST = { diplomatic_relation = { country = ENG relation = military_access active = yes } } custom_effect_tooltip = generic_skip_one_line_tt } ENG = { add_ideas = { AST_the_pacific_garrison_eng } } custom_effect_tooltip = generic_skip_one_line_tt effect_tooltip = { AST = { add_ideas = { AST_the_pacific_garrison_1 } } } } AST_vichy_out_of_africa_effect = { IF = { #If not in faction limit = { AST = { OR = { NOT = { is_in_faction_with = ENG has_military_access_to = ENG } has_country_flag = AST_military_access_eng } } } AST = { diplomatic_relation = { country = ENG relation = military_access active = yes } set_country_flag = AST_military_access_eng } custom_effect_tooltip = generic_skip_one_line_tt } AST = { unlock_decision_category_tooltip = AST_vichy_out_of_africa_cat set_country_flag = AST_vichy_pact_flag } } AST_bound_once_more_effect = { IF = { limit = { ENG = { is_in_faction = yes } } ENG = { add_to_faction = AST set_country_flag = AST_ast_to_eng_faction } } ELSE_IF = { limit = { AST = { is_in_faction = yes } } AST = { add_to_faction = ENG custom_effect_tooltip = generic_skip_one_line_tt set_country_flag = AST_eng_to_ast_faction } ENG = { set_faction_leader = yes custom_effect_tooltip = AST_faction_leader_tt } } ELSE = { ENG = { hidden_effect = { set_rule = { can_create_factions = yes } } create_faction_from_template = faction_template_AST_nations_of_the_empire add_to_faction = AST } } } ### National Spirit Checks ### AST_add_or_modify_war_is_coming_spirit = { IF = { limit = { NOT = { has_dynamic_modifier = { modifier = AST_war_is_coming_spirit } } } add_dynamic_modifier = { modifier = AST_war_is_coming_spirit } } ELSE = { custom_effect_tooltip = AST_war_is_coming_spirit_tt } } # Forging Australia's Future AST_add_or_modify_forging_australias_future = { IF = { limit = { NOT = { has_dynamic_modifier = { modifier = AST_forging_australias_future_spirit } } } add_dynamic_modifier = { modifier = AST_forging_australias_future_spirit } } ELSE = { custom_effect_tooltip = AST_forging_australias_future_spirit_tt } } AST_add_or_modify_AST_australian_military_forces_spirit = { IF = { limit = { NOT = { has_dynamic_modifier = { modifier = AST_australian_military_forces_spirit } } } add_dynamic_modifier = { modifier = AST_australian_military_forces_spirit } } ELSE = { custom_effect_tooltip = AST_australian_military_forces_spirit_tt } } add_or_modify_AST_british_war_cabinet_spirit = { IF = { limit = { NOT = { has_dynamic_modifier = { modifier = AST_british_war_cabinet_spirit } } } add_dynamic_modifier = { modifier = AST_british_war_cabinet_spirit } } ELSE = { custom_effect_tooltip = AST_british_war_cabinet_spirit_tt } } add_or_modify_AST_no_foreign_battlefields_spirit = { IF = { limit = { NOT = { has_dynamic_modifier = { modifier = AST_no_foreign_battlefields_spirit } } } add_dynamic_modifier = { modifier = AST_no_foreign_battlefields_spirit } } ELSE = { custom_effect_tooltip = AST_no_foreign_battlefields_spirit_tt } } add_or_modify_AST_imperial_pressure_spirit = { IF = { limit = { NOT = { has_dynamic_modifier = { modifier = AST_imperial_pressure_spirit } } } hidden_effect = { country_event = { id = AST_political_events.7 days = 1 } } } ELSE = { custom_effect_tooltip = AST_imperial_pressure_spirit_tt } } add_or_modify_AST_strength_in_numbers_spirit = { IF = { limit = { NOT = { has_dynamic_modifier = { modifier = AST_strength_in_numbers_spirit } } } add_dynamic_modifier = { modifier = AST_strength_in_numbers_spirit } } ELSE = { custom_effect_tooltip = AST_strength_in_numbers_spirit_tt } } add_or_modify_AST_pacific_fleet_hub_spirit = { IF = { limit = { NOT = { has_dynamic_modifier = { modifier = AST_pacific_fleet_hub_spirit } } } add_dynamic_modifier = { modifier = AST_pacific_fleet_hub_spirit } } ELSE = { custom_effect_tooltip = AST_pacific_fleet_hub_spirit_tt } } # Conscription laws AST_conscription_level_scripted_effect = { add_to_variable = { AST_conscription_level_allowed = 1 } } AST_instigate_civil_war_in_target = { start_civil_war = { ideology = communism size = civil_war_size_var set_country_flag = AST_instigated_communist_civil_war for_each_scope_loop = { array = PREV.owned_controlled_core_states_cw_start add_to_array = { array = PREV.owned_controlled_core_states_cw_start value = THIS } } save_event_target_as = AST_instigated_communist_civil_war_country set_variable = { var = AST_communist_civil_war_enemy_country value = PREV } PREV = { set_variable = { var = AST_communist_civil_war_enemy_country value = PREV } } ROOT = { add_to_array = { array = AST_union_control_target_array value = event_target:AST_instigated_communist_civil_war_country } } } } # Resolves a union-control civil war where the faction-protected loyalist capitulates but is never annexed. Runs on the loyalist. AST_resolve_stuck_union_control_civil_war = { save_event_target_as = AST_stuck_union_control_loyalist if = { limit = { any_country = { has_country_flag = AST_instigated_communist_civil_war check_variable = { AST_communist_civil_war_enemy_country = event_target:AST_stuck_union_control_loyalist } } } every_country = { limit = { has_country_flag = AST_instigated_communist_civil_war check_variable = { AST_communist_civil_war_enemy_country = event_target:AST_stuck_union_control_loyalist } } save_event_target_as = AST_stuck_union_control_rebel } event_target:AST_stuck_union_control_rebel = { annex_country = { target = PREV transfer_troops = yes } # Annexing the loyalist makes the rebel inherit its overlord; free it before AST can puppet it. if = { limit = { is_subject = yes } overlord = { end_puppet = PREV } } } AST = { puppet = { target = event_target:AST_stuck_union_control_rebel } } } }