﻿add_namespace = wtt_britain 

#IRE gets choice; trade northern ireland in return for joining the alliance?
country_event = {
	id = wtt_britain.24
	title = wtt_britain.24.t
	desc = wtt_britain.24.d
	picture = GFX_report_event_generic_parliament

	is_triggered_only = yes
	
	#accept
	option = {
		ai_chance = {
			factor = 80
			modifier = {
				has_government = fascism
				factor = 0
			}
			modifier = {
				is_historical_focus_on = yes
				factor = 0
			}
		}
		name = wtt_britain.24.a
		IRE = { transfer_state = 119 }
		ENG = { add_to_faction = IRE }
		ENG = { country_event = { id = wtt_britain.28 } }
	}
	#decline
	option = {
		name = wtt_britain.24.b
		ENG = { country_event = { id = wtt_britain.29 } }
	}
}

#Mers-El-Kebir Raid: France gets choice; transfer fleet or lose a portion
country_event = {
	id = wtt_britain.25
	title = wtt_britain.25.t
	desc = wtt_britain.25.d
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes
	
	#accept
	option = {
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				has_opinion = { target = ENG value < -99 }
			}
			modifier = {
				factor = 1.5
				has_opinion = { target = ENG value > -50 }
			}
			modifier = {
				factor = 1.5
				has_opinion = { target = ENG value > -25 }
			}
			modifier = {
				factor = 2
				has_opinion = { target = ENG value > 0 }
			}
		}
		name = wtt_britain.25.a
		ENG = { country_event = { id = wtt_britain.26 } }
		hidden_effect = {
			news_event = { id = news.332 days = 1 }
		}
		transfer_navy = { target = ENG }
	}
	#decline
	option = {
		ai_chance = {
			factor = 90
		}
		name = wtt_britain.25.b
		ENG = { country_event = { id = wtt_britain.27 } }
	}
}

#Mers-El-Kebir Raid: Notification event for French accepted
country_event = {
	id = wtt_britain.26
	title = wtt_britain.26.t
	desc = wtt_britain.26.d
	picture = GFX_report_event_generic_sign_treaty1

	is_triggered_only = yes
	
	#excellent
	option = {
		name = wtt_britain.26.a
	}
}

#Mers-El-Kebir Raid: British informed of rejection; choice of going through with bombardment or not
country_event = {
	id = wtt_britain.27
	title = wtt_britain.27.t
	desc = wtt_britain.27.d
	picture = GFX_report_event_generic_sign_treaty1

	is_triggered_only = yes
	
	#bombard!
	option = {
		ai_chance = {
			factor = 85
		}
		name = wtt_britain.27.a
		add_popularity = { ideology = democratic popularity = -0.05 }
		add_war_support = 0.05
		random_other_country = {
			limit = {
				original_tag = FRA
				has_government = fascism
			}
			add_war_support = 0.05
			add_opinion_modifier = {
				target = ROOT
				modifier = FRA_mers_el_kebir
			}
		}
		if = {
			limit = {
				GER = { has_government = fascism }
			}
			GER = { add_popularity = { ideology = fascism popularity = 0.05 } }
		}
		if = {
			limit = {
				GER = { has_government = neutrality }
			}
			GER = { add_popularity = { ideology = neutrality popularity = 0.05 } }
		}
		USA = { set_country_flag = mers_el_kebir_raid }
		hidden_effect = {
			news_event = { id = news.333 days = 1 }
		}
		random_list = {
			60 = {
				random_other_country = {
					limit = {
						original_tag = FRA
						has_government = fascism
					}
					destroy_ships = {
						type = nrm_ship_hull_destroyer
						count = 1
					}
					destroy_ships = {
						type = nrm_ship_hull_capital
						count = 1
					}
				}
			}
			30 = {
				random_other_country = {
					limit = {
						original_tag = FRA
						has_government = fascism
					}
					destroy_ships = {
						type = nrm_ship_hull_destroyer
						count = 2
					}
					destroy_ships = {
						type = nrm_ship_hull_capital
						count = 2
					}
				}
			}
			10 = {
				random_other_country = {
					limit = {
						original_tag = FRA
						has_government = fascism
					}
					destroy_ships = {
						type = nrm_ship_hull_destroyer
						count = 4
					}
					destroy_ships = {
						type = nrm_ship_hull_capital
						count = 3
					}
				}
			}
		}
	}
	#let it go
	option = {
		ai_chance = {
			factor = 15
			modifier = {
				factor = 0
				FROM = { has_opinion = { target = ENG value < -99 } }
			}
			modifier = {
				factor = 1.5
				FROM = { has_opinion = { target = ENG value > -50 } }
			}
			modifier = {
				factor = 1.5
				FROM = { has_opinion = { target = ENG value > -25 } }
			}
			modifier = {
				factor = 2
				FROM = { has_opinion = { target = ENG value > 0 } }
			}
		}
		name = wtt_britain.27.b
		add_war_support = -0.05
	}
}

#MacDonald Proposal - Ireland Accepts
country_event = {
	id = wtt_britain.28
	title = wtt_britain.28.t
	desc = wtt_britain.28.d
	picture = GFX_report_event_generic_sign_treaty3

	is_triggered_only = yes
	
	#excellent
	option = {
		name = excellent
	}
}

#MacDonald Proposal - Ireland Rejects Offer
country_event = {
	id = wtt_britain.29
	title = wtt_britain.29.t
	desc = wtt_britain.29.d
	picture = GFX_report_event_generic_sign_treaty3

	is_triggered_only = yes
	
	#Damn
	option = {
		name = wtt_britain.29.a
	}
}

# Emergency Arms Deliveries
country_event = {
	id = wtt_britain.30
	title = wtt_britain.30.t
	desc = wtt_britain.30.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = yes
	
	#Praise the Americans!
	option = {
		name = wtt_britain.30.a
		effect_tooltip = {
			add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 20000 producer = USA }
			add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 250 producer = USA }
			add_equipment_to_stockpile = { type = support_equipment_1 amount = 250 producer = USA }
		}
	}
}

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

add_namespace = wtt_britain_lease_azores

# England request lease of Azore from POR
country_event = {
	id = wtt_britain_lease_azores.1
	title = wtt_britain_lease_azores.1.t
	desc = wtt_britain_lease_azores.1.desc
	picture = GFX_report_event_degaulle_churchill

	is_triggered_only = yes
	
	#Accept lease
	option = {
		name = wtt_britain_lease_azores.1.a
		ai_chance = {
			base = 10
		}
		FROM = {
			set_country_flag = wtt_britain_lease_azores_accepted
			transfer_state = 698
			country_event = { id = wtt_britain_lease_azores.2 }
		}
	}

	#Never
	option = {
		name = wtt_britain_lease_azores.1.b
		ai_chance = {
			base = 0
		}
		FROM = {
			country_event = { id = wtt_britain_lease_azores.3 }
		}
	}
}

# Answer from POR - yes
country_event = {
	id = wtt_britain_lease_azores.2
	title = wtt_britain_lease_azores.2.t
	desc = wtt_britain_lease_azores.2.desc
	picture = GFX_report_event_usa_heavy_cruiser

	is_triggered_only = yes
	
	option = {
		name = wtt_britain_lease_azores.2.a
	}
}


# Answer from POR - no
country_event = {
	id = wtt_britain_lease_azores.3
	title = wtt_britain_lease_azores.3.t
	desc = wtt_britain_lease_azores.3.desc
	picture = GFX_report_event_french_british_officers

	is_triggered_only = yes
	
	option = {
		name = wtt_britain_lease_azores.3.a
		add_opinion_modifier = { target = FROM modifier = POR_rejected_lease }
	}
}

# Was is over - Give control back to POR
country_event = {
	id = wtt_britain_lease_azores.4
	title = wtt_britain_lease_azores.4.t
	desc = wtt_britain_lease_azores.4.desc
	picture = GFX_report_event_ast_navy

	trigger = {
		has_country_flag = wtt_britain_lease_azores_accepted
		has_war = no
	}

	mean_time_to_happen = { days = 2 }

	fire_only_once = yes
	
	option = {
		name = wtt_britain_lease_azores.4.a
		POR = {
			transfer_state = 698
			country_event = wtt_britain_lease_azores.5
		}
	}
}

country_event = {
	id = wtt_britain_lease_azores.5
	title = wtt_britain_lease_azores.5.t
	desc = wtt_britain_lease_azores.5.desc
	picture = GFX_report_event_ast_navy

	is_triggered_only = yes
	
	option = {
		name = wtt_britain_lease_azores.5.a		
	}
}