namespace = rg_story

country_event = {
	id = rg_story.2
	title = "graygoo.500.title"
	is_triggered_only = yes
	trigger = {
	}
	diplomatic = yes
	picture_event_data = {
		portrait = event_target:gray_species
		room = "ethic_spaceship_room"
	}
	desc = {
		text = "rg_story.2.desc"
	}
	option = {
		name = rg_story.2.a
		hidden_effect = {
			country_event = {
				id = rg_story.3
			}
		}
		default_hide_option = yes
	}
	option = {
		name = rg_story.2.b
		hidden_effect = {
			country_event = {
				id = rg_story.3
			}
		}
	}
	option = {
		name = rg_story.2.c
		hidden_effect = {
			country_event = {
				id = rg_story.3
			}
		}
	}
}

country_event = {
	id = rg_story.3
	title = "graygoo.500.title"
	is_triggered_only = yes
	trigger = {
	}
	diplomatic = yes
	picture_event_data = {
		portrait = event_target:gray_species
		room = "ethic_spaceship_room"
	}
	desc = {
		text = "rg_story.3.desc"
	}
	option = {
		name = rg_story.3.a
		hidden_effect = {
			country_event = {
				id = rg_story.4
			}
		}
		default_hide_option = yes
	}
	option = {
		name = rg_story.3.b
		hidden_effect = {
			country_event = {
				id = rg_story.4
			}
		}
	}
	option = {
		name = rg_story.3.c
		hidden_effect = {
			country_event = {
				id = rg_story.4
			}
		}
	}
}

country_event = {
	id = rg_story.4
	title = "graygoo.500.title"
	is_triggered_only = yes
	trigger = {
	}
	diplomatic = yes
	picture_event_data = {
		portrait = event_target:gray_species
		room = "ethic_spaceship_room"
	}
	desc = {
		text = "rg_story.4.desc"
	}
	option = {
		name = rg_story.4.a
		hidden_effect = {
			country_event = {
				id = rg_story.5
			}
		}
		default_hide_option = yes
	}
	option = {
		name = rg_story.4.b
		hidden_effect = {
			country_event = {
				id = rg_story.5
			}
		}
	}
	option = {
		name = rg_story.4.c
		hidden_effect = {
			country_event = {
				id = rg_story.5
			}
		}
	}
}

country_event = {
	id = rg_story.5
	title = "graygoo.500.title"
	is_triggered_only = yes
	trigger = {
	}
	diplomatic = yes
	picture_event_data = {
		portrait = event_target:gray_species
		room = "ethic_spaceship_room"
	}
	desc = {
		text = "rg_story.5.desc"
	}
	option = {
		name = rg_story.5.a
		hidden_effect = {
			rg_create_gray_planetkiller_testship_1 = yes
		}
		default_hide_option = yes
	}
}

planet_event = {
	id = rg_story.6
	title = "rg_story.6.title"
	is_triggered_only = yes
	trigger = {
		NOT = {
			any_country = {
				has_country_flag = rg_story6_fired
			}
		}
	}
	picture = GFX_evt_failed_observation
	show_sound = evn_fc_observation
	immediate = {
		every_country = {
			every_owned_fleet = {
				limit = {
					any_owned_ship = {
						has_ship_flag = rg_test_ship
					}
				}
				prev = {
					save_event_target_as = event_target_country
					set_country_flag = rg_story6_fired
				}
				delete_fleet = this
			}
		}
	}
	desc = {
		text = "rg_story.6.desc"
	}
	option = {
		name = rg_story.6.a
		hidden_effect = {
			event_target:event_target_country = {
				country_event = {
					id = rg_story.7
				}
			}
		}
		default_hide_option = yes
	}
}

country_event = {
	id = rg_story.7
	is_triggered_only = yes
	hide_window = yes
	trigger = {
	}
	immediate = {
		every_owned_fleet = {
			limit = {
				has_fleet_flag = rg_test_ship_fleet
			}
			delete_fleet = this
		}
		event_target:rg_test_ship_global_event_target = {
			delete_ship = this
		}
	}
}

country_event = {
	id = rg_story.8
	title = "graygoo.500.title"
	is_triggered_only = yes
	trigger = {
	}
	diplomatic = yes
	picture_event_data = {
		portrait = event_target:gray_species
		room = "ethic_spaceship_room"
	}
	desc = {
		text = "rg_story.8.desc"
	}
	option = {
		name = rg_story.8.a
		hidden_effect = {
			country_event = {
				id = rg_story.9
			}
		}
		default_hide_option = yes
	}
	option = {
		name = rg_story.8.b
		hidden_effect = {
			country_event = {
				id = rg_story.9
			}
		}
	}
	option = {
		name = rg_story.8.c
		hidden_effect = {
			country_event = {
				id = rg_story.9
			}
		}
	}
}

country_event = {
	id = rg_story.9
	title = "graygoo.500.title"
	is_triggered_only = yes
	trigger = {
	}
	diplomatic = yes
	picture_event_data = {
		portrait = event_target:gray_species
		room = "ethic_spaceship_room"
	}
	desc = {
		text = "rg_story.9.desc"
	}
	option = {
		name = rg_story.9.a
		hidden_effect = {
			rg_create_gray_paperwork_testship_1 = yes
		}
		default_hide_option = yes
	}
}

country_event = {
	id = rg_story.10
	title = "rg_story.10.title"
	is_triggered_only = yes
	fire_only_once = yes
	trigger = {
		any_owned_fleet = {
			any_owned_ship = {
				has_component = RG_revive_component
			}
		}
	}
	picture = GFX_evt_ship_in_orbit
	show_sound = event_radio_chatter
	desc = {
		text = "rg_story.10.desc"
	}
	option = {
		name = rg_story.10.a
		default_hide_option = yes
	}
	option = {
		name = rg_story.10.b
	}
}

country_event = {
	id = rg_story.11
	title = "graygoo.500.title"
	is_triggered_only = yes
	trigger = {
		exists = event_target:guardian_dragon_country
	}
	diplomatic = yes
	picture_event_data = {
		portrait = event_target:gray_species
		room = "ethic_spaceship_room"
	}
	desc = {
		text = "rg_story.11.desc"
	}
	option = {
		name = rg_story.11.a
		hidden_effect = {
			country_event = {
				id = rg_story.12
			}
		}
		default_hide_option = yes
	}
	option = {
		name = rg_story.11.b
		hidden_effect = {
			country_event = {
				id = rg_story.12
			}
		}
	}
	option = {
		name = rg_story.11.c
		hidden_effect = {
			country_event = {
				id = rg_story.12
			}
		}
	}
}

country_event = {
	id = rg_story.12
	title = "graygoo.500.title"
	is_triggered_only = yes
	trigger = {
	}
	diplomatic = yes
	picture_event_data = {
		portrait = event_target:gray_species
		room = "ethic_spaceship_room"
	}
	desc = {
		text = "rg_story.12.desc"
	}
	immediate = {
		event_target:guardian_dragon_country = {
			random_owned_fleet = {
				limit = {
					has_fleet_flag = dragon_fleet
				}
				save_event_target_as = dragon_fleet_target
			}
		}
	}
	option = {
		name = rg_story.12.a
		allow = {
			exists = event_target:guardian_dragon_country
			event_target:guardian_dragon_country = {
				any_owned_fleet = {
					has_fleet_flag = dragon_fleet
				}
			}
		}
		hidden_effect = {
			enable_special_project = {
				name = RG_FAKE_DRAGON_SCAN_PROJECT
				location = event_target:dragon_fleet_target
				owner = root
			}
		}
	}
	option = {
		name = rg_story.12.b
	}
	option = {
		name = rg_story.12.c
	}
}

country_event = {
	id = rg_story.13
	title = "rg_story.13.title"
	is_triggered_only = yes
	trigger = {
	}
	picture = GFX_evt_space_dragon
	show_sound = evn_fc_observation
	desc = {
		text = "rg_story.13.desc"
	}
	option = {
		name = rg_story.13.a
		default_hide_option = yes
	}
}

country_event = {
	id = rg_story.14
	title = "rg_story.14.title"
	is_triggered_only = yes
	trigger = {
	}
	picture = GFX_evt_space_dragon
	show_sound = evn_fc_observation
	desc = {
		text = "rg_story.14.desc"
	}
	option = {
		name = rg_story.14.a
		default_hide_option = yes
	}
}

country_event = {
	id = rg_story.15
	title = "rg_story.15.title"
	is_triggered_only = yes
	trigger = {
	}
	picture = GFX_evt_space_dragon
	show_sound = evn_fc_observation
	desc = {
		text = "rg_story.15.desc"
	}
	option = {
		name = rg_story.15.a
		hidden_effect = {
			country_event = {
				id = rg_story.16
			}
		}
		default_hide_option = yes
	}
}

country_event = {
	id = rg_story.16
	title = "graygoo.500.title"
	is_triggered_only = yes
	trigger = {
	}
	diplomatic = yes
	picture_event_data = {
		portrait = event_target:gray_species
		room = "ethic_spaceship_room"
	}
	desc = {
		text = "rg_story.16.desc"
	}
	option = {
		name = rg_story.16.a
		hidden_effect = {
			country_event = {
				id = rg_story.17
				days = 360
				random = 640
			}
		}
		default_hide_option = yes
	}
}

country_event = {
	id = rg_story.17
	title = "graygoo.500.title"
	is_triggered_only = yes
	trigger = {
	}
	diplomatic = yes
	picture_event_data = {
		portrait = event_target:gray_species
		room = "ethic_spaceship_room"
	}
	desc = {
		text = "rg_story.17.desc"
	}
	option = {
		name = rg_story.17.a
		hidden_effect = {
			country_event = {
				id = rg_story.18
			}
		}
		default_hide_option = yes
	}
	option = {
		name = rg_story.17.b
		hidden_effect = {
			country_event = {
				id = rg_story.18
			}
		}
	}
	option = {
		name = rg_story.17.c
		hidden_effect = {
			country_event = {
				id = rg_story.18
			}
		}
	}
}

country_event = {
	id = rg_story.18
	title = "simulasion_dragon_name"
	is_triggered_only = yes
	trigger = {
	}
	diplomatic = yes
	picture_event_data = {
		portrait = event_target:rg_fake_dragon_admiral
		room = "ethic_spaceship_room"
	}
	desc = {
		text = "rg_story.18.desc"
	}
	immediate = {
		rg_create_fake_dragon = yes
	}
	option = {
		name = rg_story.18.a
		hidden_effect = {
			country_event = {
				id = rg_story.19
			}
		}
		default_hide_option = yes
	}
	option = {
		name = rg_story.18.b
		hidden_effect = {
			country_event = {
				id = rg_story.19
			}
		}
	}
	option = {
		name = rg_story.18.c
		hidden_effect = {
			country_event = {
				id = rg_story.19
			}
		}
	}
}

country_event = {
	id = rg_story.19
	title = "graygoo.500.title"
	is_triggered_only = yes
	trigger = {
	}
	diplomatic = yes
	picture_event_data = {
		portrait = event_target:gray_species
		room = "ethic_spaceship_room"
	}
	desc = {
		text = "rg_story.19.desc"
	}
	option = {
		name = rg_story.19.a
		default_hide_option = yes
	}
	option = {
		name = rg_story.19.b
	}
	option = {
		name = rg_story.19.c
	}
}

# sim dragon ga le
country_event = {
	id = rg_story.20
	hide_window = yes
	is_triggered_only = yes
	trigger = {
		exists = event_target:rg_fake_dragon_owner
		OR = {
			AND = {
				NOT = {
					exists = event_target:rg_fake_dragon_fleet
				}
				exists = event_target:rg_fake_dragon_admiral
			}
			event_target:rg_fake_dragon_fleet = {
				leader = {
					OR = {
						NOT = {
							exists = leader
						}
						NOR = {
							has_leader_flag = rg_fake_dragon
							has_leader_flag = rg_fake_dragon_reborn
						}
					}
				}
			}
		}
	}
	immediate = {
		random_owned_leader = {
			limit = {
				has_leader_flag = rg_fake_dragon
			}
			remove_trait = RG_leader_trait_admiral_timed_life
			add_trait = {
				trait = RG_leader_trait_admiral_born_tobe_dragon
				show_message = no
			}
			set_leader_flag = rg_fake_dragon_reborn
			set_age = 0
		}
		set_country_flag = rg_fake_dragon_reborn_country
		set_variable = {
			which = rg_fake_dragon_timedlife_counter
			value = 0
		}
		country_event = {
			id = rg_story.21
		}
	}
}