# Pre-FTL Stances

resolution_pre_ftl_stances_repeal_1 = {
	icon = "GFX_resolution_repeal_red"

	resources = {
		category = resolutions
		cost = {
			influence = @resolution_cost_t1
		}
	}
	target = no
	fire_and_forget = yes

	effect = {
		custom_tooltip = resolution_pre_ftl_stances_repeal_1_effect_success
		hidden_effect = {
			cancel_resolution = "resolution_pre_ftl_stances_equal_standing"
			set_timed_country_flag = { flag = galactic_community_resolution_passed_pre_ftl_stances_repeal days = @resolution_flag_timer }
			add_modifier = {
				modifier = resolution_passed_diplomatic_weight
				days = 2200
			}
		}
	}

	fail_effects = {
		hidden_effect = {
			set_timed_country_flag = { flag = galactic_community_resolution_failed_pre_ftl_stances_repeal days = @resolution_flag_timer }
			add_modifier = {
				modifier = resolution_failed_diplomatic_weight
				days = 2200
			}
		}
	}

	potential = {
		has_first_contact_dlc = yes
		is_active_resolution = "resolution_pre_ftl_stances_equal_standing"
	}

	ai_weight = {
		base = @resolution_weight_unpopular

		modifier = {
			factor = 0
			is_egalitarian = yes
			desc = ethic_egalitarian
		}

		modifier = {
			factor = 1.5
			is_authoritarian = yes
			desc = ethic_authoritarian
		}

		modifier = {
			factor = 0.5
			OR = {
				has_valid_civic = civic_agrarian_idyll
				has_valid_civic = civic_free_haven
				has_valid_civic = civic_idealistic_foundation
				has_valid_civic = civic_inwards_perfection
				has_valid_civic = civic_machine_servitor
				has_valid_civic = civic_machine_exploration_protocol
			}
			desc = gal_com_opposing_civics
		}

		modifier = {
			factor = 2
			OR = {
				has_valid_civic = civic_slaver_guilds
				has_valid_civic = civic_indentured_assets
				is_slaver = yes
			}
			desc = gal_com_slaver_empire
		}
	}
}

resolution_pre_ftl_stances_repeal_2 = {
	icon = "GFX_resolution_repeal_red"

	resources = {
		category = resolutions
		cost = {
			influence = @resolution_cost_t1
		}
	}
	target = no
	fire_and_forget = yes

	effect = {
		custom_tooltip = resolution_pre_ftl_stances_repeal_2_effect_success
		hidden_effect = {
			cancel_resolution = "resolution_pre_ftl_stances_non_interference"
			set_timed_country_flag = { flag = galactic_community_resolution_passed_pre_ftl_stances_repeal days = @resolution_flag_timer }
			add_modifier = {
				modifier = resolution_passed_diplomatic_weight
				days = 2200
			}
		}
	}

	fail_effects = {
		hidden_effect = {
			set_timed_country_flag = { flag = galactic_community_resolution_failed_pre_ftl_stances_repeal days = @resolution_flag_timer }
			add_modifier = {
				modifier = resolution_failed_diplomatic_weight
				days = 2200
			}
		}
	}

	potential = {
		has_first_contact_dlc = yes
		is_active_resolution = "resolution_pre_ftl_stances_non_interference"
	}

	ai_weight = {
		base = @resolution_weight_unpopular

		modifier = {
			factor = 0.8
			is_pacifist = yes
			desc = ethic_pacifist
		}

		modifier = {
			factor = 1.2
			is_militarist = yes
			desc = ethic_militarist
		}

		modifier = {
			factor = 0.8
			OR = {
				has_valid_civic = civic_environmentalist
				has_valid_civic = civic_agrarian_idyll
				has_valid_civic = civic_hive_empath
			}
			desc = gal_com_opposing_civics
		}

		modifier = {
			factor = 1.2
			OR = {
				has_valid_civic = civic_pompous_purists
				has_valid_civic = civic_franchising
			}
			desc = gal_com_supporting_civics
		}

		modifier = {
			factor = 1.8
			OR = {
				has_valid_civic = civic_slaver_guilds
				has_valid_civic = civic_indentured_assets
				is_slaver = yes
			}
			desc = gal_com_slaver_empire
		}

		modifier = {
			factor = 0
			has_valid_civic = civic_machine_exploration_protocol
			desc = civic_machine_exploration_protocol
		}

		modifier = {
			factor = 0
			has_valid_civic = civic_inwards_perfection
			desc = civic_inwards_perfection
		}

		modifier = {
			factor = 2
			has_valid_civic = civic_machine_servitor
			desc = civic_machine_servitor
		}
	}
}

resolution_pre_ftl_stances_repeal_3 = {
	icon = "GFX_resolution_repeal_red"

	resources = {
		category = resolutions
		cost = {
			influence = @resolution_cost_t1
		}
	}
	target = no
	fire_and_forget = yes

	effect = {
		custom_tooltip = resolution_pre_ftl_stances_repeal_3_effect_success
		hidden_effect = {
			cancel_resolution = "resolution_pre_ftl_stances_exploitation"
			set_timed_country_flag = { flag = galactic_community_resolution_passed_pre_ftl_stances_repeal days = @resolution_flag_timer }
			add_modifier = {
				modifier = resolution_passed_diplomatic_weight
				days = 2200
			}
		}
	}

	fail_effects = {
		hidden_effect = {
			set_timed_country_flag = { flag = galactic_community_resolution_failed_pre_ftl_stances_repeal days = @resolution_flag_timer }
			add_modifier = {
				modifier = resolution_failed_diplomatic_weight
				days = 2200
			}
		}
	}

	potential = {
		has_first_contact_dlc = yes
		is_active_resolution = "resolution_pre_ftl_stances_exploitation"
	}

	ai_weight = {
		base = @resolution_weight_unpopular

		modifier = {
			factor = 1.5
			is_egalitarian = yes
			desc = ethic_egalitarian
		}

		modifier = {
			factor = 0
			is_authoritarian = yes
			desc = ethic_authoritarian
		}

		modifier = {
			factor = 0.5
			is_materialist = yes
			desc = ethic_materialist
		}

		modifier = {
			factor = 1.2
			OR = {
				has_valid_civic = civic_machine_servitor
				has_valid_civic = civic_agrarian_idyll
				has_valid_civic = civic_free_haven
				has_valid_civic = civic_idealistic_foundation
				has_valid_civic = civic_inwards_perfection
			}
			desc = gal_com_supporting_civics
		}

		modifier = {
			factor = 2
			has_valid_civic = civic_shared_burden
			desc = civic_shared_burden
		}

		modifier = {
			factor = 2
			is_worker_coop_empire = yes
			desc = civic_worker_coop
		}

		modifier = {
			factor = 2
			has_valid_civic = civic_machine_exploration_protocol
			desc = civic_machine_exploration_protocol
		}

		modifier = {
			factor = 0.5
			OR = {
				has_valid_civic = civic_aristocratic_elite
				has_valid_civic = civic_police_state
			}
			desc = gal_com_opposing_civics
		}

		modifier = {
			factor = 0.5
			is_gestalt = yes
			desc = ethic_gestalt_consciousness
		}

		modifier = {
			factor = 0.5
			OR = {
				has_valid_civic = civic_slaver_guilds
				has_valid_civic = civic_indentured_assets
				is_slaver = yes
			}
			desc = gal_com_slaver_empire
		}
	}
}

resolution_pre_ftl_stances_equal_standing = {
	icon = "GFX_resolution_pre_ftl_stances"

	resources = {
		category = resolutions
		cost = {
			influence = @resolution_cost_t1
		}
	}
	target = no

	modifier = {
		op_cat_infiltration_difficulty_add = 2
	}

	effect = {
		custom_tooltip = resolution_pre_ftl_stances_equal_standing_tooltip
		hidden_effect = {
			every_playable_country = {
				limit = {
					is_galactic_community_member = yes
					has_met_primitives = yes
					OR = {
						has_policy_flag = interference_not_allowed
						has_policy_flag = interference_aggressive
					}
					can_set_policy = {
						policy = interference
						option = interference_active
					}
				}
				country_event = { id = preftl.10000 }
			}
			set_global_flag = resolution_with_breach_effect_passed
			set_global_flag = galactic_community_resolution_passed
			set_timed_country_flag = { flag = galactic_community_resolution_passed_pre_ftl_stances days = @resolution_flag_timer }
			add_modifier = {
				modifier = resolution_passed_diplomatic_weight
				days = 2200
			}
		}
	}

	fail_effects = {
		hidden_effect = {
			set_timed_country_flag = { flag = galactic_community_resolution_failed_pre_ftl_stances days = @resolution_flag_timer }
			add_modifier = {
				modifier = resolution_failed_diplomatic_weight
				days = 2200
			}
		}
	}

	potential = {
		has_first_contact_dlc = yes
	}

	allow = {
		custom_tooltip = {
			fail_text = "resolution_already_active"
			NOT = {
				is_active_resolution = "resolution_pre_ftl_stances_equal_standing"
			}
		}
		custom_tooltip = {
			fail_text = "exclusive_resolution_already_active"
			NOR = {
				is_active_resolution = "resolution_pre_ftl_stances_non_interference"
				is_active_resolution = "resolution_pre_ftl_stances_exploitation"
			}
		}
	}

	breach = {
		NOT = { has_country_flag = constitutional_immunity }
		has_met_primitives = yes
		OR = {
			has_policy_flag = interference_not_allowed
			has_policy_flag = interference_aggressive
			has_country_flag = resolution_breached_pre_ftl_stances_equal_standing
		}
	}

	ai_weight = {
		base = @resolution_weight_normal

		modifier = {
			factor = 1.2
			has_ethic = ethic_egalitarian
			desc = ethic_egalitarian
		}

		modifier = {
			factor = 0.8
			is_authoritarian = yes
			desc = ethic_authoritarian
		}

		modifier = {
			factor = 0.5
			is_megacorp = yes
			is_worker_coop_empire = no
			desc = gov_megacorporation
		}

		modifier = {
			factor = 1.4
			is_fanatic_egalitarian = yes
			desc = ethic_fanatic_egalitarian
		}

		modifier = {
			factor = 2
			OR = {
				has_valid_civic = civic_shared_burden
				has_valid_civic = civic_machine_servitor
				has_valid_civic = civic_machine_exploration_protocol
				is_worker_coop_empire = yes
			}
			desc = gal_com_supporting_civics
		}

		modifier = {
			factor = 1.2
			OR = {
				has_valid_civic = civic_agrarian_idyll
				has_valid_civic = civic_free_haven
				has_valid_civic = civic_idealistic_foundation
				has_valid_civic = civic_inwards_perfection
			}
			desc = gal_com_supporting_civics
		}

		modifier = {
			factor = 0.8
			OR = {
				has_valid_civic = civic_aristocratic_elite
				has_valid_civic = civic_police_state
			}
			desc = gal_com_opposing_civics
		}

		modifier = {
			factor = 0.8
			is_gestalt = yes
			desc = ethic_gestalt_consciousness
		}

		modifier = {
			factor = 0
			OR = {
				has_valid_civic = civic_slaver_guilds
				has_valid_civic = civic_indentured_assets
				is_slaver = yes
			}
			desc = gal_com_slaver_empire
		}
	}
}

resolution_pre_ftl_stances_non_interference = {
	icon = "GFX_resolution_pre_ftl_stances"

	resources = {
		category = resolutions
		cost = {
			influence = @resolution_cost_t1
		}
	}
	target = no

	modifier = {
		op_cat_infiltration_difficulty_add = 3
	}

	effect = {
		custom_tooltip = resolution_pre_ftl_stances_non_interference_tooltip
		hidden_effect = {
			every_playable_country = {
				limit = {
					is_galactic_community_member = yes
					has_met_primitives = yes
					OR = {
						has_policy_flag = interference_active
						has_policy_flag = interference_aggressive
					}
				}
				country_event = { id = preftl.10100 }
			}
			set_global_flag = resolution_with_breach_effect_passed
			set_global_flag = galactic_community_resolution_passed
			set_timed_country_flag = { flag = galactic_community_resolution_passed_pre_ftl_stances days = @resolution_flag_timer }
			add_modifier = {
				modifier = resolution_passed_diplomatic_weight
				days = 2200
			}
		}
	}

	fail_effects = {
		hidden_effect = {
			set_timed_country_flag = { flag = galactic_community_resolution_failed_pre_ftl_stances days = @resolution_flag_timer }
			add_modifier = {
				modifier = resolution_failed_diplomatic_weight
				days = 2200
			}
		}
	}

	potential = {
		has_first_contact_dlc = yes
	}

	allow = {
		custom_tooltip = {
			fail_text = "resolution_already_active"
			NOT = {
				is_active_resolution = "resolution_pre_ftl_stances_non_interference"
			}
		}
		custom_tooltip = {
			fail_text = "exclusive_resolution_already_active"
			NOR = {
				is_active_resolution = "resolution_pre_ftl_stances_equal_standing"
				is_active_resolution = "resolution_pre_ftl_stances_exploitation"
			}
		}
	}

	modifier = {
		custom_tooltip = "resolution_pre_ftl_stances_non_interference_modifier"
	}

	breach = {
		NOT = { has_country_flag = constitutional_immunity }
		has_met_primitives = yes
		OR = {
			has_policy_flag = interference_active
			has_policy_flag = interference_aggressive
			has_country_flag = resolution_breached_pre_ftl_stances_non_interference
		}
	}

	ai_weight = {
		base = @resolution_weight_normal

		modifier = {
			factor = 1.2
			is_pacifist = yes
			desc = ethic_pacifist
		}

		modifier = {
			factor = 0.8
			is_militarist = yes
			desc = ethic_militarist
		}

		modifier = {
			factor = 1.2
			OR = {
				has_valid_civic = civic_environmentalist
				has_valid_civic = civic_agrarian_idyll
				has_valid_civic = civic_hive_empath
			}
			desc = gal_com_supporting_civics
		}

		modifier = {
			factor = 0.8
			OR = {
				has_valid_civic = civic_pompous_purists
				has_valid_civic = civic_franchising
			}
			desc = gal_com_opposing_civics
		}

		modifier = {
			factor = 0.6
			OR = {
				has_valid_civic = civic_slaver_guilds
				has_valid_civic = civic_indentured_assets
				is_slaver = yes
			}
			desc = gal_com_slaver_empire
		}

		modifier = {
			factor = 2
			has_valid_civic = civic_machine_exploration_protocol
			desc = civic_machine_exploration_protocol
		}

		modifier = {
			factor = 2
			has_valid_civic = civic_inwards_perfection
			desc = civic_inwards_perfection
		}

		modifier = {
			factor = 0
			has_valid_civic = civic_machine_servitor
			desc = civic_machine_servitor
		}
	}
}

resolution_pre_ftl_stances_exploitation = {
	icon = "GFX_resolution_pre_ftl_stances"

	resources = {
		category = resolutions
		cost = {
			influence = @resolution_cost_t1
		}
	}
	target = no

	modifier = {
		op_cat_infiltration_skill_add = 2
	}

	effect = {
		custom_tooltip = resolution_pre_ftl_stances_exploitation_tooltip

		hidden_effect = {
			every_playable_country = {
				limit = {
					is_galactic_community_member = yes
					has_met_primitives = yes
					has_policy_flag = interference_not_allowed
				}
				country_event = { id = preftl.10200 }
			}
			set_global_flag = resolution_with_breach_effect_passed
			set_global_flag = galactic_community_resolution_passed
			set_timed_country_flag = { flag = galactic_community_resolution_passed_pre_ftl_stances days = @resolution_flag_timer }
			add_modifier = {
				modifier = resolution_passed_diplomatic_weight
				days = 2200
			}
		}
	}

	fail_effects = {
		hidden_effect = {
			set_timed_country_flag = { flag = galactic_community_resolution_failed_pre_ftl_stances days = @resolution_flag_timer }
			add_modifier = {
				modifier = resolution_failed_diplomatic_weight
				days = 2200
			}
		}
	}

	potential = {
		has_first_contact_dlc = yes
	}

	allow = {
		custom_tooltip = {
			fail_text = "resolution_already_active"
			NOT = {
				is_active_resolution = "resolution_pre_ftl_stances_exploitation"
			}
		}
		custom_tooltip = {
			fail_text = "exclusive_resolution_already_active"
			NOR = {
				is_active_resolution = "resolution_pre_ftl_stances_non_interference"
				is_active_resolution = "resolution_pre_ftl_stances_equal_standing"
			}
		}
	}

	breach = {
		NOT = { has_country_flag = constitutional_immunity }
		has_met_primitives = yes
		OR = {
			has_policy_flag = interference_not_allowed
			has_country_flag = resolution_breached_pre_ftl_stances_exploitation
		}
	}

	ai_weight = {
		base = @resolution_weight_disliked

		modifier = {
			factor = 0.8
			is_egalitarian = yes
			desc = ethic_egalitarian
		}

		modifier = {
			factor = 1.2
			has_ethic = ethic_authoritarian
			desc = ethic_authoritarian
		}

		modifier = {
			factor = 1.2
			is_materialist = yes
			desc = ethic_materialist
		}

		modifier = {
			factor = 2
			is_megacorp = yes
			desc = gov_megacorporation
		}

		modifier = {
			factor = 1.4
			is_fanatic_authoritarian = yes
			desc = ethic_fanatic_authoritarian
		}

		modifier = {
			factor = 0.8
			OR = {
				has_valid_civic = civic_machine_servitor
				has_valid_civic = civic_agrarian_idyll
				has_valid_civic = civic_free_haven
				has_valid_civic = civic_idealistic_foundation
				has_valid_civic = civic_inwards_perfection
			}
			desc = gal_com_opposing_civics
		}

		modifier = {
			factor = 0
			has_valid_civic = civic_shared_burden
			desc = civic_shared_burden
		}

		modifier = {
			factor = 0
			is_worker_coop_empire = yes
			desc = civic_worker_coop
		}

		modifier = {
			factor = 0
			has_valid_civic = civic_machine_exploration_protocol
			desc = civic_machine_exploration_protocol
		}

		modifier = {
			factor = 1.2
			OR = {
				has_valid_civic = civic_aristocratic_elite
				has_valid_civic = civic_police_state
			}
			desc = gal_com_supporting_civics
		}

		modifier = {
			factor = 1.2
			is_gestalt = yes
			desc = ethic_gestalt_consciousness
		}

		modifier = {
			factor = 2
			OR = {
				has_valid_civic = civic_slaver_guilds
				has_valid_civic = civic_indentured_assets
				is_slaver = yes
			}
			desc = gal_com_slaver_empire
		}
	}
}
