﻿###########################
# Greek Events
###########################

add_namespace = greece

# Soviet Demands
country_event = {
	id = greece.1
	title = greece.1.t
	desc = greece.1.d
	picture = GFX_report_event_stalin_02
	
	is_triggered_only = yes
	
	option = { # Accept demands
		name = greece.1.a
		ai_chance = {	
			modifier = {
				factor = 0
				OR = {
					any_other_country = {

						has_guaranteed = GRE
					}
					any_other_country = {

						is_in_faction_with = GRE
					}
				}
			}
			factor = 100	
		}

		SOV = { transfer_state = 187 }
		if = {
			limit = {
				BUL = { 
					OR = { 
						is_in_faction_with = SOV 
						is_in_faction = no
					}
				}
			}
			BUL = { 
				transfer_state = 184
				add_opinion_modifier = { target = SOV modifier = SOV_ultimatum_to_greece_thrace }
			}
		}
		hidden_effect = {
			news_event = { id = news.197 }
		}
	}
	option = { # Refuse
		name = greece.1.b
		ai_chance = {	
			modifier = {
				factor = 0
				NOT = {
					OR = {
						any_other_country = {

							has_guaranteed = GRE
						}
						any_other_country = {

							is_in_faction_with = GRE
						}
					}
				}
			}
			factor = 5	
		}
		hidden_effect = {
			news_event = { id = news.198 hours = 6 }
		}
	}
}

# German demands to hand over territory to friends or self
country_event = {
	id = greece.2
	title = greece.2.t

	desc = { 
		text = greece.2.d_GER_demand
		trigger = {
			OR = {
				has_global_flag = GER_second_ljubljana_award_GER_185
				has_global_flag = GER_second_ljubljana_award_GER_731
				has_global_flag = GER_second_ljubljana_award_GER_184
			}
		}
	}

	desc = {
		text = greece.2.d_ITA
		trigger = {
			OR = {
				has_global_flag = GER_second_ljubljana_award_ITA_185
				has_global_flag = GER_second_ljubljana_award_ITA_731
			}
			NOT = {
				OR = {
					has_global_flag = GER_second_ljubljana_award_BUL_184
					has_global_flag = GER_second_ljubljana_award_BUL_731
				}
			}
		}
	}
	
	desc = {
		text = greece.2.d_BUL
		trigger = {
			NOT = { has_global_flag = GER_second_ljubljana_award_ITA_185 }
			NOT = { has_global_flag = GER_second_ljubljana_award_ITA_731 }
			OR = {
				has_global_flag = GER_second_ljubljana_award_BUL_184
				has_global_flag = GER_second_ljubljana_award_BUL_731
			}
		}
	}

	desc = {
		text = greece.2.d_ITA_BUL
		trigger = {
			has_global_flag = GER_second_ljubljana_award_ITA_185
			OR = {
				has_global_flag = GER_second_ljubljana_award_BUL_184
				has_global_flag = GER_second_ljubljana_award_BUL_731
			}
		}
	}

	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	option = { # Accept demands
		name = greece.2.a
		ai_chance = {	
			base = 100	
			modifier = {
				factor = 0
				any_other_country = {
					OR = {
						has_guaranteed = GRE
						is_in_faction_with = GRE
					}
				}
			}
			modifier = {
				factor = 0
				is_puppet = yes
			}
		}

		hidden_effect = {
			news_event = { id = news.170 hours = 2}
		}
		
		if = { #Only Italy gets a piece of Greece
			limit = {
				has_global_flag = GER_second_ljubljana_award_ITA_event
				NOT = { has_global_flag = GER_second_ljubljana_award_BUL_done }
			}
			if = {
				limit = {
					has_global_flag = GER_second_ljubljana_award_ITA_185
				}
				ITA = { transfer_state = 185 }
			}
			if = {
				limit = {
					has_global_flag = GER_second_ljubljana_award_ITA_731
				}
				ITA = { transfer_state = 731 }
			}
		}
		else_if = { #Only Bulgaria gets a piece of Greece
			limit = {
				has_global_flag = GER_second_ljubljana_award_BUL_done
				NOT = { has_global_flag = GER_second_ljubljana_award_ITA_event }
			}
			if = {
				limit = {
					has_global_flag = GER_second_ljubljana_award_BUL_184
				}
				BUL = { transfer_state = 184 }
			}
			if = {
				limit = {
					has_global_flag = GER_second_ljubljana_award_BUL_731
				}
				BUL = { transfer_state = 731 }
			}
		}
		else_if = { #Both Italy and Bulgaria are good bois and gets a piece each of Greece
			limit = {
				has_global_flag = GER_second_ljubljana_award_ITA_event
				has_global_flag = GER_second_ljubljana_award_BUL_done
			}
			if = {
				limit = {
					has_global_flag = GER_second_ljubljana_award_ITA_185
				}
				ITA = { transfer_state = 185 }
			}
			if = {
				limit = {
					has_global_flag = GER_second_ljubljana_award_BUL_184
				}
				BUL = { transfer_state = 184 }
			}
			if = {
				limit = {
					has_global_flag = GER_second_ljubljana_award_BUL_731
				}
				BUL = { transfer_state = 731 }
			}
		}
		else = {
			if = {
				limit = { 
					has_global_flag = GER_second_ljubljana_award_GER_185
				}
				GER = { transfer_state = 185 }
			}
			if = {
				limit = { 
					has_global_flag = GER_second_ljubljana_award_GER_731
				}
				GER = { transfer_state = 731 }
			}
			if = {
				limit = { 
					has_global_flag = GER_second_ljubljana_award_GER_184
				}
				GER = { transfer_state = 184 }
			}
		}
	}
	
	option = { # Refuse
		name = greece.2.b
		ai_chance = {	
			base = 5	
			modifier = {
				factor = 0
				NOT = {
					any_other_country = {
						OR = {
							has_guaranteed = GRE
							is_in_faction_with = GRE
						}
					}
				}
			}
		}
		GER = { country_event = { id = germany.102 hours = 6 } }
		news_event = { id = news.171 hours = 2 }
		effect_tooltip = {
			GER = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = GRE		
				}
			}			
		}
	}
}

# Germany demands Greece become puppet
country_event = {
	id = greece.3
	title = greece.3.t
	desc = greece.3.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	option = { # Accept demands
		name = greece.3.a
		ai_chance = {	
			base = 100	
			modifier = {
				factor = 0
				OR = {
					any_other_country = {
	
						has_guaranteed = GRE
					}
					any_other_country = {

						is_in_faction_with = GRE
					}
				}
			}
		}
		GER = { puppet = GRE }
		hidden_effect = {
			news_event = { id = news.172 hours = 2 }
		}
	}

	option = { # Refuse
		name = greece.3.b
		ai_chance = {	
			base = 5	
			modifier = {
				factor = 0
				NOT = {
					OR = {
						any_other_country = {

							has_guaranteed = GRE
						}
						any_other_country = {

							is_in_faction_with = GRE
						}
					}
				}
			}
		}
		GER = { country_event = { id = germany.102 hours = 6 } }
		effect_tooltip = {
			GER = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = GRE		
				}
			}			
		}
	}
}

# Greece gets wargoal - From Italian focus tree
country_event = {
	id = greece.4
	title = greece.4.t
	desc = greece.4.d
	picture = GFX_report_event_fascist_militia
	
	is_triggered_only = yes
	
	option = { # Accept demands
		name = greece.4.a
		create_wargoal = {
			type = take_state_focus
			target = TUR
			generator = { 339 }
		}
	}
}