add_namespace = HUN_events

#Referendum in Carphato-Rhuteine
country_event = {
	id = HUN_events.1
	title = HUN_events.1.t
	desc = HUN_events.1.d
	picture = GFX_report_event_russian_flag

	is_triggered_only = yes

	option = {	#Accept
		name = HUN_events.1.o1
		HUN = { transfer_state = 73 }
		HUN = { country_event = diplomatic_response.1 }

		ai_chance = {
			factor = 50
		}
	}

	option = {	#Decline
		name = HUN_events.1.o2
		HUN = { country_event = diplomatic_response.2 }

		ai_chance = {
			factor = 50
		}
	}
}

#Referendum in Austria
country_event = {
	id = HUN_events.2
	title = HUN_events.2.t
	desc = HUN_events.2.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

	option = {	#Accept
		name = HUN_events.2.o1
		custom_effect_tooltip = GAME_OVER_TT
		AUS = {
			every_unit_leader = {
				set_nationality = HUN
			}
		}
		HUN = { annex_country = { target = AUS transfer_troops = yes } }
		HUN = { country_event = diplomatic_response.1 }

		ai_chance = {
			factor = 50
		}
	}

	option = {	#Decline
		name = HUN_events.2.o2
		HUN = {
			create_wargoal = {
				type = annex_everything
				target = AUS
			}
		}
		HUN = { country_event = diplomatic_response.2 }

		ai_chance = {
			factor = 50
		}
	}
}

#Austria-Hungary offers 'protection'
country_event = {
	id = HUN_events.3
	title = HUN_events.3.t
	desc = HUN_events.3.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

	option = {	#Accept
		name = HUN_events.3.o1
		custom_effect_tooltip = GAME_OVER_TT
		SLO = {
			every_unit_leader = {
				set_nationality = HUN
			}
		}
		HUN = { annex_country = { target = SLO transfer_troops = yes } }
		HUN = { country_event = diplomatic_response.1 }

		ai_chance = {
			factor = 50
		}
	}

	option = {	#Decline
		name = HUN_events.3.o2
		HUN = {
			create_wargoal = {
				type = annex_everything
				target = SLO
			}
		}
		HUN = { country_event = diplomatic_response.2 }

		ai_chance = {
			factor = 50
		}
	}
}

#Austria-Hungary demands full annexation
country_event = {
	id = HUN_events.4
	title = HUN_events.4.t
	desc = HUN_events.4.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

	option = {	#Accept
		name = HUN_events.4.o1
		custom_effect_tooltip = GAME_OVER_TT
		ROOT = {
			every_unit_leader = {
				set_nationality = HUN
			}
		}
		HUN = { annex_country = { target = ROOT transfer_troops = yes } }
		HUN = { country_event = diplomatic_response.1 }

		ai_chance = {
			factor = 50
		}
	}

	option = {	#Decline
		name = HUN_events.4.o2
		HUN = {
			create_wargoal = {
				type = annex_everything
				target = ROOT
			}
		}
		HUN = { country_event = diplomatic_response.2 }

		ai_chance = {
			factor = 50
		}
	}
}

#Austria-Hungary demands Galicja- Polish part
country_event = {
	id = HUN_events.5
	title = HUN_events.5.t
	desc = HUN_events.5.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

	option = {	#Accept
		name = HUN_events.5.o1
		HUN = { transfer_state = 88 }
		88 = { add_core_of = HUN }
		HUN = { country_event = diplomatic_response.1 }

		ai_chance = {
			factor = 50
		}
	}

	option = {	#Decline
		name = HUN_events.5.o2
		HUN = {
			create_wargoal = {
				type = annex_everything
				target = ROOT
			}
		}
		HUN = { country_event = diplomatic_response.2 }

		ai_chance = {
			factor = 50
		}
	}
}
#Austria-Hungary demands Galicja- Ukrainina part
country_event = {
	id = HUN_events.6
	title = HUN_events.6.t
	desc = HUN_events.6.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

	option = {	#Accept
		name = HUN_events.6.o1
		HUN = { transfer_state = 73 }
		89 = { add_core_of = HUN }
		HUN = { transfer_state = 89 }
		91 = { add_core_of = HUN }
		HUN = { transfer_state = 91 }
		80 = { add_core_of = HUN }
		HUN = { transfer_state = 80 }
		HUN = { country_event = diplomatic_response.1 }

		ai_chance = {
			factor = 50
		}
	}

	option = {	#Decline
		name = HUN_events.6.o2
		HUN = {
			create_wargoal = {
				type = annex_everything
				target = ROOT
			}
		}
		HUN = { country_event = diplomatic_response.2 }

		ai_chance = {
			factor = 50
		}
	}
}
#Austria-Hungary demands Transylvania
country_event = {
	id = HUN_events.7
	title = HUN_events.7.t
	desc = HUN_events.7.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

	option = {	#Accept
		name = HUN_events.7.o1
		HUN = {
			if = {
				limit = {
					ROM = {
						controls_state = 76
					}
				}
				transfer_state = 516
			}
			if = {
				limit = {
					ROM = {
						controls_state = 76
					}
				}
				transfer_state = 76
			}

			if = {
				limit = {
					ROM = {
						controls_state = 83
					}
				}
				transfer_state = 83
			}
		}
		HUN = { country_event = diplomatic_response.1 }

		ai_chance = {
			factor = 50
		}
	}

	option = {	#Decline
		name = HUN_events.7.o2
		HUN = {
			create_wargoal = {
				type = annex_everything
				target = ROOT
			}
		}
		HUN = { country_event = diplomatic_response.2 }

		ai_chance = {
			factor = 50
		}
	}
}

#Hungary demands subjgation - Slovakia
country_event = {
	id = HUN_events.8
	title = HUN_events.8.t
	desc = HUN_events.8.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

	option = {	#Accept
		name = HUN_events.8.o1
		HUN = { transfer_state = 664 }
		664 = { add_core_of = HUN }
		HUN = { country_event = diplomatic_response.1 }

		ai_chance = {
			factor = 50
		}
	}

	option = {	#Decline
		name = HUN_events.8.o2
		HUN = {
			create_wargoal = {
				type = annex_everything
				target = ROOT
			}
		}
		HUN = { country_event = diplomatic_response.2 }

		ai_chance = {
			factor = 50
		}
	}
}
#Hungary demands Vojvodina
country_event = {
	id = HUN_events.9
	title = HUN_events.9.t
	desc = HUN_events.9.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

	option = {	#Accept
		name = HUN_events.9.o1
		HUN = { transfer_state = 45 }
		45 = { add_core_of = HUN }
		HUN = { country_event = diplomatic_response.1 }

		ai_chance = {
			factor = 50
		}
	}

	option = {	#Decline
		name = HUN_events.9.o2
		HUN = {
			create_wargoal = {
				type = annex_everything
				target = ROOT
			}
		}
		HUN = { country_event = diplomatic_response.2 }

		ai_chance = {
			factor = 50
		}
	}
}

#Hungary demands full annexation
country_event = {
	id = HUN_events.10
	title = HUN_events.10.t
	desc = HUN_events.10.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

	option = {	#Accept
		name = HUN_events.10.o1
		custom_effect_tooltip = GAME_OVER_TT
		ROOT = {
			every_unit_leader = {
				set_nationality = HUN
			}
		}
		HUN = { annex_country = { target = ROOT transfer_troops = yes } }
		HUN = { country_event = diplomatic_response.1 }

		ai_chance = {
			factor = 50
		}
	}

	option = {	#Decline
		name = HUN_events.10.o2
		HUN = {
			create_wargoal = {
				type = annex_everything
				target = ROOT
			}
		}
		HUN = { country_event = diplomatic_response.2 }

		ai_chance = {
			factor = 50
		}
	}
}

#Hungary demands Transylvania
country_event = {
	id = HUN_events.11
	title = HUN_events.11.t
	desc = HUN_events.11.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

	option = {	#Accept
		name = HUN_events.11.o1
		HUN = {
			if = {
				limit = {
					ROM = {
						controls_state = 76
					}
				}
				transfer_state = 76
			}

			if = {
				limit = {
					ROM = {
						controls_state = 83
					}
				}
				transfer_state = 83
			}

			if = {
				limit = {
					ROM = {
						controls_state = 84
					}
				}
				transfer_state = 84
			}

			if = {
				limit = {
					ROM = {
						controls_state = 82
					}
				}
				transfer_state = 82
			}
		}
		HUN = { country_event = diplomatic_response.1 }

		ai_chance = {
			factor = 50
		}
	}

	option = {	#Decline
		name = HUN_events.11.o2
		HUN = {
			create_wargoal = {
				type = annex_everything
				target = ROOT
			}
		}
		HUN = { country_event = diplomatic_response.2 }

		ai_chance = {
			factor = 50
		}
	}
}

#Hungary wants to join our faction
country_event = {
	id = HUN_events.12
	title = HUN_events.12.t
	desc = HUN_events.12.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes

	option = {	#Accept
		name = HUN_events.12.o1
		ROOT = {add_to_faction = HUN}

		ai_chance = {
			factor = 50
		}
	}

	option = {	#Decline
		name = HUN_events.12.o2
		HUN = {
			create_wargoal = {
				type = annex_everything
				target = ROOT
			}
		}
		HUN = { country_event = diplomatic_response.2 }

		ai_chance = {
			factor = 50
		}
	}
}
