targetted_decisions = {
	embrace_charmeleon = {
		only_playable = yes
		
		filter = self
		ai_target_filter = self
	
		potential = {
			is_playable = yes
			age = 16
			has_character_flag = is_charlemagne
			NOT = { culture_group = draconian }
			
			any_independent_ruler = { culture_group = draconian }
		}
		allow = {
			prisoner = no
			tier = EMPEROR
		}
		effect = {
			culture = drakken
			set_name = "Charmeleon"
			if = {
				limit = { has_nickname = no }
				give_nickname = nick_the_dragon
			}
			hidden_tooltip = {
				set_graphical_culture = drakken
				add_trait = sympathy_human
			}
			random_independent_ruler = {
				limit = { culture_group = draconian }
				character_event = { id = drakken_event.0017 days = 7 }
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0.5 # Slow it down a bit
			}
			
			modifier = {
				factor = 0
				has_game_rule = {
					name = supernatural_events
					value = off
				}
			}
			modifier = {
				factor = 0
				NOT = {
					has_game_rule = {
						name = supernatural_events
						value = unrestricted
					}
				}
			}
			modifier = {
				factor = 0
				has_game_rule = {
					name = silly_events
					value = off
				}
			}
			modifier = {
				factor = 0
				NOT = {
					has_game_rule = {
						name = silly_events
						value = unrestricted
					}
				}
			}
		}
	}
	convert_to_wrymish = {
		only_playable = yes
		
		filter = self
		ai_target_filter = self
	
		potential = {
			is_playable = yes
			culture = drakken
			capital_scope = {
				OR = {
					empire = { title = e_scandinavia }
					duchy = { title = d_iceland }
				}
				NOT = { duchy = { title = d_orkney } }
			}
			any_realm_province = {
				culture = wrym
			}
		}
		allow = {
			culture = drakken
		}
		effect = {
			culture = wrym
			any_courtier = {
				limit = {
					culture = drakken
					employer = { character = ROOT }
					dynasty = ROOT
				}
				culture = wrym
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0.2 # Slow it down a bit
			}
			
			modifier = {
				factor = 0.01
				capital_scope = {
					NOT = { culture = wrym }
				}
			}
			modifier = {
				factor = 2.0
				liege = { culture = wrym }
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 2
					culture = wrym
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 4
					culture = wrym
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 6
					culture = wrym
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 8
					culture = wrym
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 10
					culture = wrym
				}
			}
		}
	}
	convert_to_lerst = {
		only_playable = yes
		
		filter = self
		ai_target_filter = self
		
		potential = {
			is_playable = yes
			culture = drakken
			capital_scope = {
				OR = {
					empire = { title = e_britannia }
					duchy = { title = d_orkney }
				}
				NOT = { duchy = { title = d_iceland } }
			}
			any_realm_province = {
				culture = lern
			}
		}
		allow = {
			culture = drakken
		}
		effect = {
			culture = lern
			any_courtier = {
				limit = {
					culture = drakken
					employer = { character = ROOT }
					dynasty = ROOT
				}
				culture = lern
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0.2 # Slow it down a bit
			}
			
			modifier = {
				factor = 0.01
				capital_scope = {
					NOT = { culture = lern }
				}
			}
			modifier = {
				factor = 2.0
				liege = { culture = lern }
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 2
					culture = lern
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 4
					culture = lern
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 6
					culture = lern
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 8
					culture = lern
				}
			}
			modifier = {
				factor = 1.1
				num_culture_realm_provs = {
					value = 10
					culture = lern
				}
			}
		}
	}

	#Taken from vanilla decision
	prisoner_dragon_burning = {
		only_playable = yes
		filter = court
		ai_target_filter = court
		ai_check_interval = 12
	    diplomacy_icon = GFX_special_bloodline_decision
	
		from_potential = {
			#has_dlc = "Holy Fury"
			is_playable = yes
			is_adult = yes
			prisoner = no
			NOT = { trait = incapable }
			OR = {
				any_owned_bloodline = {
					has_bloodline_flag = bloodline_murder_burn 
				}
				culture = dragon_culture #Animal World.
				culture = dragon_fantasy #Fantasy World.
				any_child = { culture = dragon_culture } #Animal World.
				any_child = { culture = dragon_fantasy } #Fantasy World.
			}
		}
	
		potential = {
			host = { character = FROM }
			prisoner = yes
			age = 16
		}
		allow = {
			ROOT = { 
				NOT = { diplomatic_immunity = yes }
				prisoner = yes
			}
		}
		effect = {
			hidden_tooltip = {
				if = {
					limit = {
						FROM = { 
							has_nickname = no
							is_adult = yes
							NOT = { trait = incapable }
						}
					}
					random_list = {
						1 = {
							FROM = { give_nickname = nick_the_cruel }
						}
						5 = {
							FROM = { give_nickname = nick_the_dragon }
						}
						5 = {
							FROM = { give_nickname = nick_the_monster }
						}
						5 = {
							FROM = { give_nickname = nick_the_tyrant }
						}
						300 = {}
					}
				}
			}
			if = { 
				limit = { 
					is_ruler = yes 
					vassal_of = FROM #Executing your own vassals this way will intimidate the others.
				} 
				custom_tooltip = { text = tooltip_decision_brazen_bull }
				hidden_tooltip = { 
					FROM = { 
						any_courtier_or_vassal = { 
							limit = {
								age = 5 #Old enough to witness and understand what's happening. 
								NOT = { trait = brave } 
							}
							opinion = { 
								who = FROM 
								modifier = opinion_scared_into_submission
								years = 4
							}
						}
					}
				} 
			}
			FROM = { 
				add_character_modifier = { 
					modifier = intimidated_plotters
					duration = 1250
				} 
			}
			
			hidden_tooltip = {
				FROM = { character_event = { id = HF.24234 } }
				character_event = { id = HF.24235 }	
			}
			hidden_tooltip = {
				mother = {
					opinion = {
						modifier = opinion_executed_child
						who = FROM
					}
				}
				father = {
					opinion = {
						modifier = opinion_executed_child
						who = FROM
					}
				}
				spouse = {
					opinion = {
						modifier = opinion_spouse_slayer
						who = FROM
					}
				}
				any_child = {
					opinion = {
						modifier = opinion_killed_close_kin
						who = FROM
					}
				}
				if = {
					limit = {
						FROM = {
							NOT = { dynasty = ROOT }
							NOT = { sibling = ROOT }
						}
					}
					any_sibling = {
						opinion = {
							modifier = opinion_killed_close_kin
							who = FROM
						}
					}
				}
			}
			
			FROM = {
				show_scope_change = no
				if = {
					limit = {
						NOR = {
							trait = cruel
							trait = kind
						}
					}
					random = {
						chance = 25
						add_trait = cruel
						hidden_tooltip = { character_event = { id = 38259 } }
					}
				}

				if = {
					limit = { trait = kind }
					random = { 
						chance = 50
						remove_trait = kind
						hidden_tooltip = {
							character_event = { id = 38307 }
						}
					}
					hidden_tooltip = {
						if = { 
							limit = { 
								OR = {
									NOR = {
										trait = cruel
										trait = impaler
										trait = lunatic
									}
									is_close_relative = ROOT
								}
							}
							random_list = {
								20 = {
									add_trait = stressed
									hidden_tooltip = { character_event = { id = 38282 } }
								}
								8 = {
									add_trait = depressed
									hidden_tooltip = { character_event = { id = 38288 } }
								}
								2 = {
									add_trait = lunatic
								}
								70 = {
									#nothing
								}
							}
						}
					}
				}
				tiered_piety_negative_effect = yes
			}
		}

		revoke_allowed = {
			always = no
		}

		ai_will_do = {
			factor = 0.1
			
			modifier = {
				factor = 0
				OR = {
					reverse_opinion = { who = FROM value = 40 }
					FROM = { NOT = { piety = 100 } }
					FROM = { LIEGE = { dynasty = ROOT } }
				}
			}
			modifier = {
				factor = 0
				FROM = {
					NOR = {
						trait = cruel
						trait = impaler
						trait = wroth
						is_rival = ROOT
						trait = arbitrary
						trait = paranoid
						trait = deceitful
						trait = proud
						trait = lunatic
						trait = possessed
					}
				}
			}
			modifier = {
				factor = 0
				FROM = {
					OR = {
						trait = kind
						trait = just
						trait = patient
						trait = shy
						trait = greedy
					}
				}
			}
			modifier = {
				factor = 10
				FROM = {
					OR = {
						trait = cruel
						trait = impaler
						trait = wroth
						is_rival = ROOT
						trait = arbitrary
					}
				}
			}
		}
	}
}

decisions = {
	convert_realm_drakken = {
		potential = {
			culture = drakken
			is_playable = yes
			NOT = { has_character_flag = drakken_converted_realm}
			any_realm_province = {
				NOT = { culture_group = drakken }
				has_province_flag = province_has_drakkodin
			}
			OR = {
				any_vassal = {
					OR = {
						culture = drakken
						culture = wrym
						culture = lern
					}
				}
				any_courtier = {
					OR = {
						culture = drakken
						culture = wrym
						culture = lern
					}
				}
			}
			OR = {
				ai = no
				AND = {
					trait = arbitrary
					prestige = 250
				}
				AND = {
					trait = cruel
					prestige = 250
				}
				prestige = 1000
			}
		}
		allow = {
			is_adult = yes
			prisoner = no
			war = no
			prestige = 100
		}
		effect = {
			prestige = -100
			custom_tooltip = { text = become_drakken_tooltip }
			hidden_tooltip = {
				set_character_flag = drakken_converted_realm
				any_realm_province = {
					limit = { 
						OR = {
							culture = drakken
							culture = wrym
							culture = lern
						}
						has_province_flag = province_has_drakkodin
					}
					clr_province_flag = province_has_drakkodin
					culture = drakken
				}
				any_vassal = {
					limit = { 
						OR = {
							culture = drakken
							culture = wrym
							culture = lern
						}
					}
					remove_trait = has_drakkodin
					remove_trait = lisp
					add_trait = sympathy_human
					culture = drakken
				}
				any_courtier = {
					limit = { 
						OR = {
							culture = drakken
							culture = wrym
							culture = lern
						}
					}
					remove_trait = has_drakkodin
					remove_trait = lisp
					add_trait = sympathy_human
					culture = drakken
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	form_kingdom_of_avalon = {
		is_high_prio = yes
		potential = {
			is_alternate_start = no
			culture_group = draconian
			is_playable = yes
			tier = DUKE
			#NOT = { tier = KING }
			OR = {
				ai = no
				AND = {
					trait = proud
					prestige = 5000
				}
				AND = {
					trait = ambitious
					prestige = 5000
				}
				prestige = 15000
			}
		}
		allow = {
			is_adult = yes
			prisoner = no
			NOT = { trait = incapable }
			independent = yes
			OR = {
				has_landed_title = d_orkney
				has_landed_title = d_iceland
			}
			OR = {
				realm_size = 20
				custom_tooltip = {
					text = form_new_kingdom_small_requirement_tooltip
					hidden_tooltip = {
						any_demesne_title = {
							count = 2
							tier = DUKE
						}
					}
				}
			}
			wealth = 200
		}
		effect = {
			custom_tooltip = { text = form_kingdom_of_avalon_tooltip }
			wealth = -200
			primary_title = {
				k_avalon = {
					grant_title = ROOT
					copy_title_laws = PREVPREV
				}
				hidden_tooltip = {
					empire = {
						ROOT = {
							primary_title = {
								de_jure_liege = PREVPREV
							}
						}
					}
					d_orkney = {
						de_jure_liege = k_avalon
					}
					d_iceland = {
						de_jure_liege = k_avalon
					}
				}

			}
			if = {
				limit = { has_law = succ_tanistry }
				sound_effect = bloodline_added
				if = { 
					limit = { is_female = no }
					create_bloodline = {
						type = avalon_bloodline_02
					}
				}
				if = { 
					limit = { is_female = yes }
					create_bloodline = {
						type = avalon_bloodline_02
						inheritance = all_descendants
					}		
				}
			}
			else = {
				sound_effect = bloodline_added
				if = { 
					limit = { is_female = no }
					create_bloodline = {
						type = avalon_bloodline_01
					}
				}
				if = { 
					limit = { is_female = yes }
					create_bloodline = {
						type = avalon_bloodline_01
						inheritance = all_descendants
					}		
				}
			}
			chronicle = {
				entry = CHRONICLE_FOUNDED_NEW_KINGDOM_OR_EMPIRE
				portrait = [Root.GetID]
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
		}
	}
}