namespace = shroud_master_joy

country_event = {
	id = shroud_master_joy.0
	title = shroud_master_joy.0.name
	desc = shroud_master_joy.0.desc
	show_sound = event_mystic_reveal
	picture = GFX_evt_sm_shroud_master_vortex
	is_triggered_only = yes
	immediate = {
		create_country = {
			name = "NAME_SHROUD_MASTER_THEIA"
			type = shroud_master_theia
			flag = {
				icon = {
					category = "domination"
					file = "domination_15.dds"
				}
				background= {
					category = "backgrounds"
					file = "v.dds"
				}
				colors={
					"black"
					"purple"
					"null"
					"null"
				}
			}
			effect = {
				set_country_flag = shroud_master_theia_country
				save_global_event_target_as = shroud_master_theia_country
			}
		}
		establish_communications_no_message = event_target:shroud_master_theia_country
	}
	option = {
		name = shroud_master_joy.0.a
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.1
			}
		}
	}
}

country_event = {
	id = shroud_master_joy.1
	is_triggered_only = yes
	diplomatic = yes
	force_open = yes

	picture_event_data = {
		portrait = shroud1
		room = shroud_room
	}

	title = shroud_master_joy.1.name
	desc = shroud_master_joy.1.desc
	immediate = {
		set_country_flag = shroud_master_diplomacy_engaged
	}
	option = {
		name = shroud_master_joy.1.a
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.2
			}
		}
	}
	option = {
		name = shroud_master_joy.1.b
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.3
			}
		}
	}
	option = {
		name = shroud_master_joy.1.c
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.4
			}
		}
	}
}

country_event = {
	id = shroud_master_joy.2
	is_triggered_only = yes
	diplomatic = yes
	force_open = yes

	picture_event_data = {
		portrait = shroud1
		room = shroud_room
	}

	title = shroud_master_joy.2.name
	desc = shroud_master_joy.2.desc
	option = {
		name = shroud_master_joy.2.a
		hidden_effect = {
			country_event = {
				id = shroud_master.505
			}
		}
	}
	option = {
		name = shroud_master_joy.2.b
		hidden_effect = {
			country_event = {
				id = shroud_master.506
			}
		}
	}
	after = {
		remove_country_flag = shroud_master_diplomacy_engaged
	}
}

country_event = {
	id = shroud_master_joy.4
	is_triggered_only = yes
	diplomatic = yes
	force_open = yes

	picture_event_data = {
		portrait = shroud1
		room = shroud_room
	}

	title = shroud_master_joy.4.name
	desc = shroud_master_joy.4.desc
	option = {
		name = shroud_master_joy.4.a
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.7
			}
		}
	}
	option = {
		name = shroud_master_joy.4.b
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.3
			}
		}
	}
	option = {
		name = shroud_master_joy.4.c
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.2
			}
		}
	}
}

country_event = {
	id = shroud_master_joy.3
	is_triggered_only = yes
	diplomatic = yes
	force_open = yes

	picture_event_data = {
		portrait = shroud1
		room = shroud_room
	}

	title = shroud_master_joy.3.name
	desc = shroud_master_joy.3.desc
	option = {
		name = shroud_master_joy.3.a
		hidden_effect = {
			country_event = {
				id = shroud_master.506
			}
		}
	}
	after = {
		remove_country_flag = shroud_master_diplomacy_engaged
	}
}

country_event = {
	id = shroud_master_joy.7
	is_triggered_only = yes
	diplomatic = yes
	force_open = yes

	picture_event_data = {
		portrait = shroud1
		room = shroud_room
	}

	title = shroud_master_joy.7.name
	desc = shroud_master_joy.7.desc
	option = {
		name = shroud_master_joy.7.a
		hidden_effect = {
			country_event = {
				id = shroud_master.600
			}
		}
	}
	after = {
		remove_country_flag = shroud_master_diplomacy_engaged
	}
}

########### THEIA DIPLO ########### 

country_event = {
	id = shroud_master_joy.700
	title = shroud_master_joy.700.name
	desc = shroud_master_joy.700.desc.a
	desc = shroud_master_joy.700.desc.b
	desc = shroud_master_joy.700.desc.c
	desc = shroud_master_joy.700.desc.d

	is_triggered_only = yes
	diplomatic = yes

	picture_event_data = {
		portrait = shroud1
		room = shroud_room
	}

	trigger = {
		from = {
			is_country_type = shroud_master_theia
		}
		has_country_flag = has_discovered_theta_runic_reactor
		NOT = { has_country_flag = shroud_master_diplomacy_engaged }
	}

	immediate = {
		set_country_flag = shroud_master_diplomacy_engaged
	}
	
	option = {
		name = shroud_master_joy.700.a
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.701
			}
		}
	}
	option = {
		name = shroud_master_joy.700.b
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.702
			}
		}
	}
	option = {
		name = shroud_master_joy.700.c
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.703
			}
		}
	}
	option = {
		name = shroud_master_joy.700.f
		response_text = shroud_master_joy.700.bye
	}
	after = {
		remove_country_flag = shroud_master_diplomacy_engaged
	}
}

country_event = {
	id = shroud_master_joy.7002
	title = shroud_master_joy.700.name
	desc = shroud_master_joy.700.desc.a
	desc = shroud_master_joy.700.desc.b
	desc = shroud_master_joy.700.desc.c
	desc = shroud_master_joy.700.desc.d

	is_triggered_only = yes
	diplomatic = yes

	picture_event_data = {
		portrait = shroud1
		room = shroud_room
	}
	
	option = {
		name = shroud_master_joy.700.a
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.701
			}
		}
	}
	option = {
		name = shroud_master_joy.700.b
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.702
			}
		}
	}
	option = {
		name = shroud_master_joy.700.c
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.703
			}
		}
	}
	option = {
		name = shroud_master_joy.700.f
		response_text = shroud_master_joy.700.bye
	}
	after = {
		remove_country_flag = shroud_master_diplomacy_engaged
	}
}

country_event = {
	id = shroud_master_joy.701
	title = shroud_master_joy.701.name
	desc = shroud_master_joy.701.desc

	is_triggered_only = yes
	diplomatic = yes

	picture_event_data = {
		portrait = shroud1
		room = shroud_room
	}
	
	option = {
		name = shroud_master_joy.701.a
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.7002
			}
		}
	}
}

country_event = {
	id = shroud_master_joy.702
	title = shroud_master_joy.702.name
	desc = shroud_master_joy.702.desc

	is_triggered_only = yes
	diplomatic = yes

	picture_event_data = {
		portrait = shroud1
		room = shroud_room
	}
	
	option = {
		name = shroud_master_joy.702.a
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.7002
			}
		}
	}
}

country_event = {
	id = shroud_master_joy.703
	title = shroud_master_joy.703.name
	desc = shroud_master_joy.703.desc

	is_triggered_only = yes
	diplomatic = yes

	picture_event_data = {
		portrait = shroud1
		room = shroud_room
	}
	
	option = {
		name = shroud_master_joy.703.a
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.7031
			}
		}
	}
	option = {
		name = shroud_master_joy.703.b
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.7002
			}
		}
	}
}

country_event = {
	id = shroud_master_joy.7031
	title = shroud_master_joy.7031.name
	desc = shroud_master_joy.7031.desc

	is_triggered_only = yes
	diplomatic = yes

	picture_event_data = {
		portrait = shroud1
		room = shroud_room
	}
	
	option = {
		name = shroud_master_joy.7031.a
		hidden_effect = {
			country_event = {
				id = shroud_master_joy.7002
			}
		}
	}
}