IRE_IEAA_decisions = {
	IEAA_generic_investment = {
		allowed = {
			tag = IRE
		}
		
		visible = {
			has_completed_focus = IRE_IEAA
		}

		cost = 70
		
		ai_will_do = { # just do something more interesting
			factor = 0
		}	
		
		days_remove = 70
		
		remove_effect = {
			random_owned_state = {
				limit = {
					is_owned_by = ROOT
					is_controlled_by = ROOT
					is_core_of = ROOT
				}
				add_extra_state_shared_building_slots = 1
				random_list = {
					20 = {
						add_building_construction = {
							type = industrial_complex
							level = 1
							instant_build = yes
						}	
					}	
					20 = {
						add_building_construction = {
							type = arms_factory
							level = 1
							instant_build = yes
						}	
					}	
					20 = {
						add_building_construction = {
							type = dockyard
							level = 1
							instant_build = yes
						}
						modifier = {
							factor = 0
							is_coastal = no
						}
					}
					20 = {
						add_building_construction = {
							type = synthetic_refinery
							level = 1
							instant_build = yes
						}	
					}
					20 = {
						add_building_construction = {
							type = infrastructure
							level = 1
							instant_build = yes
						}	
						modifier = {
							factor = 0
							free_building_slots = {
								building = infrastructure
								size < 1
							}		
						}
					}
				}
			}
		}
	}
	
	IEAA_swap_to_industrial = {
		allowed = {
			tag = IRE
		}
		
		available = {
			has_completed_focus = IRE_IEAA
			NOT = { has_idea = IRE_IEAA_INDUSTRY }
		}

		cost = 50
		
		ai_will_do = {
			factor = 5
			modifier = {
				factor = 0
				all_owned_state = {
					free_building_slots = {
					building = arms_factory
					size < 1
					include_locked = no
					}	
				}
			}
		}
		
		days_remove = 365
		
		complete_effect = {
			set_country_flag = IRE_IEAA_focus_set
			if = {
				limit = {
					has_idea = IRE_IEAA_RND
				}
				swap_ideas = {
					remove_idea = IRE_IEAA_RND
					add_idea = IRE_IEAA_INDUSTRY
				}
			}
			if = {
				limit = {
					has_idea = IRE_IEAA_WR
				}
				swap_ideas = {
					remove_idea = IRE_IEAA_WR
					add_idea = IRE_IEAA_INDUSTRY
				}
			}
			if = {
				limit = {
					has_idea = IRE_IEAA_ELEC
				}
				swap_ideas = {
					remove_idea = IRE_IEAA_ELEC
					add_idea = IRE_IEAA_INDUSTRY
				}
			}
		}

		remove_effect = {
			clr_country_flag = IRE_IEAA_focus_set
		}
	}
	IEAA_swap_to_rnd = {
		allowed = {
			tag = IRE
		}
		
		available = {
			has_completed_focus = IRE_IEAA
			NOT = { has_idea = IRE_IEAA_RND }
		}

		cost = 50
		
		ai_will_do = { 
			factor = 5
			modifier = {
				factor = 0
				OR = {
					has_tech = flexible_line 
					has_tech = streamlined_line 
				}
				OR = {
					has_tech = concentrated_industry5 
					has_tech = dispersed_industry5 
				}	
				has_tech = construction5 
				has_tech = excavation5 
			}
			modifier = {
				factor = 0.5
				OR = {
					has_tech = concentrated_industry5 
					has_tech = dispersed_industry5 
				}	
				has_tech = construction5 
				has_tech = excavation5 
			}	
		}
		
		days_remove = 365
		
		complete_effect = {
			set_country_flag = IRE_IEAA_focus_set
			if = {
				limit = {
					has_idea = IRE_IEAA_INDUSTRY
				}
				swap_ideas = {
					remove_idea = IRE_IEAA_INDUSTRY
					add_idea = IRE_IEAA_RND
				}
			}
			if = {
				limit = {
					has_idea = IRE_IEAA_WR
				}
				swap_ideas = {
					remove_idea = IRE_IEAA_WR
					add_idea = IRE_IEAA_RND
				}
			}
			if = {
				limit = {
					has_idea = IRE_IEAA_ELEC
				}
				swap_ideas = {
					remove_idea = IRE_IEAA_ELEC
					add_idea = IRE_IEAA_RND
				}
			}
		}

		remove_effect = {
			clr_country_flag = IRE_IEAA_focus_set
		}
	}
	IEAA_swap_to_wr = {
		allowed = {
			tag = IRE
		}
		
		available = {
			has_completed_focus = IRE_IEAA
			NOT = { has_idea = IRE_IEAA_WR }
		}

		cost = 50
		
		ai_will_do = { # always good
			factor = 5
		}
		
		days_remove = 365
		
		complete_effect = {
			set_country_flag = IRE_IEAA_focus_set
			if = {
				limit = {
					has_idea = IRE_IEAA_INDUSTRY
				}
				swap_ideas = {
					remove_idea = IRE_IEAA_INDUSTRY
					add_idea = IRE_IEAA_WR
				}
			}
			if = {
				limit = {
					has_idea = IRE_IEAA_RND
				}
				swap_ideas = {
					remove_idea = IRE_IEAA_RND
					add_idea = IRE_IEAA_WR
				}
			}
			if = {
				limit = {
					has_idea = IRE_IEAA_ELEC
				}
				swap_ideas = {
					remove_idea = IRE_IEAA_ELEC
					add_idea = IRE_IEAA_WR
				}
			}
		}

		remove_effect = {
			clr_country_flag = IRE_IEAA_focus_set
		}
	}	
	IEAA_swap_to_elec = {
		allowed = {
			tag = IRE
		}
		
		available = {
			has_completed_focus = IRE_IEAA
			NOT = { has_idea = IRE_IEAA_ELEC }
		}

		cost = 50
		
		ai_will_do = { # always good
			factor = 5
			modifier = {	
				factor = 0
				has_tech = advanced_computing_machine 
				has_tech = advanced_centimetric_radar 
			}
			modifier = {	
				factor = 0.5
				has_tech = advanced_computing_machine 
			}
		}
		
		days_remove = 365
		
		complete_effect = {
			set_country_flag = IRE_IEAA_focus_set
			if = {
				limit = {
					has_idea = IRE_IEAA_INDUSTRY
				}
				swap_ideas = {
					remove_idea = IRE_IEAA_INDUSTRY
					add_idea = IRE_IEAA_ELEC
				}
			}
			if = {
				limit = {
					has_idea = IRE_IEAA_RND
				}
				swap_ideas = {
					remove_idea = IRE_IEAA_RND
					add_idea = IRE_IEAA_ELEC
				}
			}
			if = {
				limit = {
					has_idea = IRE_IEAA_WR
				}
				swap_ideas = {
					remove_idea = IRE_IEAA_WR
					add_idea = IRE_IEAA_ELEC
				}
			}
		}

		remove_effect = {
			clr_country_flag = IRE_IEAA_focus_set
		}
	}
	IRE_MFR_investment = {
		allowed = {
			tag = IRE
		}
		
		visible = {
			NOT = {
				has_idea = IRE_MFR3
			}
			has_completed_focus = IRE_MFR
		}
		
		cost = 100
		
		modifier = {
			political_power_gain = -0.25
		}
		
		days_remove = 70
		
		remove_effect = {
			if = {
				limit = {
					has_idea = IRE_MFR2
				}
				swap_ideas = {
					remove_idea = IRE_MFR2
					add_idea = IRE_MFR3
				}
			}
			if = {
				limit = {
					has_idea = IRE_MFR1
				}
				swap_ideas = {
					remove_idea = IRE_MFR1
					add_idea = IRE_MFR2
				}
			}
		}
	}
	IRE_RRMB_investment = {
		allowed = {
			tag = IRE
		}
		
		visible = {
			NOT = {
				has_idea = IRE_RRMB3
			}
			has_completed_focus = IRE_RRMB
		}
		
		cost = 100
		
		modifier = {
			political_power_gain = -0.25
		}
		
		days_remove = 70
		
		remove_effect = {
			if = {
				limit = {
					has_idea = IRE_RRMB2
				}
				swap_ideas = {
					remove_idea = IRE_RRMB2
					add_idea = IRE_RRMB3
				}
			}
			if = {
				limit = {
					has_idea = IRE_RRMB1
				}
				swap_ideas = {
					remove_idea = IRE_RRMB1
					add_idea = IRE_RRMB2
				}
			}
		}
	}	
	IRE_TNTN_investment = {
		allowed = {
			tag = IRE
		}
		
		visible = {
			NOT = {
				has_idea = IRE_TNTN3
			}
			has_completed_focus = IRE_TNTN
		}
		
		cost = 100
		
		modifier = {
			political_power_gain = -0.25
		}
		
		days_remove = 70
		
		remove_effect = {
			if = {
				limit = {
					has_idea = IRE_TNTN2
				}
				swap_ideas = {
					remove_idea = IRE_TNTN2
					add_idea = IRE_TNTN3
				}
				134 = {
					add_extra_state_shared_building_slots = 1
						add_building_construction = {
							type = infrastructure
							level = 1
							instant_build = yes
						}
				}
			}
			if = {
				limit = {
					has_idea = IRE_TNTN1
				}
				swap_ideas = {
					remove_idea = IRE_TNTN1
					add_idea = IRE_TNTN2
				}
				135 = {
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}	
	IRE_NIIF_investment = {
		allowed = {
			tag = IRE
		}
		
		visible = {
			NOT = {
				has_idea = IRE_NIIF3
			}
			has_completed_focus = IRE_NIIF
		}
		
		cost = 100
		
		modifier = {
			political_power_gain = -0.25
		}
		
		days_remove = 70
		
		remove_effect = {
			if = {
				limit = {
					has_idea = IRE_NIIF2
				}
				swap_ideas = {
					remove_idea = IRE_NIIF2
					add_idea = IRE_NIIF3
				}
			}
			if = {
				limit = {
					has_idea = IRE_NIIF1
				}
				swap_ideas = {
					remove_idea = IRE_NIIF1
					add_idea = IRE_NIIF2
				}
			}
		}
	}		
	IRE_ESIC_investment = {
		allowed = {
			tag = IRE
		}
		
		visible = {
			NOT = {
				has_idea = IRE_ESIC3
			}
			has_completed_focus = IRE_ESIC
		}
		
		available = {
			industrial_complex > 3
		}	
		
		cost = 100
		
		modifier = {
			civilian_factory_use = 3
			political_power_gain = -0.25
		}
		
		days_remove = 70
		
		remove_effect = {
			if = {
				limit = {
					has_idea = IRE_ESIC2
				}
				swap_ideas = {
					remove_idea = IRE_ESIC2
					add_idea = IRE_ESIC3
				}
			}
			if = {
				limit = {
					has_idea = IRE_ESIC1
				}
				swap_ideas = {
					remove_idea = IRE_ESIC1
					add_idea = IRE_ESIC2
				}
			}
		}
	}
}
			
IRE_end_the_trade_war_decisions = {
	pay_assises_in_full = { # i.e. cave to Britain - the IRA won't like this
	
		allowed = {
			tag = IRE
		}
		
		available = {
			industrial_complex > 14
		}
		
		visible = {
			has_idea = IRE_trade_war
		}
		
		cost = 0
		
		ai_will_do = { # it should be a bad deal in general - only do if Britain has refused to co-operate
			factor = 10
			modifier = {
				factor = 0
				OR = {	
					NOT = { has_global_flag = ENG_refused_cattle_coal_pact }
					NOT = { has_global_flag = ENG_refused_confirmation_of_agreements }
				}	
			}
		}	
		
		modifier = {
			civilian_factory_use = 15
			political_power_gain  = -0.5
		}

		days_remove = 70
		
		complete_effect = {
			remove_ideas = IRE_trade_war
			custom_effect_tooltip = IRA_loyalty_down.tt
			hidden_effect = {
				add_to_variable = {
					var = IRA_loyalty
					value = -4
				}
			}
		}
	}

	grant_industrial_subsidies = { # temp boost to industry
		
		allowed = {
			tag = IRE
		}
		
		visible = {
			OR = {
				has_idea = IRE_trade_war
				has_idea = IRE_trade_war2
			}	
		}
		
		cost = 50
		
		ai_will_do = { # to save the ai from itself
			factor = 0
		}
		
		modifier = {
			political_power_gain = -0.25
			industrial_capacity_factory = 0.15
			production_factory_efficiency_gain_factor = 0.1
		}

		days_remove = 180
		
	}
	
	encourage_increased_tillage = { # temp boost to industry
		
		allowed = {
			tag = IRE
		}
		
		visible = {
			OR = {
				has_idea = IRE_trade_war
				has_idea = IRE_trade_war2
			}	
		}
		
		cost = 50
		
		ai_will_do = { # to save the ai from itself
			factor = 0
		}
		
		modifier = {
			political_power_gain = -0.25
			consumer_goods_factor = -0.1
			production_factory_efficiency_gain_factor = 0.1
		}

		days_remove = 180
		
	}
	
	buy_irish_campaign = { # temp boost to industry - slightly stronger, but costs more
		
		allowed = {
			tag = IRE
		}
		
		visible = {
			OR = {
				has_idea = IRE_trade_war
				has_idea = IRE_trade_war2
			}	
		}
		cost = 70
		
		ai_will_do = { # to save the ai from itself
			factor = 0
		}
		
		modifier = {
			political_power_gain = -0.35
			consumer_goods_factor = -0.15
			production_factory_efficiency_gain_factor = 0.15
		}

		days_remove = 180
		
	}
	
	attract_foreign_capital = { # temp boost to industry - slightly stronger, but costs more
		
		allowed = {
			tag = IRE
		}
		
		visible = {
			OR = {
				has_idea = IRE_trade_war
				has_idea = IRE_trade_war2
			}	
		}
		cost = 70
		
		ai_will_do = { # to save the ai from itself
			factor = 0
		}
		
		modifier = {
			political_power_gain = -0.35
			industrial_capacity_factory = 0.35
			production_factory_efficiency_gain_factor = 0.15
		}

		days_remove = 180
		
	}
	
	construction_subsidies = { # temp boost to consturction speed
		
		allowed = {
			tag = IRE
		}
		
		visible = {
			OR = {
				has_idea = IRE_trade_war
				has_idea = IRE_trade_war2
			}	
		}
		cost = 30
		
		ai_will_do = { # to save the ai from itself
			factor = 0
		}
		
		modifier = {
			production_speed_buildings_factor = 0.15
		}

		days_remove = 180
		
	}
	
	coal_cattle_pact = { # stage 1 of the solution
		
		allowed = {
			tag = IRE
		}
		
		visible = {
			has_idea = IRE_trade_war
		}
		
		fire_only_once = yes
		
		cost = 100
		
		ai_will_do = { # this is the one to do - SO DO IT
			factor = 100
		}
		
		days_remove = 70
		
		complete_effect = {
			hidden_effect = {
				set_country_flag = IRE_negotiating_with_ENG
			}
		}
		
		remove_effect = {
			ENG = {
				country_event = {
					id = ireland.11
				}
			}
			clr_country_flag = IRE_negotiating_with_ENG
		}
	}
	
	
	confirmation_of_agreements_act = { # stage 2 of the solution
		
		allowed = {
			tag = IRE
		}
		
		fire_only_once = yes
		
		visible = {
			has_idea = IRE_trade_war2	
		}
		available = {
			NOT = { has_country_flag = IRE_negotiating_with_ENG }
		}	
		
		cost = 130
		
		ai_will_do = { # this is the one to do - SO DO IT
			factor = 100
		}
		
		days_remove = 70
		
		complete_effect = {
			hidden_effect = {
				set_country_flag = IRE_negotiating_with_ENG
			}
		}
		
		remove_effect = {
			ENG = {
				country_event = {
					id = ireland.12
				}
			}
			clr_country_flag = IRE_negotiating_with_ENG
		}
	}	
}
IRE_HEAVYPRIORITIES_DECS = {
	switch_to_tanks = {
		
		available = {
			NOT = { has_country_flag = IRE_priority_recently_set }
			NOT = { has_idea = ire_armor_prio }
		}
		
		cost = 50
		
		days_remove = 180
		
		complete_effect = {
			if = {
				limit = {
					has_idea = ire_infantry_prio
				}
				remove_ideas = ire_infantry_prio
				add_ideas = ire_armor_prio
			}	
			if = {
				limit = {
					has_idea = ire_airforce_prio
				}
				remove_ideas = ire_airforce_prio
				add_ideas = ire_armor_prio
			}
			set_country_flag = IRE_priority_recently_set
		}
		
		remove_effect = {
			clr_country_flag = IRE_priority_recently_set
		}
	}
	switch_to_infantry_eq = {
		
		available = {
			NOT = { has_country_flag = IRE_priority_recently_set }
			NOT = { has_idea = ire_infantry_prio }
		}
		
		cost = 50
		
		days_remove = 180
		
		complete_effect = {
			if = {
				limit = {
					has_idea = ire_armor_prio
				}
				remove_ideas = ire_armor_prio
				add_ideas = ire_infantry_prio
			}	
			if = {
				limit = {
					has_idea = ire_airforce_prio
				}
				remove_ideas = ire_airforce_prio
				add_ideas = ire_infantry_prio
			}
			set_country_flag = IRE_priority_recently_set
		}
		
		remove_effect = {
			clr_country_flag = IRE_priority_recently_set
		}
	}
	switch_to_air = {
		
		available = {
			NOT = { has_country_flag = IRE_priority_recently_set }
			NOT = { has_idea = ire_airforce_prio }
		}
		
		cost = 50
		
		days_remove = 180
		
		complete_effect = {
			if = {
				limit = {
					has_idea = ire_armor_prio
				}
				remove_ideas = ire_armor_prio
				add_ideas = ire_airforce_prio
			}	
			if = {
				limit = {
					has_idea = ire_infantry_prio
				}
				remove_ideas = ire_infantry_prio
				add_ideas = ire_airforce_prio
			}
			set_country_flag = IRE_priority_recently_set
		}
		
		remove_effect = {
			clr_country_flag = IRE_priority_recently_set
		}
	}
}	
IRE_s_plan_decision_cat = {
	sabotage_infrastructure = {
		
		available = {
			has_equipment = { infantry_equipment > 49 }
			has_equipment = { support_equipment > 29 }
			NOT = { has_country_flag = IRE_sabotage_in_progress }
		}

		visible = {
			NOT = {
				is_in_faction_with = ENG
			}
		}
		
		cost = 50
		
		days_remove = 30
		
		complete_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment 
				amount = -50
			}
			add_equipment_to_stockpile = {	
				type= support_equipment 
				amount = -30
			}
			set_country_flag = IRE_sabotage_in_progress
		}
		
		remove_effect = {
			random_state = {
				limit = {
					is_controlled_by = ENG
					OR = {
						region = 3
						region = 2
						region = 1
					}
				}
				damage_building = {
					type = infrastructure
					damage = 2
				}
			}	
			clr_country_flag = IRE_sabotage_in_progress
		}
	}
	sabotage_industry = {
		
		available = {
			has_equipment = { infantry_equipment > 49 }
			has_equipment = { support_equipment > 29 }
			NOT = { has_country_flag = IRE_sabotage_in_progress }
		}

		visible = {
			NOT = {
				is_in_faction_with = ENG
			}
		}
		
		cost = 50
		
		days_remove = 30
		
		complete_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment 
				amount = -50
			}
			add_equipment_to_stockpile = {	
				type= support_equipment 
				amount = -30
			}
			set_country_flag = IRE_sabotage_in_progress
		}
		
		remove_effect = {
			random_state = {
				limit = {
					is_controlled_by = ENG
					OR = {
						region = 3
						region = 2
						region = 1
					}
				}
				damage_building = {
					type = industrial_complex
					damage = 2
				}
			}	
			clr_country_flag = IRE_sabotage_in_progress
		}
	}
	sabotage_arms_factories = {
		
		available = {
			has_equipment = { infantry_equipment > 49 }
			has_equipment = { support_equipment > 29 }
			NOT = { has_country_flag = IRE_sabotage_in_progress }
		}

		visible = {
			NOT = {
				is_in_faction_with = ENG
			}
		}
		
		cost = 50
		
		days_remove = 30
		
		complete_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment 
				amount = -50
			}
			add_equipment_to_stockpile = {	
				type= support_equipment 
				amount = -30
			}
			set_country_flag = IRE_sabotage_in_progress
		}
		
		remove_effect = {
			random_state = {
				limit = {
					is_controlled_by = ENG
					OR = {
						region = 3
						region = 2
						region = 1
					}
				}
				damage_building = {
					type = arms_factory
					damage = 2
				}
			}	
			clr_country_flag = IRE_sabotage_in_progress
		}
	}
	sabotage_dockyards = {
		
		available = {
			has_equipment = { infantry_equipment > 49 }
			has_equipment = { support_equipment > 29 }
			NOT = { has_country_flag = IRE_sabotage_in_progress }
		}

		visible = {
			NOT = {
				is_in_faction_with = ENG
			}
		}
		
		cost = 50
		
		days_remove = 30
		
		complete_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment 
				amount = -50
			}
			add_equipment_to_stockpile = {	
				type= support_equipment 
				amount = -30
			}
			set_country_flag = IRE_sabotage_in_progress
		}
		
		remove_effect = {
			random_state = {
				limit = {
					is_controlled_by = ENG
					OR = {
						region = 3
						region = 2
						region = 1
					}
				}
				damage_building = {
					type = dockyard
					damage = 2
				}
			}	
			clr_country_flag = IRE_sabotage_in_progress
		}
	}
}
IRE_ORGANISEPARTISANS_DECS = {
		raise_urban_defence_corps = {
			available = {
				has_war = yes
				has_capitulated = no
			}	
			fire_only_once = yes
			
			cost = 50
			
			complete_effect = {
				load_oob = IRE_urban_defence_corps
			}
		}
		
		raise_leinster_defence_corps = {
			available = {
				has_war = yes
				has_capitulated = no
			}	
			fire_only_once = yes
			
			cost = 50
			
			complete_effect = {
				load_oob = IRE_leinster_defence_corps
			}
		}	
		raise_munster_defence_corps = {
			available = {
				has_war = yes
				has_capitulated = no
			}	
			fire_only_once = yes
			
			cost = 50
			
			complete_effect = {
				load_oob = IRE_munster_defence_corps 
			}
		}	
		raise_connaught_defence_corps = {
			available = {
				has_war = yes
				has_capitulated = no
			}	
			fire_only_once = yes
			
			cost = 50
			
			complete_effect = {
				load_oob = IRE_connaught_defence_corps 
			}
		}
		raise_ulster_defence_corps = {
			available = {
				has_war = yes
				has_capitulated = no
			}	
			
			visible = {
				owns_state = 119
			}
			fire_only_once = yes
			cost = 50
			
			complete_effect = {
				load_oob = IRE_ulser_defence_corps 
			}
		}		
}	
IRE_ulster_investments = {
	invest_in_shortbros = {
		available = {
			industrial_complex > 5
		}
		visible = {
			NOT = {
				has_idea = IRE_SHORTBROS
			}
		}
		
		fire_only_once = yes
		
		cost = 70
		
		days_remove = 70
		
		modifier = {
			civilian_factory_use = 5
		}

		remove_effect = {
			add_ideas = IRE_SHORTBROS
		}
	}
	
	invest_in_HnW = {
		available = {
			industrial_complex > 5
		}
		visible = {
			NOT = {
				has_idea = IRE_HnW
			}
		}
		fire_only_once = yes
		cost = 70
		
		days_remove = 70
		
		modifier = {
			civilian_factory_use = 5
		}

		remove_effect = {
			add_ideas = IRE_HnW
			set_country_flag = IRE_invested_in_HnW
			custom_effect_tooltip = "This will unlock Harland & Wolff as a ship designer"
		}
	}
	invest_in_james_mackie = {
		available = {
			industrial_complex > 5
		}
		visible = {
			NOT = {
				has_country_flag = IRE_invested_in_james_mackie_sons
			}
		}
		fire_only_once = yes
		cost = 70
		
		days_remove = 70
		
		modifier = {
			civilian_factory_use = 5
		}

		remove_effect = {
			set_country_flag = IRE_invested_in_james_mackie_sons
			custom_effect_tooltip = "This will unlock James Mackie & Sons as an Artillery Manufacturer"
		}
	}
	invest_in_workman_clark = {
		available = {
			industrial_complex > 5
		}
		visible = {
			NOT = {
				has_country_flag = IRE_invested_in_workman_clark_company
			}
		}
		fire_only_once = yes
		cost = 70
		
		days_remove = 70
		
		modifier = {
			civilian_factory_use = 5
		}

		remove_effect = {
			set_country_flag = IRE_invested_in_workman_clark_company
			custom_effect_tooltip = "This will unlock Workman, Clark & Co. as a ship designer"
		}
	}
}	
nothern_ireland_category =  {
	integrate_northern_ireland = {
	
		available = {
			119 = {
				compliance > 50
			}
		}
		
		visible = {
			tag = IRE
			owns_state = 119
			NOT = {
				119 = {
					is_core_of = IRE
				}
			}
		}
		
		ai_will_do = { # realy, this is something that you should want to do ASAP
			factor = 100
		}	
		
		fire_only_once = yes
		
		
		days_remove = 50
		
		modifier = {
			political_power_gain = -0.25
		}

		remove_effect = {
			119 = {
				add_core_of = IRE
				remove_dynamic_modifier = { modifier = IRE_transfer_overseen_by_ENG }
			}
			if = {
				limit = {
					119 = {
						has_dynamic_modifier = {
							modifier = IRE_unionist_tensions
						}
					}
				}
				remove_dynamic_modifier = { modifier = IRE_unionist_tensions }
			}	
			if = {
				limit = {
					119 = {
						has_dynamic_modifier = {
							modifier = IRE_protestant_tensions
						}
					}
				}
				remove_dynamic_modifier = { modifier = IRE_protestant_tensions }
			}
			if = {
				limit = {
					119 = {
						has_dynamic_modifier = {
							modifier = IRE_transfer_overseen_by_ENG
						}
					}
				}
				remove_dynamic_modifier = { modifier = IRE_transfer_overseen_by_ENG }
			}
			hidden_effect = {
				119 = {
					remove_dynamic_modifier = { modifier = IRE_partial_core }
				}
			}
		}
	}

	integrate_northern_ireland_forcefully = {
	
		available = {
			119 = {
				compliance > 30
			}
			NOT = { army_manpower_in_state = { state = 119 amount < 20000  } } # deployment of 2 basic 9-inf divisions to the state
		}
		
		visible = {
			tag = IRE
			owns_state = 119
			NOT = {
				119 = {
					is_core_of = IRE
				}
			}
		}
		
		ai_will_do = { # realy, this is something that you should want to do ASAP
			factor = 100
		}	
		
		fire_only_once = yes
		
		cost = 50
		
		days_remove = 50
		
		modifier = {
			political_power_gain = -0.25
		}

		remove_effect = {
			119 = {
				add_core_of = IRE
			}
			if = {
				limit = {
					119 = {
						has_dynamic_modifier = {
							modifier = IRE_unionist_tensions
						}
					}
				}
				remove_dynamic_modifier = { modifier = IRE_unionist_tensions }
			}	
			if = {
				limit = {
					119 = {
						has_dynamic_modifier = {
							modifier = IRE_protestant_tensions
						}
					}
				}
				remove_dynamic_modifier = { modifier = IRE_protestant_tensions }
			}
			if = {
				limit = {
					119 = {
						has_dynamic_modifier = {
							modifier = IRE_transfer_overseen_by_ENG
						}
					}
				}
				remove_dynamic_modifier = { modifier = IRE_transfer_overseen_by_ENG }
			}
			hidden_effect = {
				119 = {
					remove_dynamic_modifier = { modifier = IRE_partial_core }
				}
			}
		}
	}	
	suppress_ira_in_northern_ireland = {
	
		available = {
			119 = {
				compliance > 50
			}
		}
		
		visible = {
			tag = ENG
			owns_state = 119
			NOT = {
				119 = {
					is_core_of = ENG
				}
			}
		}
		
		ai_will_do = { # realy, this is something that you should want to do ASAP
			factor = 100
		}	
		fire_only_once = yes
		
		days_remove = 50
		
		modifier = {
			political_power_gain = -0.25
		}

		remove_effect = {
			119 = {
				add_core_of = ENG
			}
			if = {
				limit = {
					119 = {
						has_dynamic_modifier = {
							modifier = IRE_IRA_agitation
						}
					}
				}
				remove_dynamic_modifier = { modifier = IRE_IRA_agitation }
			}	
			if = {
				limit = {
					119 = {
						has_dynamic_modifier = {
							modifier = IRE_unionist_cooperation
						}
					}
				}
				remove_dynamic_modifier = { modifier = IRE_unionist_cooperation }
			}
			if = {
				limit = {
					119 = {
						has_dynamic_modifier = {
							modifier = IRE_cooperation_with_the_gardai
						}
					}
				}
				remove_dynamic_modifier = { modifier = IRE_cooperation_with_the_gardai }
			}
			hidden_effect = {
				119 = {
					remove_dynamic_modifier = { modifier = IRE_partial_core }
				}
			}
		}
	}
	suppress_ira_in_northern_ireland_militarily = {
	
		available = {
			119 = {
				compliance > 30
			}
			NOT = { army_manpower_in_state = { state = 119 amount < 20000  } } # deployment of 2 basic 9-inf divisions to the state
		}
		
		visible = {
			tag = ENG
			owns_state = 119
			NOT = {
				119 = {
					is_core_of = ENG
				}
			}
		}
		
		ai_will_do = { # realy, this is something that you should want to do ASAP
			factor = 100
		}	
		fire_only_once = yes
		
		cost = 50
		
		days_remove = 50
		
		modifier = {
			political_power_gain = -0.25
			stability_weekly = 0.005
		}

		remove_effect = {
			119 = {
				add_core_of = ENG
			}
			if = {
				limit = {
					119 = {
						has_dynamic_modifier = {
							modifier = IRE_IRA_agitation
						}
					}
				}
				remove_dynamic_modifier = { modifier = IRE_IRA_agitation }
			}	
			if = {
				limit = {
					119 = {
						has_dynamic_modifier = {
							modifier = IRE_unionist_cooperation
						}
					}
				}
				remove_dynamic_modifier = { modifier = IRE_unionist_cooperation }
			}
			if = {
				limit = {
					119 = {
						has_dynamic_modifier = {
							modifier = IRE_cooperation_with_the_gardai
						}
					}
				}
				remove_dynamic_modifier = { modifier = IRE_cooperation_with_the_gardai }
			}
			hidden_effect = {
				119 = {
					remove_dynamic_modifier = { modifier = IRE_partial_core }
				}
			}
		}
	}
	northern_campaign_initiate_incident = {
		icon = border_war		

		available = {
			tag = IRE
			FROM = { # FROM  = ENG, or any other power occupying NIR
				119 = { # Only want it to be available for NIR
					is_controlled_by = FROM
					any_neighbor_state = {
						is_fully_controlled_by = ROOT # IRE needs full control of connaught or leinster
						set_temp_variable = { var:attacker_state_temp = id }
						has_ROOT_at_least_1_div_in_current_state_scope = yes
						hidden_trigger = { NOT = { has_state_flag = border_incident_active } }
					}
					NOT = { has_state_flag = border_incident_active }
					set_temp_variable = { var:defender_state_temp = id }
				}
			}
			NOT = { has_non_aggression_pact_with = FROM }
		}

		visible = {
			tag = IRE
			FROM = { exists = yes }
			OR = {
				has_completed_focus = IRE_northern_campaign
				has_completed_focus = IRE_prepare_a_northern_campaign
			}	
			NOT = { has_war_with = FROM }
			FROM = { has_not_initiated_border_incident_with_ROOT = yes }
			FROM = {
				NOT = {
					is_subject_of = ROOT
				}
				NOT = {
					is_in_faction_with = ROOT
				}
			}
			NOT = {
				is_subject_of = FROM
			}
			NOT = { owns_state = 119 }
			OR = {
				NOT = { has_border_war_with = FROM }
				FROM = {
					any_owned_state = {
						is_controlled_by = FROM
						hidden_trigger = { NOT = { has_state_flag = border_incident_active } }
						any_neighbor_state = {
							hidden_trigger = { NOT = { has_state_flag = border_incident_active } }
							is_fully_controlled_by = ROOT
						}
					}
				}
			}
		}

		# VPI by Yard1
		target_array = neighbors

		target_trigger = {
			FROM = { owns_state = 119 }
		}

		highlight_states = {
			highlight_states_trigger = {
				OR = {
					state = FROM.defender_state_vs_@ROOT
					AND = {
						is_owned_and_controlled_by = FROM
						hidden_trigger = { NOT = { has_state_flag = border_incident_active } }
						any_neighbor_state = {
							hidden_trigger = { NOT = { has_state_flag = border_incident_active } }
							has_ROOT_at_least_1_div_in_current_state_scope = yes
							is_fully_controlled_by = ROOT
						}
					}
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				has_manpower < 1000
			}
		}

		cost = 100

		fire_only_once = yes

		days_remove = 30
		days_re_enable = 180

		war_with_target_on_remove = yes

		complete_effect = {
			hidden_effect = {
				FROM = {
					119 = {
						save_event_target_as = defender_state
						set_variable = { FROM.defender_state_vs_@ROOT = id }
						set_temp_variable = { defender_state_temp = id }
						set_state_flag = border_incident_active
					}
				}
				random_state = {
					limit = {
						is_fully_controlled_by = ROOT
						hidden_trigger = { NOT = { has_state_flag = border_incident_active } }
						has_ROOT_at_least_1_div_in_current_state_scope = yes
						any_neighbor_state = {
							state = var:FROM.defender_state_vs_@ROOT
						}
					}
					save_event_target_as = attacker_state
					set_variable = { FROM.attacker_state_vs_@ROOT = id }
					set_temp_variable = { attacker_state_temp = id }
					set_state_flag = border_incident_active
				}
			}
			FROM = {
				country_event = { id = wtt_border_incident_defender_warning.1 hours = 1 }
				activate_targeted_decision = { target = ROOT decision = northern_campaign_incident_warning_defender }				
			}
		}
		remove_effect = {
			hidden_effect = {
				var:FROM.defender_state_vs_@ROOT = {
					save_event_target_as = defender_state 
				}
				var:FROM.attacker_state_vs_@ROOT = {
					save_event_target_as = attacker_state 
				}
				FROM = {
					119 = {
						set_temp_variable = { defender_state_temp = id }
					}
				}
				random_state = {
					limit = {
						is_fully_controlled_by = ROOT
						hidden_trigger = { NOT = { has_state_flag = border_incident_active } }
						has_ROOT_at_least_1_div_in_current_state_scope = yes
						any_neighbor_state = {
							state = var:FROM.defender_state_vs_@ROOT
						}
					}
					set_temp_variable = { attacker_state_temp = id }
				}
			}
			activate_targeted_decision = { target = FROM decision = northern_campaign_escalate_incident_to_border_conflict }
		}
	}

	#Mission for defender warning that a conflict with FROM is coming
	northern_campaign_incident_warning_defender = {

		icon = border_war

		allowed = { always = no } #Activated from effect

		available = {
			hidden_trigger = { always = no }
		}

		highlight_states = {
		 highlight_state_targets = {
					state = var:defender_state_temp
					state = var:ROOT.defender_state_vs_@FROM
				} 
		}

		war_with_target_on_timeout = yes
		ai_will_do = {
			base = 0
			modifier = {
				
			}
		}

		days_mission_timeout = 30

		fire_only_once = yes

		is_good = no
		
		timeout_effect = {
			custom_effect_tooltip = escalation_possible_tooltip_for_defender
			custom_effect_tooltip = effects_if_border_conflict_is_lost
			effect_tooltip = {
				add_political_power = -100
				var:ROOT.defender_state_vs_@FROM = { FROM = { transfer_state = PREV } }
			}
			hidden_effect = {
				remove_targeted_decision = { target = FROM decision = northern_campaign_incident_warning_defender }
				activate_targeted_decision = { target = FROM decision = northern_campaign_escalation_warning_defender }
			}
		}
	}

	#Mission for defender warning FROM can escalate to war at any point is coming
	northern_campaign_escalation_warning_defender = {

		icon = border_war

		allowed = { always = no } #Activated from effect

		available = {
			hidden_trigger = { always = no }
		}

		highlight_states = {
		 highlight_state_targets = {
					state = var:defender_state_temp
					state = var:ROOT.defender_state_vs_@FROM
				} 
		}

		war_with_target_on_timeout = yes
		ai_will_do = {
			base = 0
			modifier = {
				
			}
		}

		days_mission_timeout = 30

		fire_only_once = yes

		is_good = no

		timeout_effect = {
			custom_effect_tooltip = from_cannot_escalate
			custom_effect_tooltip = effects_if_border_conflict_is_lost
			effect_tooltip = {
				add_political_power = -100
				var:ROOT.defender_state_vs_@FROM = { FROM = { transfer_state = PREV } }
			}
		}		
	}

	#Mission for attacker to escalate or incident is forgotten
	#Decision to escalate incident on border with FROM to border conflict
	northern_campaign_escalate_incident_to_border_conflict = {

		icon = border_war

		allowed = { always = no } #Activated from effect

		available = {
			var:FROM.attacker_state_vs_@ROOT = {
				is_fully_controlled_by = ROOT
			}
			divisions_in_border_state = {
				state = var:FROM.attacker_state_vs_@ROOT
				border_state = var:FROM.defender_state_vs_@ROOT
				size > 0
			}
		}

		highlight_states = {
		 highlight_state_targets = {
					state = var:FROM.attacker_state_vs_@ROOT			
				} 
		}

		ai_will_do = {
			base = 0
			modifier = {
				
			}
		}

		cancel_trigger = {
			is_in_faction_with = FROM
		}

		selectable_mission = yes

		fire_only_once = yes #Reactivation handled in effect

		days_mission_timeout = 30

		timeout_effect = {
			custom_effect_tooltip = WTT_border_incident_delay_until_new_incident_120
			hidden_effect = {
				FROM = { remove_targeted_decision = { target = ROOT decision = northern_campaign_escalation_warning_defender } }
				FROM = {
					var:attacker_state_vs_@ROOT = {
						clr_state_flag = border_incident_active
					}
					var:defender_state_vs_@ROOT = {
						clr_state_flag = border_incident_active
					}
					clear_variable = attacker_state_vs_@ROOT
					clear_variable = defender_state_vs_@ROOT
				}
			}
		}

		complete_effect = {
			start_border_war = {
				change_state_after_war = no
				attacker = {
					state = var:FROM.attacker_state_vs_@ROOT
					num_provinces = 4
					on_win = wtt_border_conflict_won_attacker.1
					on_lose = wtt_border_conflict_lost_attacker.1
					on_cancel = wtt_border_conflict_canceled_attacker.1
				}
				
				defender = {
					state = var:FROM.defender_state_vs_@ROOT
					num_provinces = 4
					on_win = wtt_border_conflict_won_defender.1
					on_lose = wtt_border_conflict_lost_defender.1
					on_cancel = wtt_border_conflict_canceled_defender.1
				}
			}
			FROM = {
				activate_targeted_decision = { target = ROOT decision = northern_campaign_escalate_conflict }
				activate_targeted_decision = { target = ROOT decision = northern_campaign_time_until_cancelled }
			}
			activate_targeted_decision = { target = FROM decision = northern_campaign_escalate_conflict }
			activate_targeted_decision = { target = FROM decision = northern_campaign_time_until_cancelled }
		}
	}

	#Mission for attacker to win border war against FROM in X days
	northern_campaign_time_until_cancelled = {

		icon = border_war

		allowed = { always = no } #Activated from effect

		available = {
			var:FROM.defender_state_vs_@ROOT = { has_border_war = no }
			var:FROM.attacker_state_vs_@ROOT = { has_border_war = no }
		}
		
		highlight_states = {
		 highlight_state_targets = {
					state = var:defender_state_temp
					state = var:FROM.defender_state_vs_@ROOT
				} 
		}

		ai_will_do = {
			base = 0
			modifier = {
				
			}
		}

		days_mission_timeout = 360
		is_good = no

		fire_only_once = yes #Reactivation handled in effect

		complete_effect = {

		}

		timeout_effect = {
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				cancel_border_war = {
					defender = var:defender_state_vs_@FROM
					attacker = var:attacker_state_vs_@FROM
				}
			}
			else = {
				cancel_border_war = {
					defender = var:FROM.defender_state_vs_@ROOT
					attacker = var:FROM.attacker_state_vs_@ROOT
				}
			}
			hidden_effect = {
				remove_targeted_decision = { target = FROM decision = northern_campaign_escalate_conflict }
			}
		}
	}

	#Decision to escalate conflict further
	northern_campaign_escalate_conflict = {

		icon = decision_generic_ignite_civil_war

		allowed = { always = no } #Activated from effect

		visible = {
			has_border_war_with = FROM
		}


		highlight_states = {
		 highlight_state_targets = {
					state = var:FROM.attacker_state_vs_@ROOT
					state = var:ROOT.defender_state_vs_@FROM
				} 
		}

		cost = 200

		ai_will_do = {
			base = 0
			modifier = {
				
			}
		}

		fire_only_once = yes #Reactivation handled in effect

		complete_effect = {
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				set_border_war_data = {
					attacker = var:ROOT.defender_state_vs_@FROM
					defender = var:ROOT.defender_state_vs_@FROM
					defender_modifier = 0.15
					combat_width = 100
				}
			}
			else = {
				set_border_war_data = {
					attacker = var:FROM.defender_state_vs_@ROOT
					defender = var:FROM.defender_state_vs_@ROOT
					attacker_modifier = 0.15
					combat_width = 100
				}
			}
			FROM = {
				set_country_flag = {
					flag = WTT_border_conflict_escalate_to_war_cooldown_@ROOT
					days = 45
					value = 1
				}
				remove_targeted_decision = { target = ROOT decision = northern_campaign_escalate_conflict }
			}
			set_country_flag = {
				flag = WTT_border_conflict_escalate_to_war_cooldown_@FROM
				days = 45
				value = 1
			}
			custom_effect_tooltip = in_45_days
			activate_targeted_decision = { target = FROM decision = northern_campaign_escalate_to_war }
		}
	}

	#Decision to escalate conflict further
	northern_campaign_escalate_to_war = {

		icon = decision_generic_ignite_civil_war

		allowed = { always = no } #Activated from effect

		visible = {
			NOT = { has_country_flag = WTT_border_conflict_escalate_to_war_cooldown_@FROM }
			has_border_war_with = FROM
		}


		highlight_states = {
		 highlight_state_targets = {
					state = var:FROM.defender_state_vs_@ROOT
					state = var:ROOT.attacker_state_vs_@FROM
				} 
		}


		cost = 150

		ai_will_do = {
			base = 10
			modifier = { # Irish AI should not want war with Uk if it can get away with it, but UK should usually feel confident enough to take out IRE
				factor = 0
				tag = IRE
			}
		}

		days_remove = 15

		fire_only_once = yes #Reactivation handled in effect

		war_with_target_on_remove = yes

		complete_effect = {
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				var:ROOT.defender_state_vs_@FROM = { save_event_target_as = their_state }
				var:ROOT.attacker_state_vs_@FROM = { save_event_target_as = our_state }
			}
			else = {
				var:FROM.defender_state_vs_@ROOT = { save_event_target_as = our_state }
				var:FROM.attacker_state_vs_@ROOT = { save_event_target_as = their_state }
			}
			FROM = {
				country_event = { id = wtt_border_conflict_escalate_to_war.1 }
				hidden_effect = {
					remove_targeted_decision = { target = ROOT decision = northern_campaign_escalate_to_war }
				}
		 	}
		}

		remove_effect = {
			cancel_border_war = {
				dont_fire_events = yes
				defender = var:FROM.defender_state_vs_@ROOT
				attacker = var:FROM.attacker_state_vs_@ROOT
			}
			declare_war_on = { target = FROM type = annex_everything }
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				var:attacker_state_vs_@FROM = {
					clr_state_flag = border_incident_active
				}
				var:defender_state_vs_@FROM = {
					clr_state_flag = border_incident_active
				}
				clear_variable = attacker_state_vs_@FROM
				clear_variable = defender_state_vs_@FROM
			}
			else = {
				FROM = {
					var:attacker_state_vs_@ROOT = {
						clr_state_flag = border_incident_active
					}
					var:defender_state_vs_@ROOT = {
						clr_state_flag = border_incident_active
					}
					clear_variable = attacker_state_vs_@ROOT
					clear_variable = defender_state_vs_@ROOT
				}
			}
		}
	}

	#Decision to back down from conflict
	northern_campaign_back_out_of_conflict = {

		allowed = { always = no } #Activated from effect

		visible = {
			has_border_war_with = FROM
		}

		highlight_states = {
		 highlight_state_targets = {
					state = var:FROM.attacker_state_vs_@ROOT
					state = var:ROOT.defender_state_vs_@FROM
				} 
		}

		ai_will_do = {
			base = 0
			modifier = {
				
			}
		}

		fire_only_once = yes #Reactivation handled in effect

		complete_effect = {
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				finalize_border_war = {
					attacker_win = yes
					attacker = ROOT.attacker_state_vs_@FROM
					defender = ROOT.attacker_state_vs_@FROM
				}
			}
			else = {
				finalize_border_war = {
					attacker = FROM.attacker_state_vs_@ROOT
					defender = FROM.attacker_state_vs_@ROOT
					defender_win = yes
				}
			}
		}
	}
	ENG_intervention_warning = {

		
		available = {
			hidden_trigger = { always = no }
		}

		days_mission_timeout = 90


		activation = {
			tag = IRE
			has_war_with = NIR
			NOT = { has_war_with = ENG }
			NOT = { is_in_faction_with = ENG }
		}

		visible = {
			tag = IRE
			has_war_with = NIR
			NOT = { has_war_with = ENG }
			NOT = { is_in_faction_with = ENG }
		}

		cancel_if_not_visible = yes

		is_good = no

		complete_effect = {
			
		}

		timeout_effect = {
			custom_effect_tooltip = NIR_revolt_warning.tt
			ENG = {
				country_event = {
					id = ireland.78
				}	
			}	
		}
	}
}		
IRE_IRA_decisions = {
	denounce_IRA_action = { # provoke them - loyalty down
		visible = {
			NOT = {
				has_idea = IRE_ira_5 # lowest level of loyalty
			}
		}
		
		available = {
			NOT = { has_country_flag = IRA_going_to_revolt }
		}
		
		ai_will_do = { # the ai will just ruin itself doing this - players would even only find this very situational
			factor = 0
		}
		
		cost = 30
		
		days_remove = 30
		
		modifier = {
			political_power_gain = -0.1
			war_support_weekly = -0.005
		}
		
		remove_effect = {
			custom_effect_tooltip = IRA_loyalty_down.tt
			hidden_effect = {
				add_to_variable = {
					var = IRA_loyalty
					value = -1
				}	
			}
		}
	}
	
	honour_IRA_dead = { #buy loyalty with pp
		visible = {
			NOT = {
				has_idea = IRE_ira_1 # highest level of loyalty
			}
		}
		
		available = {
			NOT = { has_country_flag = IRA_going_to_revolt }
		}
		
		ai_will_do = {
			factor = 30
			modifier = {
				factor = 0
				has_idea = IRE_ira_1
			}
			modifier = {
				factor = 0.5
				has_idea = IRE_ira_2
			}
			modifier = {
				factor = 0.75
				has_idea = IRE_ira_3
			}
			modifier = {
				factor = 0.5
				has_completed_focus = IRE_clamp_down_on_IRA
			}
			modifier = {
				factor = 0.5
				has_completed_focus = IRE_fine_gael
			}
			modifier = {
				factor = 1.5
				has_idea = IRE_ira_4
			}
			modifier = {
				factor = 1.75
				has_idea = IRE_ira_5
			}
			modifier = { # historical IRE should seek to avoid another CW
				factor = 100
				has_idea = IRE_ira_5
				has_completed_focus = IRE_finna_fail
			}
		}
		cost = 30
		
		days_remove 30
		
		modifier = {
			political_power_gain = -0.5
		}

		remove_effect = {
			custom_effect_tooltip = IRA_loyalty_up.tt
			hidden_effect = {
				add_to_variable = {
					var = IRA_loyalty
					value = 1
				}
			}
		}
	}
	
	pardon_IRA_soliders = { # loyalty for strength
	
		visible = {
			OR = {
				NOT = { has_idea = IRE_ira_1 }
				AND = {
					has_idea = IRE_ira_1
					has_completed_focus = IRE_court_the_ira
				}
			}
		}
		
		available = {
			NOT = { has_country_flag = IRA_going_to_revolt }
		}
		
		cost = 50
		
		ai_will_do = {
			factor = 30
			modifier = {
				factor = 0
				has_idea = IRE_ira_1
			}
			modifier = {
				factor = 0.5
				has_idea = IRE_ira_2
			}
			modifier = {
				factor = 0.75
				has_idea = IRE_ira_3
			}
			modifier = {
				factor = 0.5
				has_completed_focus = IRE_clamp_down_on_IRA
			}
			modifier = {
				factor = 0.25
				has_completed_focus = IRE_fine_gael
			}
			modifier = {
				factor = 1.5
				has_idea = IRE_ira_4
			}
			modifier = {
				factor = 1.75
				has_idea = IRE_ira_5
			}
			modifier = { # historical IRE should seek to avoid another CW
				factor = 100
				has_idea = IRE_ira_5
				has_completed_focus = IRE_finna_fail
			}
		}
			
		days_remove = 30
		
		modifier = {
			political_power_gain = -0.25
			stability_weekly = -0.005
		}
		
		remove_effect = {
			custom_effect_tooltip =  IRA_loyalty_up.tt
			if = {
				limit = {
					NOT = {
						has_completed_focus = IRE_court_the_ira
					}
				}
				custom_effect_tooltip = IRA_strength_up.tt
			}
			if = {
				limit = {
					has_completed_focus = IRE_court_the_ira
				}
				custom_effect_tooltip = IRA_courted_strength_up.tt
			}
			add_to_variable = {
				var = IRA_loyalty
				value = 1
			}
			add_to_variable = {
				var = IRA_strength		
				value = 1
			}
		}
	}
	
	imprison_IRA_sympathisers = { # strength for loyalty
	
		visible = {
			NOT = { has_completed_focus = IRE_court_the_ira }
		}

		available = {
			NOT = { has_country_flag = IRA_going_to_revolt }
		}
		
		cost = 50
		
		ai_will_do = {
			factor = 30
			modifier = {
				factor = 1.25
				has_idea = IRE_ira_1
			}
			modifier = {
				factor = 1.15
				has_idea = IRE_ira_2
			}
			modifier = {
				factor = 0.5
				has_idea = IRE_ira_3
			}
			modifier = {
				factor = 0
				has_completed_focus = IRE_court_the_ira
			}
			modifier = {
				factor = 0.5
				has_completed_focus = IRE_fine_gael
			}
			modifier = {
				factor = 0.25
				has_idea = IRE_ira_4
			}
			modifier = { # well, it they are going to revolt, this isn't such a bad idea
				factor = 0.75
				has_idea = IRE_ira_5
			}
		}
		days_remove = 30
		
		modifier = {
			political_power_gain = -0.25
			stability_weekly = -0.005
		}	
		
		remove_effect = {
			custom_effect_tooltip = IRA_loyalty_down.tt
			if = {
				limit = {
					NOT = {
						has_completed_focus = IRE_court_the_ira
					}
				}
				custom_effect_tooltip = IRA_strength_down.tt
			}
			if = {
				limit = {
					has_completed_focus = IRE_court_the_ira
				}
				custom_effect_tooltip = IRA_courted_strength_down.tt
			}
			add_to_variable = {
				var = IRA_loyalty
				value = -1
			}
			add_to_variable = {
				var = IRA_strength
				value = -1
			}
		}
	}
	
	allign_towards_IRA = { # ws for strength
	
		visible = {
			NOT = { has_completed_focus = IRE_fine_gael }
		}
		
		available = {
			NOT = { has_country_flag = IRA_going_to_revolt }
		}
		
		cost = 30
		
		days_remove = 30
		
		modifier = {
			political_power_gain = -0.25
			war_support_weekly = 0.02
		}	
		
		ai_will_do = { # less useful
			factor = 20
			modifier = {
				factor = 0.5
				has_idea = IRE_ira_3
			}
			modifier = {
				factor = 0
				has_war_support > 0.75
			}
			modifier = {
				factor = 0.5
				has_war_support > 0.5
			}
			modifier = {
				factor = 0.75
				has_war_support > 0.45
			}
			modifier = {
				factor = 1.25
				has_war_support < 0.4
			}
			modifier = {
				factor = 2
				has_war_support < 0.3
			}	
			modifier = {
				factor = 1.5
				has_completed_focus = IRE_court_the_ira
			}
			modifier = {
				factor = 0
				has_completed_focus = IRE_fine_gael
			}
			modifier = { # bad idea
				factor = 0.15
				has_idea = IRE_ira_4
			}
			modifier = { # bad idea
				factor = 0
				has_idea = IRE_ira_5
			}
		}
		remove_effect = {
			add_war_support = 0.05
			if = {
				limit = {
					NOT = {
						has_completed_focus = IRE_court_the_ira
					}
				}
				custom_effect_tooltip = IRA_strength_up.tt
			}
			if = {
				limit = {
					has_completed_focus = IRE_court_the_ira
				}
				custom_effect_tooltip = IRA_courted_strength_up.tt
			}
			add_to_variable = {
				var = IRA_strength
				value = 1
			}
		}
	}
	
	use_IRA_against_political_opponents = { # stab for strength
	
		visible = {
			NOT = { has_completed_focus = IRE_fine_gael }
		}
		
		available = {
			NOT = { has_country_flag = IRA_going_to_revolt }
		}
		
		cost = 30
		
		ai_will_do = { # less useful
			factor = 20
			modifier = {
				factor = 0.5
				has_idea = IRE_ira_3
			}
			modifier = {
				factor = 0
				has_stability > 0.75
			}
			modifier = {
				factor = 0.5
				has_stability > 0.5
			}
			modifier = {
				factor = 0.75
				has_stability > 0.45
			}
			modifier = {
				factor = 1.25
				has_stability < 0.4
			}
			modifier = {
				factor = 2
				has_stability < 0.3
			}	
			modifier = {
				factor = 1.5
				has_completed_focus = IRE_court_the_ira
			}
			modifier = {
				factor = 0
				has_completed_focus = IRE_fine_gael
			}
			modifier = { # not such a bad idea
				factor = 0.25
				has_idea = IRE_ira_4
			}
			modifier = { # bad idea
				factor = 0
				has_idea = IRE_ira_5
			}
		}
		
		days_remove = 30
		
		modifier = {
			political_power_gain = -0.25
			stability_weekly = 0.02
		}	
		
		remove_effect = {
			add_stability = 0.05
			if = {
				limit = {
					NOT = {
						has_completed_focus = IRE_court_the_ira
					}
				}
				custom_effect_tooltip = IRA_strength_up.tt
			}
			if = {
				limit = {
					has_completed_focus = IRE_court_the_ira
				}
				custom_effect_tooltip = IRA_courted_strength_up.tt
			}
			add_to_variable = {
				var = IRA_strength
				value = 1
			}
		}
	}	
	
	recruit_IRA_soldiers = { # Loyalty for mp & strength
	
		visible = {
			OR = {
				has_idea = IRE_ira_3
				has_idea = IRE_ira_4
				has_idea = IRE_ira_5
			}	
		}
		
		available = {
			NOT = { has_country_flag = IRA_going_to_revolt }
		}
		
		cost = 30
		
		ai_will_do = { # less useful
			factor = 20
			modifier = {
				factor = 0.5
				has_idea = IRE_ira_3
			}
			modifier = {
				factor = 1.2
				has_manpower < 10000
			}
			modifier = {
				factor = 0
				has_manpower > 30000
			}
			modifier = {
				factor = 1.5
				has_manpower > 100
			}
			modifier = { # less useful
				factor = 0.5
				has_completed_focus = IRE_court_the_ira
			}
			modifier = { # actually not a bad idea
				factor = 0.75
				has_completed_focus = IRE_fine_gael
			}
			modifier = { # bad idea, but weakens them
				factor = 0.25
				has_idea = IRE_ira_4
			}
			modifier = { # not a terrible idea, if they're likely to revolt
				factor = 0.5
				has_idea = IRE_ira_5
			}
		}
		days_remove = 30
		
		modifier = {
			political_power_gain = -0.25
			stability_weekly = -0.02
			war_support_weekly = -0.02
			weekly_manpower = 500
		}	
		
		remove_effect = {
			add_manpower = 1000
			if = {
				limit = {
					NOT = {
						has_completed_focus = IRE_court_the_ira
					}
				}
				custom_effect_tooltip = IRA_strength_down.tt
			}
			if = {
				limit = {
					has_completed_focus = IRE_court_the_ira
				}
				custom_effect_tooltip = IRA_courted_strength_down.tt
			}
			custom_effect_tooltip = IRA_loyalty_down.tt
			add_to_variable = {
				var = IRA_strength
				value = -2
			}
			add_to_variable = {
				var = IRA_loyalty
				value = -2
			}
		}
	}	

	promote_IRA_causes = { # loyalty& strength for pp & stab
	
		visible = {
			has_completed_focus = IRE_court_the_ira	
		}
		
		available = {
			NOT = { has_civil_war = yes }
		}
		
		cost = 30
		
		ai_will_do = { # less useful
			factor = 20
			modifier = {
				factor = 0.75
				has_idea = IRE_ira_3
			}
			modifier = {
				factor = 0
				has_idea = IRE_ira_1
			}
			modifier = {
				factor = 0.5
				has_idea = IRE_ira_2
			}
			modifier = {
				factor = 1.5
				has_manpower > 100
			}
			modifier = { # useful
				factor = 1.5
				has_completed_focus = IRE_court_the_ira
			}
			modifier = { # actually a bad idea
				factor = 0
				has_completed_focus = IRE_fine_gael
			}
			modifier = { # good idea
				factor = 1.25
				has_idea = IRE_ira_4
			}
			modifier = { # not a terrible idea, but gives them strength
				factor = 1.5
				has_idea = IRE_ira_5
			}
		}

		days_remove = 30
		
		modifier = {
			political_power_gain = -0.25
			stability_weekly = -0.05
		}	
		
		remove_effect = {
			custom_effect_tooltip = IRA_loyalty_up.tt
			custom_effect_tooltip = IRA_courted_strength_up.tt
			add_to_variable = {
				var = IRA_strength
				value = 1
			}
			add_to_variable = {
				var = IRA_loyalty
				value = 1
			}
		}
	}	

	foster_IRA_sympathies_in_the_army = { # loyalty& strength for pp & stab
	
		visible = {
			has_completed_focus = IRE_court_the_ira	
			any_unit_leader = {
				NOT = { has_trait = IRA_sympathies }
			}	
		}
		
		available = {
			NOT = { has_civil_war = yes }
		}
		
		cost = 30
		
		ai_will_do = { # always a good idea
			factor = 30
			modifier = {
				IRE = {
					all_unit_leader = {
						has_trait = IRA_sympathies
					}
				}
			}
					
		}
		
		days_remove = 30
		
		modifier = {
			political_power_gain = -0.25
			command_power_gain = -1
		}	
		
		remove_effect = {
			custom_effect_tooltip = IRA_courted_strength_up.tt
			add_to_variable = {
				var = IRA_strength
				value = 1
			}
			random_unit_leader = {
				limit = {
					NOT = { has_trait = IRA_sympathies }
				}
				add_unit_leader_trait = IRA_sympathies
			}	
		}
	}	
	
	send_arms_to_the_IRA = { #equipment for strength
	
		visible = {
			has_completed_focus = IRE_court_the_ira
		}
		
		available = {
			has_equipment = {
				infantry_equipment > 299
			}
			NOT = { has_civil_war = yes }
		}
		
		cost = 30
		ai_will_do = { # more situationa;
			factor = 10
			modifier = {
				factor = 0.5
				check_variable = {
					var = IRA_strength
					value = 20
					compare = greater_than_or_equals
				}
			}
			modifier = {
				factor = 0.5
				check_variable = {
					var = IRA_strength
					value = 25
					compare = greater_than_or_equals
				}
			}
			modifier = {
				factor = 0.5
				check_variable = {
					var = IRA_strength
					value = 30
					compare = greater_than_or_equals
				}
			}
		}	
		days_remove = 30
		
		complete_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = -300
			}
		}
		
		remove_effect = {
			custom_effect_tooltip = IRA_courted_strength_up.tt
			add_to_variable = {
				var = IRA_strength
				value = 2
			}
		}
	}
	
	clamp_down_on_IRA = { # Gardai campaign - equipment & manpower for strength
	
		visible = {
			has_completed_focus = IRE_clamp_down_on_IRA
		}

		available = {
			has_equipment = {
				infantry_equipment > 299
			}
		}
		
		ai_will_do = { # more situational
			factor = 10
			modifier = {
				factor = 0.5
				has_manpower < 10000
			}
			modifier = {
				factor = 0.5
				has_manpower < 5000
			}
			modifier = {
				factor = 0.5
				has_manpower < 2500
			}
			modifier = {
				factor = 1.2
				has_completed_focus = IRE_fine_gael
			}
			modifier = {
				factor = 0.75
				has_completed_focus = IRE_finna_fail
			}
			modifier = {
				factor = 0.5
				has_idea = IRE_ira_4
			}
			modifier = { # well, if they are going to revolt
				factor = 0.75
				has_idea = IRE_ira_5
			}
			modifier = { # but not for historical
				factor = 0
				has_idea = IRE_ira_5
				has_completed_focus = IRE_finna_fail
			}
			modifier = {
				factor = 0
				has_idea = IRE_ira_4
				has_completed_focus = IRE_finna_fail
			}	
		}
		cost = 50
		
		days_remove = 30
		
		modifier = {
			weekly_manpower = -50
		}	
		complete_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = -300
			}
		}
		
		remove_effect = {
			custom_effect_tooltip = IRA_loyalty_down.tt
			custom_effect_tooltip = IRA_strength_down.tt
			add_to_variable = {
				var = IRA_loyalty
				value = -3
			}
			add_to_variable = {
				var = IRA_strength
				value = -3
			}
		}
	}
	
	raid_IRA_depots = { # pp &O manpower for strength & equipment
	
		visible = {
			has_completed_focus = IRE_clamp_down_on_IRA
		}
		
		cost = 60
		
		days_remove = 30
		
		ai_will_do = { # always a good idea
			factor = 20
		}	
		
		modifier = {
			weekly_manpower = -30
			stability_weekly = -0.02
		}	
		
		remove_effect = {
			custom_effect_tooltip = IRA_strength_down.tt
			add_to_variable = {
				var = IRA_strength
				value = -2
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 200
				producer = IRE
			}	
		}
	}
	
	army_reeduction_campaign = {
	
		visible = {
			has_completed_focus = IRE_clamp_down_on_IRA
			any_unit_leader = {
				has_trait = IRA_sympathies
			}	
		}
		
		cost = 60
		
		ai_will_do = { # always a good idea
			factor = 20
		}	
		days_remove = 30
		
		modifier = {
			political_power_gain = -0.5
			command_power_gain = -1.5
		}	
		
		remove_effect = {
			random_unit_leader = {
				limit = {
					has_trait = IRA_sympathies
				}
				remove_unit_leader_trait = IRA_sympathies
			}	
		}
	}
	
	foster_monarchist_sympathies_in_IRA = {
	
		visible = {
			has_completed_focus = IRE_infiltrate_the_IRA
		}
		
		cost = 50
		
		ai_will_do = { # always a good idea - until they have good support that is
			factor = 20
			modifier = {
				factor = 0
				neutrality > 0.6
			}	
		}	
		days_remove = 30
		
		modifier = {
			political_power_gain = -0.5
			neutrality_drift = 0.05
		}	
		
		remove_effect = {
			add_popularity = {
				ideology = neutrality
				popularity = 0.03
			}
			hidden_effect = {
				add_to_variable = {
					var = IRA_strength
					value = -1
				}	
			}
			custom_effect_tooltip = IRA_strength_down.tt
		}
	}
	steal_IRA_arms = {
	
		visible = {
			has_completed_focus = IRE_infiltrate_the_IRA
		}
		
		cost = 50
		
		ai_will_do = { # not a particularly good idea
			factor = 10
		}	
		days_remove = 30
		
		modifier = {
			political_power_gain = -0.5
			weekly_manpower = -50
		}	
		
		remove_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 200
				producer = IRE
			}	
			hidden_effect = {
				add_to_variable = {
					var = IRA_loyalty
					value = -1
				}	
			}
			custom_effect_tooltip = IRA_loyalty_down.tt
			hidden_effect = {
				add_to_variable = {
					var = IRA_strength
					value = -1
				}	
			}
			custom_effect_tooltip = IRA_strength_down.tt
		}
	}
	seek_allies_in_IRA = {
	
		visible = {
			has_completed_focus = IRE_infiltrate_the_IRA
		}
		
		cost = 30
		
		ai_will_do = { #  a good idea until support is high
			factor = 20
			modifier = {
				factor = 0
				neutrality > 0.6
			}	
		}	
		days_remove = 30
		
		modifier = {
			political_power_gain = -0.5
			neutrality_drift = 0.10
		}	
		
		remove_effect = {
			add_popularity = {
				ideology = neutrality
				popularity = 0.05
			}
			hidden_effect = {
				add_to_variable = {
					var = IRA_loyalty
					value = 1
				}	
			}
			custom_effect_tooltip = IRA_loyalty_up.tt
			hidden_effect = {
				add_to_variable = {
					var = IRA_strength
					value = 1
				}	
			}
			custom_effect_tooltip = IRA_strength_up.tt
		}
	}
	integrate_the_IRA = {
	
		visible = {
			OR = {
				has_completed_focus = IRE_fine_gael
				has_completed_focus = IRE_finna_fail
			}
		}
		
		available = {
			OR = {
				owns_state = 119
				has_war_with = ENG
			}
			has_idea = IRE_ira_1
		}
		
		cost = 100
		
		ai_will_do = { #  ai should do this if it manages to be in the position to do so
			factor = 20
		}	
		days_remove = 180  #this should be a big effort
		
		modifier = {
			political_power_gain = -0.5
			fascism_drift = 0.02
			communism_drift = 0.02
		}	
		
		remove_effect = {
			add_popularity = {
				ideology = fascism
				popularity = 0.05
			}
			add_popularity = {
				ideology = communism
				popularity = 0.05
			}
			add_stability = -0.1
			swap_ideas = {
				remove_idea = IRE_ira_1 
				add_idea = IRE_ira_0
			}
			hidden_effect = { # in case you lose loyalty during the integration
				remove_ideas = {
					IRE_ira_2
					IRE_ira_3
					IRE_ira_4
					IRE_ira_5
				}
			}
		}
	}
	impending_IRA_rising = {

		
		available = {
			hidden_trigger = { always = no }
		}

		days_mission_timeout = 180


		activation = {
			tag = IRE
			has_idea = IRE_ira_5
		}

		visible = {
			tag = IRE
			has_idea = IRE_ira_5
		}

		cancel_if_not_visible = yes

		is_good = no

		complete_effect = {
			
		}

		timeout_effect = {
			custom_effect_tooltip = IRA_revolt.tt
			country_event = {
				id = ireland.69
			}	
		}
	}
}	
atlantic_alliance_category = {
	invite_FROM = {
		
		available = {
			FROM = {
				OR = {
					original_tag = GER
					AND = {
						has_civil_war = no
						is_in_faction = no
					}
				}
			}
		}
		
		fire_only_once = yes 
		
		target_trigger = {
			FROM = {
				OR = {
					tag = SPR
					tag = POR
					tag = HOL
					tag = BEL
					tag = NOR
					tag = DEN
					tag = ICE
					tag = USA
					tag = MEX
					tag = CAN
					tag = COL
					tag = BRA
					AND = {
						original_tag = GER
						has_government = neutrality
					}
				}
				NOT =  {
					is_in_faction_with = ROOT
				}
			}
		}
		
		cost = 10
		
		complete_effect = {
			FROM = {
				country_event = {
					id = ireland.97
				}
			}
			custom_effect_tooltip = IRE_alliance.tt
		}	
	}	
}
political_actions = {
	reinforce_the_monarchist_plot = {
		
		visible = {
			tag = IRE
			has_completed_focus = IRE_revive_monarchist_cause
		}
		
		available = {
			has_equipment = {
				infantry_equipment > 299
			}
		}
		
		ai_will_do = {
			factor = 1000
			modifier = {
				factor = 0
				neutrality > 40
			}
		}
		
		days_remove = 60
		
		modifier = {
			neutrality_drift = 0.05
		}
		
		complete_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = -300
			}
		}
	}
}