﻿###########################
# Canadian TFV events Events
###########################

add_namespace = tfv_canada
add_namespace = canada_vanilla

# Completed CAN_north_american_alliance.
# Canadian national focus.
country_event = {
	id = tfv_canada.1
	title = tfv_canada.1.t	# Canada asks US to create a faction.
	desc = tfv_canada.1.d	#
	picture = GFX_report_event_canada_patriation
	
	is_triggered_only = yes
	
	option = {
		name = tfv_canada.1.a # US Accepts the faction proposal
		
		ai_chance = {
			base = 100
		}
		
		effect_tooltip = {
			create_faction = "north_american_alliance"
			add_to_faction = CAN
		}
		hidden_effect = {
			CAN = {
				country_event = { id = tfv_canada.2 }
			}
		}
	}
	
	option = {
		name = tfv_canada.1.b # US Rejects the faction proposal
	
		ai_chance = {
			base = 0
		}
		
		hidden_effect = {
			CAN = {
				country_event = { id = tfv_canada.3 }
			}
		}
	}
}

country_event = {
	id = tfv_canada.2
	title = tfv_canada.2.t	#
	desc = tfv_canada.2.d	#
	picture = GFX_report_event_canadian_soldiers
	
	is_triggered_only = yes
	
	option = {
		name = tfv_canada.2.a
		
		USA = {
			create_faction = "north_american_alliance"
			add_to_faction = CAN
		}
		
		news_event = { id = news.246 hours = 6 }
	}
}

country_event = {
	id = tfv_canada.3
	title = tfv_canada.3.t	#
	desc = tfv_canada.3.d	#
	picture = GFX_report_event_king_speech
	
	is_triggered_only = yes
	
	option = {
		name = tfv_canada.3.a
	}
}

# Completed CAN_join_comintern.
# Canadian national focus.
country_event = {
	id = tfv_canada.10
	title = tfv_canada.10.t	# Canada asks CCCP for membership in Comintern
	desc = tfv_canada.10.d	#
	picture = GFX_report_event_stalin_meeting
	
	is_triggered_only = yes
	
	option = {
		name = tfv_canada.10.a # CCCP accepts Canadian membership
		
		ai_chance = {
			base = 100
		}
		
		effect_tooltip = {
			add_to_faction = CAN
		}
		
		hidden_effect = {
			CAN = {
				country_event = { id = tfv_canada.11 }
			}
		}
	}
	
	option = {
		name = tfv_canada.10.b # CCCP denies the request.
		
		ai_chance = {
			base = 0
		}
		
		hidden_effect = {
			CAN = {
				country_event = { id = tfv_canada.12 }
			}
		}
	}
}

country_event = {
	id = tfv_canada.11
	title = tfv_canada.11.t	#
	desc = tfv_canada.11.d	#
	picture = GFX_report_event_canadian_soldiers
	
	is_triggered_only = yes
	
	option = {
		name = tfv_canada.11.a
		SOV = {
			add_to_faction = CAN
		}
	}
}

country_event = {
	id = tfv_canada.12
	title = tfv_canada.12.t	#
	desc = tfv_canada.12.d	#
	picture = GFX_report_event_generic_rally_3
	
	is_triggered_only = yes
	
	option = {
		name = tfv_canada.12.a
	}
}

# Completed CAN_join_germany.
# Canadian national focus.
country_event = {
	id = tfv_canada.20
	title = tfv_canada.20.t	# Canada asks Germany for membership in Axis
	desc = tfv_canada.20.d	#
	picture = GFX_report_event_canadian_tank
	
	is_triggered_only = yes
	
	option = {
		name = tfv_canada.20.a # Germany accepts Canadian membership
		
		ai_chance = {
			base = 100
		}
		
		effect_tooltip = {
			add_to_faction = CAN
		}
		
		hidden_effect = {
			CAN = {
				country_event = { id = tfv_canada.21 }
			}
		}
	}
	
	option = {
		name = tfv_canada.20.b # Germany rejects Canadian membership
		
		ai_chance = {
			base = 0
		}
		
		hidden_effect = {
			CAN = {
				country_event = { id = tfv_canada.22 }
			}
		}
	}
}

country_event = {
	id = tfv_canada.21
	title = tfv_canada.21.t	# 
	desc = tfv_canada.21.d	#
	picture = [GetHitlerHandshakeEventPicture]
	
	is_triggered_only = yes
	
	option = {
		name = tfv_canada.21.a # Germany accepts Canadian membership
		
		GER = {
			add_to_faction = CAN
		}
		if = {
			limit = {
				GER = {
					has_war = yes
				}
			}
			news_event = { id = news.247 hours = 6 }		
		}
		if = {
			limit = {
				GER = {
					has_war = no
				}
			}
			news_event = { id = news.252 hours = 6 }
		}
	}
}

country_event = {
	id = tfv_canada.22
	title = tfv_canada.22.t	# 
	desc = tfv_canada.22.d	#
	picture = GFX_report_event_canadian_artillery
	
	is_triggered_only = yes
	
	option = {
		name = tfv_canada.22.a # Germany rejects Canadian membership
	}
}

# Completed CAN_support_a_synarchist_baja.
# Canadian national focus.
country_event = {
	id = tfv_canada.30
	title = tfv_canada.30.t	# Mexican civil war starts.
	desc = tfv_canada.30.d	#
	picture = GFX_report_event_mex_civil_war
	
	fire_only_once = yes

	trigger = {
		original_tag = MEX
		has_defensive_war = no
		NOT = { has_government = fascism }
		has_idea = synarchist_support_surge
		fascism > 0.3
	}

	mean_time_to_happen = {
		months = 4
		modifier = {
			factor = 0.5
			fascism > 0.5			
		}
	}
	
	option = { # Support Nationalists
		name = tfv_canada.30.a
		trigger = { is_ai = no }
		hidden_effect = {
			start_civil_war = {
				ruling_party = fascism
				ideology = neutrality
				size = 0.5
			}
			random_other_country = {
				limit = {
					original_tag = MEX
					has_government = neutrality
				}
				set_equipment_fraction = 0.3
				set_stability = 0.9
				set_war_support = 0.8
				add_popularity = {
					ideology = democratic
					popularity = 0.35
				}
			}
			news_event = { hours = 6 id = news.250 }
			
			set_equipment_fraction = 0.3
			set_stability = 0.9
			set_war_support = 0.8
			
			add_popularity = {
				ideology = fascism
				popularity = 1
			}
			
			remove_ideas = synarchist_support_surge
		}
		custom_effect_tooltip = mex_nationalists_chosen
	}
	option = { # Support Republicans
		name = tfv_canada.30.b
		hidden_effect = {
			start_civil_war = {
				ideology = fascism
				size = 0.5
			}
			random_other_country = {
				limit = {
					original_tag = MEX
					has_government = fascism
				}
				set_equipment_fraction = 0.3
				set_stability = 0.9
				set_war_support = 0.8
			}
			news_event = { hours = 6 id = news.250 }
			
			set_politics = {
				ruling_party = neutrality
				elections_allowed = no
			}
			add_popularity = {
				ideology = neutrality
				popularity = 0.5
			}
			add_popularity = {
				ideology = fascism
				popularity = -1
			}
			set_equipment_fraction = 0.3
			set_stability = 0.9
			set_war_support = 0.8
			
			remove_ideas = synarchist_support_surge
		}
		custom_effect_tooltip = mex_republicans_chosen
	}
	
	option = {
		name = tfv_canada.30.c # Peacefully let the fascists form the government
		
		trigger = {
			fascism > 0.5
		}
		
		ai_chance = {
			base = 5
		}
		
		set_politics = {
			ruling_party = fascism
			elections_allowed = no
		}
		remove_ideas = synarchist_support_surge
		add_ideas = shattered_government
	}
}

# Completed CAN_skewer_the_eagle.
# Canadian national focus.
country_event = {
	id = tfv_canada.40
	title = tfv_canada.40.t # Canada proposes alliance with Mexico to surround the US.
	desc = tfv_canada.40.d	#
	picture = GFX_report_event_canadian_artillery
	
	is_triggered_only = yes
	
	option = {
		name = tfv_canada.40.a
		
		ai_chance = {
			base = 100
		}
		
		effect_tooltip = {
			CAN = {
				create_faction = "northern_sovereignty_coalition"
				random_country = {
					limit = {
						original_tag = MEX
						has_government = fascism
					}
					CAN = { add_to_faction = PREV }
				}
			}
			add_state_claim = 375 # Texas
			add_state_claim = 378 # California
			add_state_claim = 379 # Nevada
			add_state_claim = 377 # Arizona
			add_state_claim = 380 # Utah
			add_state_claim = 382 # Colorado
			add_state_claim = 376 # New Mexico
		}
		
		hidden_effect = {
			CAN = {
				country_event = { id = tfv_canada.41 }
			}
		}
	}
	
	option = {
		name = tfv_canada.40.b
	
		ai_chance = {
			base = 0
		}
	
		hidden_effect = {
			CAN = {
				country_event = { id = tfv_canada.42 }
			}
		}
	}
}

country_event = {
	id = tfv_canada.41
	title = tfv_canada.41.t
	desc = tfv_canada.41.d
	picture = GFX_report_event_military_planning
	
	is_triggered_only = yes
	
	option = {
		name = tfv_canada.41.a
		
		create_faction = "northern_sovereignty_coalition"
		random_country = {
			limit = {
				original_tag = MEX
				has_government = fascism
			}
			CAN = { add_to_faction = PREV }
		}
		
		MEX = {
			add_state_claim = 375 # Texas
			add_state_claim = 378 # California
			add_state_claim = 379 # Nevada
			add_state_claim = 377 # Arizona
			add_state_claim = 380 # Utah
			add_state_claim = 382 # Colorado
			add_state_claim = 376 # New Mexico
		}
		hidden_effect = {
			news_event = { id = news.249 hours = 6 }
		}
	}
}

country_event = {
	id = tfv_canada.42
	title = tfv_canada.42.t
	desc = tfv_canada.42.desc
	picture = GFX_report_event_american_hunger_march
	
	is_triggered_only = yes
	
	option = {
		name = tfv_canada.42.a
		
	}
}



# mean_time_to_happen after Completion of CAN_forced_quebec_conscription.
# Canadian national focus.
country_event = {
	id = tfv_canada.50
	title = tfv_canada.50.t	# Factory sabotaged
	desc = tfv_canada.50.d	#
	picture = GFX_report_event_generic_factory
	
	fire_only_once = yes
	
	trigger = {
		tag = CAN
		has_completed_focus = CAN_forced_quebec_conscription
		any_owned_state = {
			industrial_complex > 0
		}
	}
	
	mean_time_to_happen = {
		months = 3
	}
	
	option = {
		name = tfv_canada.50.a
		set_country_flag = can_quebec_sabotage_1
		
		random_owned_state = {
			limit = {
				industrial_complex > 0
			}
			damage_building = {
				type = industrial_complex
				damage = 0.7
			}
		}
	}
}

country_event = {
	id = tfv_canada.51
	title = tfv_canada.51.t
	desc = tfv_canada.51.d
	picture = GFX_report_event_generic_factory
	
	fire_only_once = yes
	
	trigger = {
		tag = CAN
		has_country_flag = can_quebec_sabotage_1
		has_completed_focus = CAN_forced_quebec_conscription
		any_owned_state = {
			arms_factory > 0
		}
	}
	
	mean_time_to_happen = {
		months = 3
	}
	
	option = {
		name = tfv_canada.51.a
		set_country_flag = can_quebec_sabotage_2
		random_owned_state = {
			limit = {
				arms_factory > 0
			}
			damage_building = {
				type = arms_factory
				damage = 0.5
			}
		}
	}
}

country_event = {
	id = tfv_canada.52
	title = tfv_canada.52.t
	desc = tfv_canada.52.d
	picture = GFX_report_event_generic_factory
	
	fire_only_once = yes
	
	trigger = {
		tag = CAN
		has_country_flag = can_quebec_sabotage_2
		has_completed_focus = CAN_forced_quebec_conscription
		any_owned_state = {
			arms_factory > 0
		}
	}
	
	mean_time_to_happen = {
		months = 3
	}
	
	option = {
		name = tfv_canada.52.a
		set_country_flag = can_quebec_sabotage_3
		random_owned_state = {
			limit = {
				arms_factory > 0
			}
			damage_building = {
				type = arms_factory
				damage = 0.6
			}
		}
	}
}

country_event = {
	id = tfv_canada.53
	title = tfv_canada.53.t
	desc = tfv_canada.53.d
	picture = GFX_report_event_RCMP
	
	fire_only_once = yes
	
	trigger = {
		tag = CAN
		has_country_flag = can_quebec_sabotage_3
		has_completed_focus = CAN_forced_quebec_conscription
		any_owned_state = {
			arms_factory > 0
		}
	}
	
	mean_time_to_happen = {
		months = 2
	}
	
	option = {
		name = tfv_canada.53.a
		clr_country_flag = can_quebec_sabotage_1
		clr_country_flag = can_quebec_sabotage_2
		clr_country_flag = can_quebec_sabotage_3
		random_owned_state = {
			limit = {
				arms_factory > 0
			}
			damage_building = {
				type = arms_factory
				damage = 0.4
			}
		}
	}
}

# Completed CAN_demand_labrador_and_newfoundland.
# Canadian national focus.
country_event = {
	id = tfv_canada.60
	title = tfv_canada.60.t # Fascist CAN demads Labrador and Newfoundland from ENG
	desc = tfv_canada.60.d	#
	picture = GFX_report_event_canadian_soldiers
	
	is_triggered_only = yes
	
	option = { # Agree to demands
		name = tfv_canada.60.a
		
		ai_chance = {
			base = 10
		}
		
		effect_tooltip = {
			CAN = {
				transfer_state = 331
				transfer_state = 332
			}
		}
		
		hidden_effect = {
			CAN = {
				country_event = { id = tfv_canada.61 }
			}
		}
	}
	
	option = { # Refuse
		name = tfv_canada.60.b
		
		ai_chance = {
			base = 90
			modifier = {
				factor = 0.25
				surrender_progress > 0.25
			}
			modifier = {
				factor = 0.5
				CAN = { has_same_ideology = yes }
			}
		}
		
		hidden_effect = {
			CAN = {
				country_event = { id = tfv_canada.62 }
			}
		}
	}
}

country_event = {
	id = tfv_canada.61
	title = tfv_canada.61.t
	desc = tfv_canada.61.d
	picture = GFX_report_event_canada_treaty
	
	is_triggered_only = yes
	
	option = {
		name = tfv_canada.61.a
		transfer_state = 331
		transfer_state = 332
		
		news_event = { id = news.248 hours = 6 }
	}
}

country_event = {
	id = tfv_canada.62
	title = tfv_canada.62.t
	desc = tfv_canada.62.d
	picture = GFX_report_event_canada_army
	
	is_triggered_only = yes
	
	option = {
		name = tfv_canada.62.a
		
		create_wargoal = {
			type = take_state_focus
			target = ENG
			generator = { 331 332 }
		}
	}
}

country_event = {
	id = tfv_canada.63
	title = tfv_canada.63.t # Fascist CAN offers concessions for Labrador and Newfoundland from ENG
	desc = tfv_canada.63.d	#
	picture = GFX_report_event_canadian_soldiers
	
	is_triggered_only = yes
	
	option = { # Agree to demands
		name = tfv_canada.63.a
		
		ai_chance = {
			base = 50
			modifier = {
				factor = 2
				has_war = yes
			}
			modifier = {
				factor = 1.5
				has_opinion = {
					target = CAN
					value > 50
				}
			}
			modifier = {
				factor = 1.25
				CAN = { has_same_ideology = yes }
			}
		}
		
		effect_tooltip = {
			CAN = {
				transfer_state = 331
				transfer_state = 332
			}
		}
		
		CAN = {
			give_resource_rights = { receiver = ENG state = 473 }
		}
		
		hidden_effect = {
			CAN = {
				country_event = { id = tfv_canada.61 }
			}
		}
	}
	
	option = { # Refuse
		name = tfv_canada.63.b
		
		ai_chance = {
			base = 50
			modifier = {
				factor = 0.25
				surrender_progress > 0.25
			}
		}
		
		hidden_effect = {
			CAN = {
				country_event = { id = tfv_canada.62 }
			}
		}
	}
}

# Canada wishes to sign the Newfoundland Act
country_event = {
	id = tfv_canada.70
	title = tfv_canada.70.t
	desc = tfv_canada.70.desc 
	picture = GFX_report_event_canada_treaty
	is_triggered_only = yes
	fire_only_once = yes

	# We see no harm in this
	option = {
		name = tfv_canada.70.a 
		ai_chance = {  
			base = 90
			modifier = {
				factor = 4
				has_subject = FROM
			}
		} 

		FROM = {
			country_event = {
				id = tfv_canada.71
				days = 2
				random_days = 3
			}
		}

		IF = {
			limit = {
				has_global_flag = not_all_newf_owned
			}
			random_country = {
				limit = {
					original_tag = USA
					is_in_faction_with = FROM
				}
				country_event = {
					id = tfv_canada.73
					days = 2
					random_days = 3 
				}
			}
		}
		
	}  

	# Goodness no!
	option = {
		name = tfv_canada.70.b 
		ai_chance = {
			base = 10
		} 

		FROM = {
			country_event = {
				id = tfv_canada.72
				days = 2
				random_days = 3
			}
		}
	}
		  
}

# FROM accepts our union with Newfoundland
country_event = {
	id = tfv_canada.71
	title = tfv_canada.71.t
	desc = tfv_canada.71.desc 
	picture = GFX_report_event_canada_treaty
	is_triggered_only = yes
	fire_only_once = yes

	# Splendid!
	option = {
		name = tfv_canada.71.a 
		ai_chance = {  
			base = 100
		} 

		add_stability = 0.500

		add_political_power = 500.000

		transfer_state = 332

		transfer_state = 331

		add_opinion_modifier = {
			target = FROM
			modifier = huge_increase
		}	
		
	}  
		  
}

# FROM denies our request
country_event = {
	id = tfv_canada.72
	title = tfv_canada.72.t
	desc = tfv_canada.72.desc 
	picture = GFX_report_event_canada_treaty
	is_triggered_only = yes
	fire_only_once = yes

	# They do realize this harms our relations?
	option = {
		name = tfv_canada.72.a 
		ai_chance = {  
			base = 100
		} 

		add_opinion_modifier = {
			target = FROM
			modifier = large_decrease
		}	

		add_war_support = 0.500

		add_political_power = 250.000
		
	}  
		  
}

# Canada is Given Newfoundland and Labrador by Britain
country_event = {
	id = tfv_canada.73
	title = tfv_canada.73.t
	desc = tfv_canada.73.desc 
	picture = GFX_report_event_canada_treaty
	is_triggered_only = yes
	fire_only_once = yes

	# At least we get compnesated
	option = {
		name = tfv_canada.73.a 
		ai_chance = {  
			base = 100
		} 

		add_political_power = 750.000

		add_timed_idea = {
			idea = CAN_consumer_goods_for_newfoundland
			days = 365
		}	
		
	}  
		  
}

# Ronnie the Bren Gun Girl
# Triggered by Women in the Workforce decision

country_event = {
	id = canada_vanilla.1
	title = canada_vanilla.1.title
	desc = canada_vanilla.1.desc
	
	picture = GFX_report_event_canada_ronnie

	is_triggered_only = yes

	option = {
		name = canada_vanilla.1.opt
	}
}

