MTG_naval_treaties = {
	MTG_abandon_treaty_democratic = {

		icon = generic
	
		available = {
			OR = {
				threat > 0.2
				has_global_flag = MTG_second_london_conference
			}
		}
	
		cost = 150
		fire_only_once = yes
		ai_will_do = {
			base = 0
		}
	
		visible = {
			has_naval_treaty_trigger = yes
			OR = {
				has_government = democratic
				has_government = neutrality
			}
		}
	
		complete_effect = {
			remove_naval_treaty_effect = yes
			every_other_country = {
				limit = {
					has_naval_treaty_trigger = yes
				}
				country_event = MTG_naval_treaty.7
			}
			if = {
				limit = {
					has_global_flag = {
						flag = MTG_naval_treaty_signatories
						value < 3
					}
				}
				random_other_country = {
					limit = {
						has_naval_treaty_trigger = yes
					}
					remove_naval_treaty_effect = yes
				}
				clr_global_flag = MTG_naval_treaty_signatories
				hidden_effect = { news_event = mtg_news.60 }
			}
			if = {
				limit = {
					has_global_flag = MTG_naval_treaty_signatories
				}
				modify_global_flag = {
					flag = MTG_naval_treaty_signatories
					value = -1
				}
			}
			if = {
				limit = {
					not = {
						any_other_country = {
							OR = {
								has_idea = MTG_naval_treaty_cheating_reduced
								has_idea = MTG_naval_treaty_adherent_reduced
							}
						}
					}
				}
				every_other_country = {
					limit = {
						OR = {
							has_idea = MTG_naval_treaty_cheating
							has_idea = MTG_naval_treaty_adherent
						}
					}
					activate_mission = MTG_escalator_clause_invocation_mission
					custom_effect_tooltip = MTG_escalator_clause_tt
				}
			}
		}
	}

	MTG_abandon_treaty_fascist = {

		icon = generic
			
	
		available = {
			OR = {
				threat > 0.2
				has_global_flag = MTG_second_london_conference
			}
		}
	
		cost = 25
		fire_only_once = yes
		ai_will_do = {
			base = 1
			modifier = {
				OR = {
					tag = ITA
					tag = JAP
				}
				add = 3
			}
			modifier = {
				tag = USA
				has_civil_war = no
				add = 5
			}
			modifier = {
				tag = JAP
				is_historical_focus_on = yes
				add = 300
			}
			modifier = {
				tag = JAP
				is_historical_focus_on = yes
				date > 1937.03.01
				factor = 10
			}
		}
	
		visible = {
			has_naval_treaty_trigger = yes
			OR = {
				has_government = fascism
				has_government = communism
			}
		}
	
		complete_effect = {
			remove_naval_treaty_effect = yes
			every_other_country = {
				limit = {
					has_naval_treaty_trigger = yes
				}
				country_event = { id = MTG_naval_treaty.7 days = 2 }
			}
			if = {
				limit = {
					has_global_flag = {
						flag = MTG_naval_treaty_signatories
						value < 3
					}
				}
				random_other_country = {
					limit = {
						has_naval_treaty_trigger = yes
					}
					remove_naval_treaty_effect = yes
				}
				clr_global_flag = MTG_naval_treaty_signatories
				hidden_effect = { news_event = mtg_news.60 }
			}
			if = {
				limit = {
					has_global_flag = MTG_naval_treaty_signatories
				}
				modify_global_flag = {
					flag = MTG_naval_treaty_signatories
					value = -1
				}
			}
			if = {
				limit = {
					not = {
						any_other_country = {
							OR = {
								has_idea = MTG_naval_treaty_cheating_reduced
								has_idea = MTG_naval_treaty_adherent_reduced
							}
						}
					}
				}
				every_other_country = {
					limit = {
						OR = {
							has_idea = MTG_naval_treaty_cheating
							has_idea = MTG_naval_treaty_adherent
						}
					}
					activate_mission = MTG_escalator_clause_invocation_mission
					custom_effect_tooltip = MTG_escalator_clause_tt
				}
			}
		}
	}

	MTG_cheat_on_treaty = {

		icon = generic
			
	
		available = {
			
		}
	
		cost = 50
		fire_only_once = yes
		ai_will_do = {
			factor = 3
			modifier = {
				tag = JAP
				factor = 5 #The Yamato is a 35,000 ton ship what are you talking about
			}
		}
	
		visible = {
			OR = {
				has_idea = MTG_naval_treaty_adherent
				has_idea = MTG_naval_treaty_adherent_reduced
			}
			OR = {
				has_government = fascism
				has_government = communism
			}
		}
	
		complete_effect = {
			if = {
				limit = {
					has_idea = MTG_naval_treaty_adherent
				}
				swap_ideas = {
					remove_idea = MTG_naval_treaty_adherent
					add_idea = MTG_naval_treaty_cheating
				}
			}
			if = {
				limit = {
					has_idea = MTG_naval_treaty_adherent_reduced
				}
				swap_ideas = {
					remove_idea = MTG_naval_treaty_adherent_reduced
					add_idea = MTG_naval_treaty_cheating_reduced
				}
			}
		}
	}
	MTG_treaty_renew_mission = {

		icon = generic_naval	
		
		available = {
			hidden_trigger = {
				always = no
			}
		}
		days_mission_timeout = 120
		
		activation = {
			has_naval_treaty_trigger = yes
			has_global_flag = MTG_second_london_conference
		}

		visible = {
			has_naval_treaty_trigger = yes
		}
		timeout_effect = {
			clr_global_flag = MTG_second_london_conference 
		}
		complete_effect = {
			
		}
	}
	MTG_escalator_clause_invocation_mission = {

		icon = generic_naval	
		allowed = {
			always = no
		}
		available = {
			hidden_trigger = {
				always = no
			}
		}
		days_mission_timeout = 365
	
		visible = {
			has_naval_treaty_trigger = yes
		}
		timeout_effect = {
			if = {
				limit = {
					has_idea = MTG_naval_treaty_adherent
				}
				swap_ideas = {
					remove_idea = MTG_naval_treaty_adherent
					add_idea = MTG_naval_treaty_adherent_reduced
				}
			}
			else_if = {
				limit = {
					has_idea = MTG_naval_treaty_cheating
				}
				swap_ideas = {
					remove_idea = MTG_naval_treaty_cheating
					add_idea = MTG_naval_treaty_cheating_reduced
				}
			}
		}
		complete_effect = {
			
		}
	}
}
