namespace = RR
# The Restoration of Roman Republic
narrative_event = {
	id = RR.1
	title = RRET.1
	desc = {
		text = RRETXT.1
		trigger = { 
			is_alternate_start = no
		}
	}
	desc = {
		text = RRETXT.1
		trigger = { 
			is_alternate_start = yes
		}
	}
	
	picture = GFX_evt_rome_restored_byzantine
	
	is_triggered_only = yes
	
	trigger = {
            has_landed_title = k_roman_republic
    }
	
	option = {
		name = RREO.1
		hidden_tooltip = {
		    any_direct_de_jure_vassal_title = {
				de_jure_liege = k_roman_republic
				}
			if = { #Hellenic Resurgence
				limit = { 
					has_dlc = "Holy Fury" 
					religion_group = christian
					has_game_rule = {
						name = hellenism_rule
						value = on
					}
					OR = {
			            culture = italian
                        culture = greek
                        culture = roman
                        culture = dalmatian
                        culture = sardinian				
			        }
				}
				character_event = { id = HF.23106 days = 15 }				
			}
			if = { #Burn and Rebuild Rome.
				limit = { 
					has_dlc = "Holy Fury" 
					333 = { any_province_holding = { holding_type = temple count = 2 } } #Check if Gengis Khan or whomever hasn't already leveled the place down.
				}
				333 = { province_event = { id = HF.23100 days = 155 } }				
			}
		}
		if = { #New Imperial Bloodline. (male)
				limit = { 
					has_dlc = "Holy Fury" 
					is_female = no
					is_alternate_start = no
					is_republic = no
					OR = { 
						religion_group = christian
						religion = hellenic_pagan
						religion = hellenic_pagan_reformed
					}
	    			NOT = {
	    				any_owned_bloodline = {
    						has_bloodline_flag = roman_bloodline #Not if already member of a famous historical Roman Bloodline.
    					}
    				}
				}
				create_bloodline = {
					type = roman_consul_male
				}
				new_bloodline = {
					set_description = "First Consul of the revived Roman Republic"
				}	
				sound_effect = bloodline_added			
			}
		if = { #New Imperial Bloodline. (female)
			limit = { 
				has_dlc = "Holy Fury" 
				is_female = yes
				is_alternate_start = no
				is_republic = no
				OR = { 
					religion_group = christian
					religion = hellenic_pagan
					religion = hellenic_pagan_reformed
				}
    			NOT = {
    				any_owned_bloodline = {
						has_bloodline_flag = roman_bloodline #Not if already member of a famous historical Roman Bloodline.
					}
				}
			}
			create_bloodline = {
				type = roman_consul_female
			}
			new_bloodline = {
				set_description = "First Consul of the revived Roman Republic"
			}				
			sound_effect = bloodline_added
		}
	}
}
