namespace = cheatmenu_diplomacy
################################# DIPLOMACY -> SETTINGS events

country_event = {	#  menu
	id = cheatmenu_diplomacy.1
	title = "cheatmenu_diplomacy.1.title"
	desc = "cheatmenu_diplomacy.1.desc"
	picture = INVENTION_eventPicture
	is_triggered_only = yes

	option = {		# religion & culture
		name = "cheatmenu_diplomacy.1.a"
		country_event = { id = cheatmenu_diplomacy.2 }
	}
	
	option = {		# court
		name = "cheatmenu_diplomacy.1.b"
		country_event = { id = cheatmenu_diplomacy.3 }
	}
	
	option = {		# HRE
		name = "cheatmenu_diplomacy.1.c"
		country_event = { id = cheatmenu_diplomacy.4 }
	}
	
	option = {		# close settings
		name = "cheatmenu.close"
		clear_global_event_target = settings_opened
	}
}

country_event = {	#  religion and culture
	id = cheatmenu_diplomacy.2
	title = "cheatmenu_diplomacy.2.title"
	desc = "cheatmenu_diplomacy.2.desc"
	picture = INVENTION_eventPicture
	is_triggered_only = yes

	option = {		# convert THEM to OUR RELIGION
		name = "cheatmenu_diplomacy.2.a"
		trigger = { NOT = { religion = event_target:settings_opened } }
		custom_tooltip = zgk_cheats_irreversible
		event_target:settings_opened = { change_religion = ROOT }
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {		# convert THEM to OUR CULTURE
		name = "cheatmenu_diplomacy.2.b"
		trigger = { NOT = { primary_culture = event_target:settings_opened } }
		custom_tooltip = zgk_cheats_irreversible
		event_target:settings_opened = { change_primary_culture = ROOT }
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {	# back
		name = "cheatmenu.back"
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {	# close settings	
		name = "cheatmenu.close"
		clear_global_event_target = settings_opened
	}
	
}

country_event = {	#  dynasty
	id = cheatmenu_diplomacy.3
	title = "cheatmenu_diplomacy.3.title"
	desc = "cheatmenu_diplomacy.3.desc"
	picture = INVENTION_eventPicture
	is_triggered_only = yes

	option = {		# place OUR dynasty on THEIR throne
		name = "cheatmenu_diplomacy.3.a"
		trigger = { NOT  = { dynasty = event_target:settings_opened } }
		custom_tooltip = zgk_cheats_irreversible
		event_target:settings_opened = { set_dynasty = ROOT }
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {		# place THEIR dynasty on OUR throne
		name = "cheatmenu_diplomacy.3.b"
		trigger = { NOT  = { dynasty = event_target:settings_opened } }
		custom_tooltip = zgk_cheats_irreversible
		set_dynasty = event_target:settings_opened
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {		# kill ruler
		name = "cheatmenu_diplomacy.3.c"
		event_target:settings_opened = { kill_ruler = yes }
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {		# kill heir
		name = "cheatmenu_diplomacy.3.d"
		trigger = { event_target:settings_opened  = { has_heir = yes } }
		event_target:settings_opened = { kill_heir = yes }
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {		# add heir
		name = "cheatmenu_diplomacy.3.e"
		trigger = { event_target:settings_opened  = { has_heir = no } }
		event_target:settings_opened = { 
			define_heir = {
				claim = 100
			}
		}
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {	# back
		name = "cheatmenu.back"
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {	# close settings	
		name = "cheatmenu.close"
		clear_global_event_target = settings_opened
	}
	
}

country_event = {	#  HRE
	id = cheatmenu_diplomacy.4
	title = "cheatmenu_diplomacy.4.title"
	desc = "cheatmenu_diplomacy.4.desc"
	picture = INVENTION_eventPicture
	is_triggered_only = yes

	option = {		# add to empire
		name = "cheatmenu_diplomacy.4.a"
		trigger = { event_target:settings_opened = { is_part_of_hre = no } }
		event_target:settings_opened = { set_in_empire = yes  }
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {		# remove from empire
		name = "cheatmenu_diplomacy.4.b"
		trigger = { event_target:settings_opened = { is_part_of_hre = yes } }
		event_target:settings_opened = { set_in_empire = no  }
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {		# make ELECTOR
		name = "cheatmenu_diplomacy.4.c"
		trigger = { event_target:settings_opened = { is_elector = no } }
		event_target:settings_opened = { elector = yes }
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {		# delete ELECTOR
		name = "cheatmenu_diplomacy.4.d"
		trigger = { event_target:settings_opened = { is_elector = yes } }
		event_target:settings_opened = { elector = no }
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {		# make IMP CITY
		name = "cheatmenu_diplomacy.4.e"
		trigger = { event_target:settings_opened = { NOT =  { has_reform = imperial_city } } }
		event_target:settings_opened = { change_government = republic add_government_reform = imperial_city }
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {		# delete IMP CITY
		name = "cheatmenu_diplomacy.4.f"
		trigger = { event_target:settings_opened = { has_reform = imperial_city } }
		event_target:settings_opened = { add_government_reform = feudal_monarchy }
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {	# back
		name = "cheatmenu.back"
		country_event = { id = cheatmenu_diplomacy.1 }
	}
	
	option = {	# close settings	
		name = "cheatmenu.close"
		clear_global_event_target = settings_opened
	}
	
}