add_namespace = czech

# Ask SOV about joining Comintern
country_event = {
	id = czech.1
	title = czech.1.t
	desc = czech.1.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = czech.1.a #yes
		ai_chance = {
			factor = 80
		}
		CZE = {
			country_event = { id = czech.2 hours = 6 }
		}
		
		hidden_effect = {
			
		}
	}
	
	option = {
		name = czech.1.b
		ai_chance = {
			factor = 20
		}
		CZE = {
			country_event = { id = czech.3 hours = 6 }
		}
		
		hidden_effect = {
			
		}
	}
}
# SOV says yes
country_event = {
	id = czech.2
	title = czech.1.t
	desc = czech.2.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = excellent
		
		SOV = { add_to_faction = CZE }
		
		hidden_effect = {
			news_event = { days = 1 id = dod_news.3 }
		}
	}
}
# SOV says no
country_event = {
	id = czech.3
	title = czech.1.t
	desc = czech.3.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = czech.3.a
		
		hidden_effect = {
			
		}
	}
}

# Ask SOV about splitting ROM
country_event = {
	id = czech.4
	title = czech.4.t
	desc = czech.4.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = czech.4.a #yes
		ai_chance = {
			factor = 80
		}
		CZE = {
			country_event = { id = czech.5 hours = 6 }
		}
		create_wargoal = {
			type = take_state_focus
			target = ROM
			generator = { 78 79 80 46 81  }
		}
		
		hidden_effect = {
			
		}
	}
	
	option = {
		name = czech.4.b
		ai_chance = {
			factor = 20
		}
		CZE = {
			country_event = { id = czech.6 hours = 6 }
		}
		
		hidden_effect = {
			
		}
	}
}
# SOV says yes
country_event = {
	id = czech.5
	title = czech.4.t
	desc = czech.5.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = excellent
		create_wargoal = {
			type = take_state_focus
			target = ROM
			generator = { 76 83 82 84  }
		}
		hidden_effect = {
			
		}
	}
}
# SOV says no
country_event = {
	id = czech.6
	title = czech.4.t
	desc = czech.6.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = czech.6.a
		
		hidden_effect = {
			
		}
	}
}

# Ask SOV about splitting POL
country_event = {
	id = czech.7
	title = czech.7.t
	desc = czech.7.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = czech.7.a #yes
		ai_chance = {
			factor = 80
		}
		CZE = {
			country_event = { id = czech.8 hours = 6 }
		}
		create_wargoal = {
			type = puppet_wargoal_focus
			target = POL
		}
		
		hidden_effect = {
			
		}
	}
	
	option = {
		name = czech.4.b
		ai_chance = {
			factor = 20
		}
		CZE = {
			country_event = { id = czech.9 hours = 6 }
		}
		
		hidden_effect = {
		
		}
	}
}
# SOV says yes
country_event = {
	id = czech.8
	title = czech.7.t
	desc = czech.8.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = excellent
		create_wargoal = {
			type = take_state_focus
			target = POL
			generator = { 88 89 90 91 }
		}
		hidden_effect = {
			
		}
	}
}
# SOV says no
country_event = {
	id = czech.9
	title = czech.7.t
	desc = czech.9.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = czech.6.a
		
		hidden_effect = {
			
		}
	}
}

# Ask GER about splitting POL
country_event = {
	id = czech.10
	title = czech.7.t
	desc = czech.10.d
	picture = [GetHitlerHandshakeEventPicture]
	
	is_triggered_only = yes
	
	option = {
		name = czech.10.a #yes
		ai_chance = {
			factor = 90
			modifier = {
				is_in_faction_with = SOV
				factor = 0.1
			}
		}
		CZE = {
			country_event = { id = czech.11 hours = 6 }
		}
		create_wargoal = {
			type = annex_everything
			target = POL
		}
		
		hidden_effect = {
			
		}
	}
	
	option = {
		name = czech.4.b
		ai_chance = {
			factor = 10
		}
		CZE = {
			country_event = { id = czech.12 hours = 6 }
		}
		
		hidden_effect = {
		
		}
	}
}
# GER says yes
country_event = {
	id = czech.11
	title = czech.7.t
	desc = czech.11.d
	picture = [GetHitlerHandshakeEventPicture]
	
	is_triggered_only = yes
	
	option = {
		name = excellent
		create_wargoal = {
			type = take_state_focus
			target = POL
			generator = { 88 89 90 91 }
		}
		
		hidden_effect = {
			
		}
	}
}
# GER says no
country_event = {
	id = czech.12
	title = czech.7.t
	desc = czech.12.d
	picture = [GetHitlerHandshakeEventPicture]
	
	is_triggered_only = yes
	
	option = {
		name = czech.6.a
		
		hidden_effect = {
			
		}
	}
}

# Excluding the slovaks
country_event = {
	id = czech.14
	title = czech.14.t
	desc = czech.14.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = czech.14.a
		#start_civil_war = {
		#		ideology = neutrality
		#		size = 0.45
		#		capital = 70
		#		states = { 70 71 664 73 }
		#	}

		SLO = {
			if = {
				limit = {
					CZE = {
						owns_state = 70
					}
				}
				transfer_state = 70
			}
			if = {
				limit = {
					CZE = {
						owns_state = 71
					}
				}
				transfer_state = 71
			}
			if = {
				limit = {
					CZE = {
						owns_state = 73
					}
				}
				transfer_state = 73
			}
			if = {
				limit = {
					CZE = {
						owns_state = 664
					}
				}
				transfer_state = 664
			}
			
		}
		declare_war_on = {
			target = SLO
			type = annex_everything
		}
		SLO = { add_state_core = 70 }
		SLO = { add_state_core = 71 }
		SLO = { add_state_core = 73 }
		SLO = { add_state_core = 664 }
		
		hidden_effect = {
			SLO = {
				if = {
					limit = {
						NOT = {
							has_dlc = "No Step Back"
						}
					}
					load_oob = "SLO_independence"
				}
				else = {
					load_oob = "SLO_independence_nsb"
				}
				if = {
					limit = {
						has_dlc = "By Blood Alone"
					}
					load_oob = "SLO_1939_air_bba"
				}
				else = {
					load_oob = "SLO_1939_air_legacy"
				}
			}
		}
	}
}
# Excluding the slovaks
country_event = {
	id = czech.15
	title = czech.14.t
	desc = czech.15.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = czech.15.a		
		#everything is ok
		
		hidden_effect = {
			
		}
	}
}

# Ask GER about joining Axis
country_event = {
	id = czech.16
	title = czech.16.t
	desc = czech.16.d
	picture = [GetHitlerHandshakeEventPicture]
	
	is_triggered_only = yes
	
	option = {
		name = czech.1.a #yes
		ai_chance = {
			factor = 100
		}
		CZE = {
			country_event = { id = czech.17 hours = 6 }
		}
		
		hidden_effect = {
			news_event = { days = 1 id = dod_news.2 }
		}
	}
	
	option = {
		name = czech.1.b
		ai_chance = {
			factor = 0
		}
		CZE = {
			country_event = { id = czech.18 hours = 6 }
		}
		
		hidden_effect = {
			
		}
	}
}
# GER says yes
country_event = {
	id = czech.17
	title = czech.16.t
	desc = czech.17.d
	picture = [GetHitlerHandshakeEventPicture]
	
	is_triggered_only = yes
	
	option = {
		name = czech.17.a
		FROM = { add_to_faction = CZE }
		
		hidden_effect = {
		
		}
	}
}
# GER says no
country_event = {
	id = czech.18
	title = czech.16.t
	desc = czech.18.d
	picture = [GetHitlerHandshakeEventPicture]
	
	is_triggered_only = yes
	
	option = {
		name = czech.18.a
		
		hidden_effect = {
			
		}
	}
}

# Ask GER about being a puppet
country_event = {
	id = czech.19
	title = czech.19.t
	desc = czech.19.d
	picture = [GetHitlerHandshakeEventPicture]
	
	is_triggered_only = yes
	
	option = {
		ai_chance = {
			base = 100
			modifier = {
				factor = 0.5
				has_wargoal_against = CZE
			}
		}
		name = czech.1.a #yes
		puppet = CZE
		CZE = {
			country_event = { id = czech.20 hours = 6 }
		}
		
		hidden_effect = {
			
		}
	}
	
	option = {
		name = czech.1.b
		ai_chance = {
			base = 10
		}
		CZE = {
			country_event = { id = czech.21 hours = 6 }
		}
		
		hidden_effect = {
			
		}
	}
}
# GER says yes
country_event = {
	id = czech.20
	title = czech.20.t
	desc = czech.20.d
	picture = [GetHitlerHandshakeEventPicture]
	
	is_triggered_only = yes
	
	option = {
		name = czech.20.a
		effect_tooltip = {
			GER = {
				puppet = CZE
			}
		}
		hidden_effect = {
			add_ideas = GER_KR_enhanced
		}
	}
}
# GER says no
country_event = {
	id = czech.21
	title = czech.21.t
	desc = czech.21.d
	picture = [GetHitlerHandshakeEventPicture]
	
	is_triggered_only = yes
	
	option = {
		name = czech.21.a
		
		hidden_effect = {
		
		}
	}
}

#Give GER Sudetenland 
country_event = {
	id = czech.22
	title = czech.22.t
	desc = czech.22.d
	picture = [GetHitlerHandshakeEventPicture]
	
	is_triggered_only = yes
	
	option = {
		name = czech.1.a #yes
		ai_chance = {
			factor = 100
		}
		GER = {
			add_state_core = 69
			transfer_state = 69
			add_state_core = 972
			transfer_state = 972
			add_state_core = 74
			transfer_state = 74
		}
		CZE = {
			country_event = { id = czech.23 hours = 6 }
		}
		
		hidden_effect = {
			
		}
	}
	
	option = {
		name = czech.1.b
		ai_chance = {
			factor = 0
		}
		CZE = {
			country_event = { id = czech.24 hours = 6 }
		}
		
		hidden_effect = {
			
		}
	}
}
# GER says yes
country_event = {
	id = czech.23
	title = czech.22.t
	desc = czech.23.d
	picture = [GetHitlerHandshakeEventPicture]
	
	is_triggered_only = yes
	
	option = {
		name = czech.23.a
		
		hidden_effect = {
			news_event = { days = 1 id = dod_news.4 }
		}
	}
}
# GER says no
country_event = {
	id = czech.24
	title = czech.22.t
	desc = czech.24.d
	picture = [GetHitlerHandshakeEventPicture]
	
	is_triggered_only = yes
	
	option = {
		name = czech.24.a
		
		hidden_effect = {
			
		}
	}
}

#Invite YUG to faction
country_event = {
	id = czech.25
	title = czech.25.t
	desc = czech.25.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = czech.1.a #yes
		ai_chance = {
			factor = 90
		}
		CZE = { add_to_faction = ROOT }
		CZE = {
			country_event = { id = czech.26 hours = 6 }
		}
		
		hidden_effect = {
			ROOT = {
				add_ai_strategy = {
					type = alliance
					id = "CZE"
					value = 500
				}
			}
		}
	}
	
	option = {
		name = czech.1.b
		ai_chance = {
			factor = 10
			modifier = {
				CZE = {
					surrender_progress > 0
				}
				factor = 15
			}
		}
		CZE = {
			country_event = { id = czech.27 hours = 6 }
		}
		
		hidden_effect = {
		
		}
	}
}
# YUG says yes
country_event = {
	id = czech.26
	title = czech.25.t
	desc = czech.26.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = excellent
		
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_country_flag = CZE_entente_announced }
				}
				set_country_flag = CZE_entente_announced
				news_event = { days = 1 id = dod_news.1 }
			}
		}
	}
}
# YUG says no
country_event = {
	id = czech.27
	title = czech.25.t
	desc = czech.27.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = unfortunate
		
		hidden_effect = {
		
		}
	}
}

#Invite ROM to faction
country_event = {
	id = czech.28
	title = czech.28.t
	desc = czech.27.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = czech.1.a #yes
		ai_chance = {
			factor = 90
		}
		CZE = { add_to_faction = ROOT }
		CZE = {
			country_event = { id = czech.29 hours = 6 }
		}
		
		hidden_effect = {
			ROOT = {
				add_ai_strategy = {
					type = alliance
					id = "CZE"
					value = 500
				}
			}
			
		}
	}
	
	option = {
		name = czech.1.b
		ai_chance = {
			factor = 10
			modifier = {
				CZE = {
					surrender_progress > 0
				}
				factor = 15
			}
		}
		CZE = {
			country_event = { id = czech.30 hours = 6 }
		}
		
		hidden_effect = {
			
		}
	}
}
# ROM says yes
country_event = {
	id = czech.29
	title = czech.28.t
	desc = czech.26.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = excellent
		
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_country_flag = CZE_entente_announced }
				}
				set_country_flag = CZE_entente_announced
				news_event = { days = 1 id = dod_news.1 }
			}
		}
	}
}
# ROM says no
country_event = {
	id = czech.30
	title = czech.28.t
	desc = czech.27.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = unfortunate
		
		hidden_effect = {
			
		}
	}
}

# Ask HUN to be nice
country_event = {
	id = czech.32
	title = czech.32.t
	desc = czech.32.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = czech.1.a #yes
		ai_chance = {
			factor = 60
			modifier = {
				has_government = democratic
				factor = 2
			}
			modifier = {
				has_completed_focus = HUN_rapproachement_with_little_entente
				factor = 10
			}
		}
		CZE = {
			country_event = { id = czech.33 hours = 6 }
		}
		
		hidden_effect = {
			
		}
	}
	
	option = {
		name = czech.1.b
		ai_chance = {
			factor = 40
			modifier = {
				OR = {
					has_country_flag = HUN_AI_RANDOM_AUSTRIA_HUNGARY
					has_game_rule = {
						rule = HUN_ai_behavior
						option = AUSTRIA_HUNGARY
					}
				}
				factor = 0
			}
		}
		CZE = {
			country_event = { id = czech.34 hours = 6 }
		}
		
		hidden_effect = {
		
		}
	}
}
# HUN says yes
country_event = {
	id = czech.33
	title = czech.32.t
	desc = czech.33.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = czech.33.a
		add_to_faction = HUN
		add_opinion_modifier = {
			target = FROM
			modifier = border_conflict_reconciled
		}
		if = {
			limit = { 664 = { is_claimed_by = HUN } }
			HUN = {
				remove_state_claim = 664
			}
		}
		
		hidden_effect = {
			HUN = {
				add_ai_strategy = {
					type = alliance
					id = "CZE"
					value = 500
				}
			}
			
		}
	}
}
# HUN says no
country_event = {
	id = czech.34
	title = czech.32.t
	desc = czech.34.d
	picture = GFX_report_event_generic_handshake
	
	is_triggered_only = yes
	
	option = {
		name = LSM_czech.34.a

		CZE = {
			create_wargoal = {
				target = HUN
				type = annex_everything
			}	
		}
	}
	
	option = {
		name = LSM_czech.34.b
		
		hidden_effect = {
			
		}
	}

}

# Czechoslovakia becomes just Czech
country_event = {
	id = czech.35
	
	trigger = {
		original_tag = CZE
		NOT = {
			owns_state = 70
			owns_state = 71
			owns_state = 73
			owns_state = 664
		}
		NOT = { has_war_with = SLO }
		NOT = { has_global_flag = CZE_became_czech }
	}
	
	mean_time_to_happen = { days = 2 }

	hidden = yes

	immediate = {
		set_cosmetic_tag = CZE_ONLY
		set_global_flag = CZE_became_czech
	}
}

# Czechoslovakia becomes Czechoslovakia again
country_event = {
	id = czech.36
	
	trigger = {
		original_tag = CZE
		OR = {
			owns_state = 70
			owns_state = 71
			owns_state = 73
			owns_state = 664
		}
		has_global_flag = CZE_became_czech
	}

	mean_time_to_happen = { days = 2 }

	hidden = yes

	immediate = {
		add_state_core = 70
		add_state_core = 71
		add_state_core = 73
		add_state_core = 664
		drop_cosmetic_tag = yes
		clr_global_flag = CZE_became_czech
	}
}

country_event = {
	id = czech.37
	title = czech.37.t
	desc = czech.37.d
	picture = GFX_report_event_hitler_handshake
	
	is_triggered_only = yes
	
	option = {
		name = czech.37.a

		set_faction_name = "Fun-sized Little Entente"
	
		every_country = {
			limit = {
				OR = {
					tag = BUL
					tag = HUN
					tag = ALB
					tag = GRE
					tag = AUS
					tag = TUR
				}
				NOT = { is_in_faction_with = CZE }
				has_war = no
				OR = {
					AND = {
						CZE = { has_government = democratic }
						OR = {
							has_government = neutrality
							has_government = democratic
						}
					}
					AND = {
						CZE = { has_government = fascism }
						OR = {
							has_government = neutrality
							has_government = fascism
						}
					}
					AND = {
						CZE = { has_government = communism }
						OR = {
							has_government = communism
							has_government = democratic
						}
					}
					AND = {
						CZE = { has_government = neutrality }
						OR = {
							has_government = neutrality
							has_government = democratic
						}
					}
				}
			}
			country_event = { id = generic.5 hours = 3 } 
		}
		
		ai_chance = { 
			factor = 50
		}
	}
	
	option = {
		name = czech.37.b

		remove_from_faction = YUG
		
		ai_chance = { 
			factor = 50
			modifier = {
				CZE = { has_government = democratic }
				factor = 0
			}
			modifier = {
				CZE = { has_government = communism }
				factor = 0
			}
		}

		YUG = { country_event = { id = czech.38 days = 1 } }
	}

}

country_event = {
	id = czech.38
	title = czech.38.t
	desc = czech.38.d
	picture = GFX_report_event_hitler_handshake
	
	is_triggered_only = yes
	
	option = {
		name = czech.38.a

		create_faction = panslavic_workers_congress
		hidden_effect = { news_event = { id = news.330 } }
	}

}

