
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     ********************////////**********************************************			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     ********************////////**********************************************			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     //////////////////////////////////////////////////////////////////////////			##########################################################################				oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo		       
##     //////////////////////////////////////////////////////////////////////////			########################################################################## 			    oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo		
##     //////////////////////////////////////////////////////////////////////////			##########################################################################				oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo		
##     ********************////////**********************************************			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     ********************////////**********************************************			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		
##     -----------------***////////***-------------------------------------------			\\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\				++++++++++++++++++++oooooooo++++++++++++++++++++++++++++++++++++++++++++++		              



##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################
##       
##       
##
##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################
##      ####################        ##############################################


add_namespace = AAT_nordic_shared
add_namespace = AAT_nordic_cooperation

#country_event = {
#	id = BBA_switzerland.1
#	title = BBA_switzerland.1.t
#	desc = BBA_switzerland.1.desc
#	picture = 
#
#	is_triggered_only = yes
#
#	immediate = {
#		hidden_effect = {
#		}
#	}
#
#	option = {
#		name = BBA_switzerland.1.a
#		ai_chance = {
#			base = 10
#		}
#		trigger = {
#		}
#	}
#	option = {
#		name = BBA_switzerland.1.b
#		ai_chance = {
#			base = 10
#		}
#		trigger = {
#		}
#     }
#}

country_event = { #Invite to Nordic Alliance
	id = AAT_nordic_shared.1
	title = AAT_nordic_shared.1.t
	picture = GFX_report_event_generic_sign_treaty2
	desc = { 
		text = AAT_nordic_shared.1.desc_faction_member
		trigger = {
			has_country_flag = NORDIC_already_member_flag
		}
	}
	desc = { 
		text = AAT_nordic_shared.1.desc_non_faction_member
		trigger = {
			NOT = { has_country_flag = NORDIC_already_member_flag }
		}
	}

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			set_variable = { ROOT.neg_opinion = ROOT.opinion@FROM }
			multiply_variable = { ROOT.neg_opinion = -1 }
		}
	}

	option = {
		name = AAT_nordic_shared.1.a
		ai_chance = {
			base = 100
			modifier = {
				add = ROOT.opinion@FROM 
				always = yes 
			}
		}
		trigger = {
		}
		NORDIC_add_to_nordic_alliance = yes 
		clr_country_flag = NORDIC_already_member_flag
	}
	option = {
		name = AAT_nordic_shared.1.b
		ai_chance = {
			base = 100
			modifier = {
				add = ROOT.neg_opinion
				always = yes 
			}
			
			modifier = {
				factor = 0
				has_country_flag = NORDIC_already_member_flag
			}
			
		}
		trigger = {
		}
		clr_country_flag = NORDIC_already_member_flag
     }
}

#### Event Graveyard. Revive at your own risk ### 

country_event = { # Ask for Mutual Guarantees 
	id = AAT_nordic_shared.2
	title = AAT_nordic_shared.2.t
	desc = AAT_nordic_shared.2.desc

	is_triggered_only = yes

	option = { # Yes 
		name = AAT_nordic_shared.2.a
		ai_chance = {
			base = 10
		}
		trigger = {
		}
		give_guarantee = FROM 
		FROM = { 
			give_guarantee = ROOT 
			hidden_effect = {
				country_event = {
					id = AAT_nordic_shared.3
					hours = 2 
				}
			}
		}
	}

	option = { # Nah 
		name = AAT_nordic_shared.2.b
		trigger = {
		}
		FROM = {
			country_event = {
				id = AAT_nordic_shared.4
				hours = 3
			}
		}
    }
}


country_event = { # Accepted  
	id = AAT_nordic_shared.3
	title = AAT_nordic_shared.3.t
	desc = AAT_nordic_shared.3.desc

	is_triggered_only = yes

	option = { # Yes, it's all coming together 
		name = AAT_nordic_shared.3.a
		trigger = {
		}
		FROM = {
			event_option_tooltip = AAT_nordic_shared.2.a
		}
	}
}

country_event = { # Rejected 
	id = AAT_nordic_shared.4
	title = AAT_nordic_shared.4.t
	desc = AAT_nordic_shared.4.desc

	is_triggered_only = yes

	option = { # Neeeeeeeeejjjjj 
		name = AAT_nordic_shared.4.a
		trigger = {
		}
	}
}




country_event = { #Event to notify Aggressor country that there's a country too involved in the war, and ask if they want to declare war on them too 
	id = AAT_nordic_cooperation.1
	title = AAT_nordic_cooperation.1.t
	desc = AAT_nordic_cooperation.1.desc

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
		}
	}

	option = { # We can't afford another enemy 
		name = AAT_nordic_cooperation.1.a
		ai_chance = {
			base = 5
			modifier = {
				add = 20
				strength_ratio = {
					tag = FROM 
					ratio < 1
				}
			}
			modifier = {
				factor = 0 
				strength_ratio = {
					tag = FROM 
					ratio > 4
				}
			}
		}
		trigger = {
		}
		add_stability = -0.25
		add_political_power = -250
	}

	option = {
		name = AAT_nordic_cooperation.1.b
		ai_chance = {
			base = 5
		}
		trigger = {
		}
		FROM = {
			var:NORDIC_country_to_defend = {
				PREV = {
					add_to_war = {
						targeted_alliance = PREV
						enemy = ROOT 
					}
				}
			}
		}
	}
}

country_event = { # Event to ask defender if they want them to join 
	id = AAT_nordic_cooperation.2
	title = AAT_nordic_cooperation.2.t
	desc = AAT_nordic_cooperation.2.desc

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
		}
	}

	option = { # YES PLEASE 
		name = AAT_nordic_cooperation.2.a
		ai_chance = {
			base = 10
		}
		trigger = {
		}
		
		var:NORDIC_attacker = {
			FROM = {
				add_to_war = {
					targeted_alliance = ROOT
					enemy = PREV  
				}
			}
		}
		
	}

	option = { # Nah we're grand 
		name = AAT_nordic_cooperation.2.b
		ai_chance = {
			base = 1
		}
		trigger = {
		}
		FROM = {
			country_event = {
				id = AAT_nordic_cooperation.3
				hours = 3  
			}
		}
	}
}

country_event = { # EVent to notify the defender doesn't need your help  
	id = AAT_nordic_cooperation.3
	title = AAT_nordic_cooperation.3.t
	desc = AAT_nordic_cooperation.3.desc 

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
		}
	}

	option = { # Oh well....  
		name = AAT_nordic_cooperation.3.a
		ai_chance = {
			base = 10
		}
		trigger = {
		}
	}
}

country_event = { # Asking for investments   
	id = AAT_nordic_cooperation.4
	title = AAT_nordic_cooperation.4.t
	desc = AAT_nordic_cooperation.4.desc

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
		}
	}

	option = { # Sure why not
		name = AAT_nordic_cooperation.4.a
		ai_chance = {
			base = 10
		}
		trigger = {
		}
		add_timed_idea = {
			idea = NORDIC_investing_in_neighbor_ns
			days = 60
		}
		FROM = {
			country_event = {
				id = AAT_nordic_cooperation.5
				hours = 5		
			}
			event_option_tooltip = AAT_nordic_cooperation.5.a
		}
	}

	option = { # No 
		name = AAT_nordic_cooperation.4.b
		ai_chance = {
			base = 10
		}
		trigger = {
		}
		FROM = {
			country_event = {
				id = AAT_nordic_cooperation.6
				hours = 5		
			}
			event_option_tooltip = AAT_nordic_cooperation.6.a
		}
	}
}


country_event = { # They Accepted the proposition 
	id = AAT_nordic_cooperation.5
	title = AAT_nordic_cooperation.5.t
	desc = AAT_nordic_cooperation.5.desc

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
		}
	}

	option = { # Nice
		name = AAT_nordic_cooperation.5.a
		ai_chance = {
			base = 10
		}
		trigger = {
		}
		add_offsite_building = {
			type = arms_factory
			level = 10.000
		}
	}
}


country_event = { # They Rejected
	id = AAT_nordic_cooperation.6
	title = AAT_nordic_cooperation.6.t
	desc = AAT_nordic_cooperation.6.desc

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
		}
	}

	option = { # Nice
		name = AAT_nordic_cooperation.6.a
		ai_chance = {
			base = 10
		}
		trigger = {
		}
		add_political_power = 250.000
	}
}

country_event = { # Asking if they want to cooperate    
	id = AAT_nordic_cooperation.7
	title = AAT_nordic_cooperation.7.t
	desc = AAT_nordic_cooperation.7.desc

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
		}
	}

	option = { # Sure why not
		name = AAT_nordic_cooperation.7.a
		ai_chance = {
			base = 10
		}
		trigger = {
		}
		add_timed_idea = {
			idea = NORDIC_economic_cooperation_ns
			days = 90
		}
		add_opinion_modifier = {
			target = FROM
			modifier = NORDIC_economic_cooperation
		}
		FROM = {
			add_timed_idea = {
				idea = NORDIC_economic_cooperation_ns
				days = 90
			}
			add_opinion_modifier = {
				target = PREV
				modifier = NORDIC_economic_cooperation
			}
		}
	}

	option = { # No 
		name = AAT_nordic_cooperation.7.b
		ai_chance = {
			base = 10
		}
		trigger = {
		}
	}
}

country_event = { # They Accepted the proposition 
	id = AAT_nordic_cooperation.8
	title = AAT_nordic_cooperation.8.t
	desc = AAT_nordic_cooperation.8.desc

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
		}
	}

	option = { # Nice
		name = AAT_nordic_cooperation.8.a
		ai_chance = {
			base = 10
		}
		trigger = {
		}
		FROM = {
			event_option_tooltip = AAT_nordic_cooperation.7.a
		}
	}
}


country_event = { # They Rejected
	id = AAT_nordic_cooperation.9
	title = AAT_nordic_cooperation.9.t
	desc = AAT_nordic_cooperation.9.desc

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
		}
	}

	option = { # Nice
		name = AAT_nordic_cooperation.9.a
		ai_chance = {
			base = 10
		}
		trigger = {
		}
	}
}