targetted_decisions = { 

Adopt_Other_Parents_Dynasty_decision = {

  filter = dynasty
  ai_target_filter = dynasty 

  potential = { 
	NOT = { age = 16 }
	is_child_of = FROM 
        dynasty = FROM
	mother_even_if_dead = { always = yes }
	father_even_if_dead = { always = yes }
	NOT = { mother_even_if_dead = { dynasty = none } }
        NOT = { father_even_if_dead = { dynasty = none } } 
	}
  allow = { 
	NOT = { is_primary_heir = FROM } 
	}
  effect = {
	     if = {
             limit = { father_even_if_dead = { dynasty = FROM } }
			 mother = { ROOT = { dynasty = PREV } 
			                         opinion = {modifier = opinion_made_child_adopt_my_dynasty
			                                    who = FROM} } 
			 recalc_succession = yes }
            
            if = {
             limit = { mother_even_if_dead = { dynasty = FROM } }
			 father = { ROOT = { dynasty = PREV }
			                         opinion = {modifier = opinion_made_child_adopt_my_dynasty
			                                    who = FROM } } }
			 recalc_succession = yes }

  revoke_allowed = { always = no }

  ai_will_do = {
	  factor = 0.005
	  
	  modifier = { factor = 0
	               is_ruler = false }

	  modifier = { factor = 0
	               any_playable_ruler = { ai = no 
                                              dynasty = ROOT} }

	  modifier = { factor = 0
	               NOT = { dynasty = FROM
					                                               any_dynasty_member = { count = 10
	                                                                                      is_alive = true } } } 	
																						  
	  modifier = { factor = 3
	               FROM = { OR = { trait = kind
				                   trait = charitable
								   trait = honorable
	                               trait = just } } }
			
	  modifier = { factor = 20
	               OR = { ROOT = { mother_even_if_dead = { NOR = { dynasty = FROM
					                                               any_dynasty_member = { count = 5
	                                                                                      is_alive = true } } } } 
						  ROOT = { father_even_if_dead = { NOR = { dynasty = FROM
					                                               any_dynasty_member = { count = 5
	                                                                                      is_alive = true } } } } } } } 	  
	 

}

}

