﻿add_namespace = britain 

# Tizard mission event for USA
country_event = {
	id = britain.1
	title = britain.1.t
	desc = britain.1.d
	picture = GFX_report_event_physics_lab_01
	
	is_triggered_only = yes
	
	option = {
		name = britain.1.a	#sounds good
		ai_chance = { factor = 90 }
		add_political_power = -10
		ENG = {
			country_event = { days = 1 id = britain.2 }
			add_opinion_modifier = {
				target = ROOT
				modifier = tizard_relations
			}
		}
		add_tech_bonus = {
			name = tizard_mission_focus
			uses = 1
			bonus = 0.5
			category = light_fighter
		}
		add_tech_bonus = {
			name = tizard_mission_focus
			bonus = 0.5
			uses = 2
			category = radar_tech
		}
	}
	
	option = {
		name = britain.1.b	#no way 
		ai_chance = { factor = 10 }
		#add_opinion_modifier = { target = ENG modifier = tizard_refused }
		ENG = {
			country_event = { days = 1 id = britain.3 }
		}
	}
}

# USA helps
country_event = {
	id = britain.2
	title = britain.2.t
	desc = britain.2.d
	picture = GFX_report_event_physics_lab_02

	is_triggered_only = yes
	
	option = {
		name = britain.2.a
		add_tech_bonus = {
			name = tizard_mission_focus
			bonus = 0.5
			category = light_fighter
		}
		add_tech_bonus = {
			name = tizard_mission_focus
			bonus = 0.5
			uses = 2
			category = radar_tech
		}
		USA = {
			add_opinion_modifier = { target = ENG modifier = tizard_relations }
		}
	}
}

# USA says no
country_event = {
	id = britain.3
	title = britain.3.t
	desc = britain.3.d
	picture = GFX_report_event_physics_lab_01

	is_triggered_only = yes
	
	option = {
		name = britain.3.a
		add_opinion_modifier = { target = USA modifier = tizard_refused }
	}
}

# Burma road china
country_event = {
	id = britain.4
	title = britain.4.t
	desc = britain.4.d
	picture = GFX_report_event_burma_road

	is_triggered_only = yes
	
	option = {
		name = britain.4.a
	}
}

# Burma road yunnan
country_event = {
	id = britain.5
	title = britain.4.t
	desc = britain.4.d
	picture = GFX_report_event_burma_road

	is_triggered_only = yes
	
	option = {
		name = britain.4.a
	}
}

#Time for India to be free
country_event = {
	id = britain.6
	title = britain.6.t
	desc = britain.6.d
	picture = GFX_report_event_ghandi_women

	trigger = {
		tag = ENG
		has_global_flag = indian_independence_promised
		NOT = { has_idea = indian_independence_promised_idea }
		RAJ = { is_puppet_of = ENG }
	}
	
	mean_time_to_happen = {
		days = 30
	}
	
	option = {
		name = britain.6.a
		end_puppet = RAJ
	}
	option = {
		name = britain.6.b
		RAJ = {
			add_national_unity = -0.30
		}
	}
}

#End trade with Germany event for SWE/NOR
country_event = {
	id = britain.7
	title = britain.7.t
	desc = britain.7.d
	picture = GFX_report_event_merchant_ship_01

	is_triggered_only = yes

	
	option = {
		name = britain.7.a
		ai_chance = { factor = 60 }
		GER = {
				add_opinion_modifier = { target = ROOT modifier = embargo } 
			}
	}
	option = {
		name = britain.7.b
		ai_chance = { factor = 40 }
		ENG = {
			country_event = britain.8
		}
	}
}

country_event = {
	id = britain.8
	title = britain.8.t
	desc = britain.8.d
	picture = GFX_report_event_merchant_ship_01

	is_triggered_only = yes
	
	option = {
		name = britain.8.a
		ai_chance = { factor = 70 }
		create_wargoal = {
				type = take_state
				target = FROM
				generator = owned_states
			}
		if = {
			limit = {
				USA = {
					NOT = {
						has_opinion_modifier = unprovoked_aggression
					}
				}
			}
			USA = {
				add_opinion_modifier = { target = ROOT modifier = unprovoked_aggression }
			}
		}
	}
	option = {
		name = britain.8.b
		ai_chance = { factor = 30 }
	}
}

# Chamberlain Resigns
country_event = {
	id = britain.9
	title = britain.9.t
	desc = britain.9.d
	picture = GFX_report_event_chamberlain

	fire_only_once = yes

	trigger = {
		tag = ENG
		has_war = yes
		NOT = {
			has_completed_focus = uk_scandinavian_focus
		}
		OR = {
			has_global_flag = fall_of_france
			surrender_progress > 0.5
			AND = {
				110 = { is_controlled_by = GER }
				NOT = { is_in_faction_with = GER }
			}
		}
	}

	mean_time_to_happen = {
		days = 40
	}
	
	option = {
		name = britain.9.a
		retire_country_leader = yes
		add_national_unity = 0.1
		set_country_flag = chamberlain_resigned
	}
}


# Chamberlain Passes Away
country_event = {
	id = britain.10
	title = britain.10.t
	desc = britain.10.d
	picture = GFX_report_event_chamberlain

	fire_only_once = yes

	trigger = {
		tag = ENG
		has_government = democratic
		date > 1940.9.11
		NOT = { has_country_flag = chamberlain_resigned }
	}

	mean_time_to_happen = {
		days = 30
	}
	
	option = {
		name = britain.10.a
		kill_country_leader = yes
	}
	option = {
		name = britain.10.b
		kill_country_leader = yes
		create_country_leader = {
			name = "Lord Edward Halifax"
			desc = "POLITICS_EDWARD_HALIFAX_DESC"
			picture = "Portrait_Britain_Edward_Halifax.dds"
			expire = "1965.1.1"
			ideology = conservatism
			traits = {
				
			}
		}
	}
}

# React to Rise of the CommieNazis 
country_event = {
	id = britain.11
	title = britain.11.t
	desc = britain.11.d
	picture = GFX_report_event_molotov_ribentrop_handshake

	is_triggered_only = yes
	trigger = {
		is_faction_leader = yes
	}
	
	option = {
		name = britain.11.a
		every_country = {
				limit = {
					NOT = { tag = ENG }
					NOT = { has_war_with = ENG }
					is_in_faction = no
					has_government = democratic
					is_puppet = no
					OR = {
						capital_scope = {
								is_on_continent = europe
						}
						capital_scope = {
								is_on_continent = asia
						}
						num_of_factories > 30
					}
				}
				country_event = britain.12
			}
	}
	
	option = {
		name = britain.11.b
		ai_chance = { factor = 0 }
	}
}

# React to British call
country_event = {
	id = britain.12
	title = britain.12.t
	desc = britain.12.d
	picture = GFX_report_event_molotov_ribentrop_handshake

	is_triggered_only = yes
	
	option = {
		name = britain.12.a
		ENG = { add_to_faction = ROOT }
		ROOT = {
			add_ai_strategy = {
				type = alliance
				id = "ENG"
				value = 200
			}
		}
	}
	
	option = {
		name = britain.12.b
		ai_chance = { factor = 0 }
	}
}

# France wants to join allies
country_event = {
	id = britain.13
	title = britain.13.t
	desc = britain.13.d
	picture = GFX_report_event_degaulle_churchill

	is_triggered_only = yes
	
	option = {
		name = britain.13.a
		add_to_faction = FROM
		FROM = {
			add_ai_strategy = {
				type = alliance
				id = "ENG"
				value = 200
			}
		}
		FROM = { country_event = { id = france.29} }
		hidden_effect = {
			news_event = { id = news.175 }
		}
	}
	
	option = {
		name = britain.13.b
		ai_chance = { factor = 0 }
		FROM = { 
			add_opinion_modifier = {
				target = ROOT
				modifier = FRA_go_with_britain_reject
			}
			country_event = { id = france.30 }
		}
		hidden_effect = {
			news_event = { id = news.176 }
		}
	}
}

# Germany demands Slovenia from Yugoslavia
country_event = {
	id = britain.14
	title = britain.14.t
	desc = britain.14.d
	picture = GFX_report_event_hitler_croatia_handshake

	is_triggered_only = yes
	
	option = { # Abandon Yugoalvia
		name = britain.14.a
		ai_chance = { factor = 90 }
		FRA = { country_event = { id = france.25 hours = 2 } }
		YUG = {
			add_opinion_modifier = { target = ENG modifier = western_betrayal }
		}		
	}
	
	option = { # Support Yugoslavia
		name = britain.14.b
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				is_in_faction_with = GER
			}
		}
		if = {
			limit = {
				is_in_faction_with = GER
				is_faction_leader = yes
			}
			remove_from_faction = GER
		}
		if = {
			limit = {
				is_in_faction_with = GER
				is_faction_leader = no
			}
			GER = { remove_from_faction = ENG }
		}
		add_political_power = -200
		add_opinion_modifier = { target = GER modifier = condemn_aggression }
		effect_tooltip = {
			GER = {
				create_wargoal = {
					type = take_state_focus
					target = YUG
					generator = { 102 }
				}
			}
		}
		add_to_faction = YUG
		YUG = {
			add_ai_strategy = {
				type = alliance
				id = "ENG"
				value = 200
			}
		}
		if = {
			limit = {
				FRA = {
					is_puppet = no
					NOT = { has_war_with = YUG }
				}
			}
			FRA = { country_event = { id = france.26 hours = 2 } }
		}
		YUG = {
			add_opinion_modifier = { target = ENG modifier = offered_support }
		}
	}	
}

# France leaves the Allies
country_event = {
	id = britain.15
	title = britain.15.t
	desc = britain.15.d
	picture = GFX_report_event_french_british_officers
	
	is_triggered_only = yes
	
	option = {
		name = britain.15.a
		FRA = {
			add_opinion_modifier = { target = ENG modifier = abandoned_yugoslavia }
		}
	}
}

# King dies
country_event = {
	id = britain.16
	title = britain.16.t
	desc = britain.16.d
	picture = GFX_report_event_europe_funeral
	
	trigger = {
		tag = ENG
		date > 1936.1.19
		has_start_date < 1936.01.02
	}	

	fire_only_once = yes

	mean_time_to_happen = { days = 7 }

	immediate = {
		hidden_effect = {
			set_country_flag = ENG_king_died
			remove_ideas = george_v
			add_ideas = ENG_king_edward
		}		
	}
	
	option = {
		name = britain.16.a
		effect_tooltip = {
			remove_ideas = george_v		
			add_ideas = ENG_king_edward
		}
	}
}

# King abdicates
country_event = {
	id = britain.17
	title = britain.17.t
	desc = britain.17.d
	picture = GFX_report_event_generic_sign_treaty2
	
	trigger = {
		tag = ENG
		has_country_flag = ENG_king_died
		date > 1936.12.1
	}
	
	fire_only_once = yes

	mean_time_to_happen = { days = 14 }
	
	immediate = {
		hidden_effect = {
			remove_ideas = ENG_king_edward
			add_ideas = ENG_george_vi		
		}
	}

	option = {
		name = britain.17.a
		effect_tooltip = {
			remove_ideas = ENG_king_edward
			add_ideas = ENG_george_vi		
		}
	}
}

# Return of the Nazi King
country_event = {
	id = britain.18
	title = britain.18.t
	desc = britain.18.d
	picture = GFX_report_event_fascist_gathering
	
	trigger = {
		tag = ENG
		has_idea = ENG_george_vi
		has_government = fascism
	}
	
	fire_only_once = yes

	mean_time_to_happen = { days = 14 }
	
	immediate = {
		hidden_effect = {
			remove_ideas = ENG_george_vi		
		}
	}

	option = {
		name = britain.18.a
		effect_tooltip = {
			remove_ideas = ENG_george_vi	
		}
		create_country_leader = {
			name = "Edward VIII"
			desc = "POLITICS_EDWARD_EDWARD_DESC"
			picture = "Portrait_Britain_Edward_VIII.dds"
			expire = "1965.1.1"
			ideology = fascism_ideology
			traits = {
				inexperienced_imperialist				
			}
		}
	}

	option = {
		name = britain.18.b	
		effect_tooltip = {
			remove_ideas = ENG_george_vi	
		}
		add_ideas = ENG_king_edward_fascism
	}
}

#Britain receives warning of the Indian National Army
country_event = {
	id = britain.19
	title = britain.19.t
	desc = britain.19.d
	picture = GFX_report_event_indian_soldiers

	is_triggered_only = yes

	option = {
		name = britain.19.a
		effect_tooltip = {
			RAJ = {
				add_ideas = RAJ_azad_hind
			}
		}
		custom_effect_tooltip = ENG_RAJ_azad_hind_tooltip 
		hidden_effect = {
			country_event = { id = britain.20 days = 500  random = 100 }
		}
	}
}


#Free India Government Leads Revolt
country_event = {
	id = britain.20
	title = britain.20.t
	desc = britain.20.d
	picture = GFX_report_event_indian_soldiers

	is_triggered_only = yes

	trigger = {
		NOT = {
			has_completed_focus = uk_free_india_focus
		}
		RAJ = {
			is_puppet_of = ENG
			fascism > 0.3
			has_civil_war = no
		}
	}

	option = {
		name = britain.20.a
		hidden_effect = {
			if = {
				limit = {
					RAJ = {
						has_idea = RAJ_azad_hind
					}
				}
				RAJ = {
					remove_ideas = RAJ_azad_hind
				}
			}
		}
		if = {
			limit = {
				NOT = {
					RAJ = {
						has_government = fascism
					}
				}
			}
			RAJ = {
				start_civil_war = {
					ideology = fascism
					size = 0.5
				}
			}
		}
		if = {
			limit = {
				RAJ = {
					has_government = fascism
				}
			}
			end_puppet = RAJ
			if = {
				limit = {
					RAJ = {
						is_in_faction_with = ENG
					}
				}
				remove_from_faction = RAJ
			}
			create_wargoal = {
				type = puppet_wargoal_focus
				target = RAJ
			}
		}
	}
}

country_event = {
	id = britain.6970
	title = britain.6970.t
	desc = britain.6970.d 
	picture = GFX_report_generic_sign_treaty2
	is_triggered_only = yes

	option = {
		name = britain.6970.a
		ENG = { add_to_faction = YUG }
		YUG = {
			add_ai_strategy = {
				type = alliance
				id = "ENG"
				value = 200
			}
		}

		hidden_effect = {
			news_event = { hours = 6 id = news.6970 }
		}
	}

	option = {
		name = britain.6970.b
		ai_chance = { factor = 0 }
	}
}