
targetted_decisions = {

	xgi-Use-your-power-to-heal = {
		filter = all_including_me
		ai = no
		
		from_potential = {
			OR = {
				trait = Lv_2_Spiritual_Seed_Nurturing_1
				trait = Lv_2_Spiritual_Seed_Nurturing_2
				trait = Lv_2_Spiritual_Seed_Nurturing_3
				trait = Lv_3_Soul_Germination_1
				trait = Lv_3_Soul_Germination_2
				trait = Lv_3_Soul_Germination_3
				trait = Lv_4_Soul_Perfection_1
				trait = Lv_4_Soul_Perfection_2
				trait = Lv_4_Soul_Perfection_3
				trait = Lv_5_Soul_Unification_1
				trait = Lv_5_Soul_Unification_2
				trait = Lv_5_Soul_Unification_3
				trait = Lv_6_Undying_Body_1
				trait = Lv_6_Undying_Body_2
				trait = Lv_6_Undying_Body_3
				trait = Lv_7_True_Immortal_1
				trait = Lv_7_True_Immortal_2
				trait = Lv_7_True_Immortal_3
				trait = Lv_8_Immortal_God_1
				trait = Lv_8_Immortal_God_2
				trait = Lv_8_Immortal_God_3
				trait = Lv_9_Ancestral_God_1
				trait = Lv_9_Ancestral_God_2
				trait = Lv_9_Ancestral_God_3
			}

		}
		potential = {
			OR = {
				is_ill = yes
				trait = wounded
				trait = maimed
				trait = infirm
				trait = incapable
				trait = inbred
				trait = depressed
				trait = possessed
				trait = lunatic
				trait = severely_injured
				trait = lovers_pox
				has_character_modifier = bedridden_illness
			}
		}
		allow = {
			OR = {
				is_ill = yes
				trait = wounded
				trait = maimed
				trait = infirm
				trait = incapable
				trait = inbred
				trait = depressed
				trait = possessed
				trait = lunatic
				trait = severely_injured
				trait = lovers_pox
				has_character_modifier = bedridden_illness
			}
			OR = {
				from = { piety = 7000 }
			}
			FROM = { opinion = { who = ROOT value = 40 } }
		}
		effect = {
			hidden_tooltip = {
				opinion = {
					modifier = xgi-love
					who = FROM
				}
				ROOT = {
					cure_illness = yes
					remove_trait = wounded
					remove_trait = maimed
					remove_trait = infirm
					remove_trait = incapable
					remove_trait = inbred
					remove_trait = depressed
					remove_trait = stressed
					remove_trait = possessed
					remove_trait = lunatic
					remove_trait = severely_injured
					remove_trait = lovers_pox
					remove_character_modifier = bedridden_illness
				}
			}
				from = { piety = -7000 }
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
		ai_target_filter = court
	}

	xgi-Use-your-power-to-heal-2ai = {
		filter = self
		ai = yes
		
		from_potential = {
			ai = yes
			OR = {
				trait = Lv_2_Spiritual_Seed_Nurturing_1
				trait = Lv_2_Spiritual_Seed_Nurturing_2
				trait = Lv_2_Spiritual_Seed_Nurturing_3
				trait = Lv_3_Soul_Germination_1
				trait = Lv_3_Soul_Germination_2
				trait = Lv_3_Soul_Germination_3
				trait = Lv_4_Soul_Perfection_1
				trait = Lv_4_Soul_Perfection_2
				trait = Lv_4_Soul_Perfection_3
				trait = Lv_5_Soul_Unification_1
				trait = Lv_5_Soul_Unification_2
				trait = Lv_5_Soul_Unification_3
				trait = Lv_6_Undying_Body_1
				trait = Lv_6_Undying_Body_2
				trait = Lv_6_Undying_Body_3
				trait = Lv_7_True_Immortal_1
				trait = Lv_7_True_Immortal_2
				trait = Lv_7_True_Immortal_3
				trait = Lv_8_Immortal_God_1
				trait = Lv_8_Immortal_God_2
				trait = Lv_8_Immortal_God_3
				trait = Lv_9_Ancestral_God_1
				trait = Lv_9_Ancestral_God_2
				trait = Lv_9_Ancestral_God_3
			}

		}
		potential = {
			OR = {
				is_ill = yes
				trait = wounded
				trait = maimed
				trait = infirm
				trait = incapable
				trait = inbred
				trait = depressed
				trait = stressed
				trait = possessed
				trait = lunatic
				trait = severely_injured
				trait = lovers_pox
				has_character_modifier = bedridden_illness
			}
		}
		allow = {
			OR = {
				is_ill = yes
				trait = wounded
				trait = maimed
				trait = infirm
				trait = incapable
				trait = inbred
				trait = depressed
				trait = stressed
				trait = possessed
				trait = lunatic
				trait = severely_injured
				trait = lovers_pox
				has_character_modifier = bedridden_illness
			}
			OR = {
				from = { piety = 7000 }
			}
		}
		effect = {
			hidden_tooltip = {
				ROOT = {
					cure_illness = yes
					remove_trait = wounded
					remove_trait = maimed
					remove_trait = infirm
					remove_trait = incapable
					remove_trait = inbred
					remove_trait = depressed
					remove_trait = stressed
					remove_trait = possessed
					remove_trait = lunatic
					remove_trait = severely_injured
					remove_trait = lovers_pox
					remove_character_modifier = bedridden_illness
				}
			}
				from = { piety = -7000 }
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
		}
	}

	xgi-improve_vitality = {

		only_playable = yes
		ai = no
		filter = all_including_me
	
		
		is_high_prio = no

		from_potential = {
			OR = {
				trait = Lv_2_Spiritual_Seed_Nurturing_1
				trait = Lv_2_Spiritual_Seed_Nurturing_2
				trait = Lv_2_Spiritual_Seed_Nurturing_3
				trait = Lv_3_Soul_Germination_1
				trait = Lv_3_Soul_Germination_2
				trait = Lv_3_Soul_Germination_3
				trait = Lv_4_Soul_Perfection_1
				trait = Lv_4_Soul_Perfection_2
				trait = Lv_4_Soul_Perfection_3
				trait = Lv_5_Soul_Unification_1
				trait = Lv_5_Soul_Unification_2
				trait = Lv_5_Soul_Unification_3
				trait = Lv_6_Undying_Body_1
				trait = Lv_6_Undying_Body_2
				trait = Lv_6_Undying_Body_3
				trait = Lv_7_True_Immortal_1
				trait = Lv_7_True_Immortal_2
				trait = Lv_7_True_Immortal_3
				trait = Lv_8_Immortal_God_1
				trait = Lv_8_Immortal_God_2
				trait = Lv_8_Immortal_God_3
				trait = Lv_9_Ancestral_God_1
				trait = Lv_9_Ancestral_God_2
				trait = Lv_9_Ancestral_God_3
			}
		}

		potential = {

		}

		allow = {
				from = { piety = 20000 }

		}
		
		effect = {
			health = 2
			from = { piety = -20000 }
				opinion = {
					modifier = xgi-love
					who = FROM
				}
		}
	}

	xgi-start_birthcontrol = {
		filter = self
		ai = no		
		only_playable = no
		
		is_high_prio = no
	
		from_potential = {
			OR = {
				trait = Lv_1_Spiritual_Seed_Shaping_1
				trait = Lv_1_Spiritual_Seed_Shaping_2
				trait = Lv_1_Spiritual_Seed_Shaping_3
				trait = Lv_2_Spiritual_Seed_Nurturing_1
				trait = Lv_2_Spiritual_Seed_Nurturing_2
				trait = Lv_2_Spiritual_Seed_Nurturing_3
				trait = Lv_3_Soul_Germination_1
				trait = Lv_3_Soul_Germination_2
				trait = Lv_3_Soul_Germination_3
				trait = Lv_4_Soul_Perfection_1
				trait = Lv_4_Soul_Perfection_2
				trait = Lv_4_Soul_Perfection_3
				trait = Lv_5_Soul_Unification_1
				trait = Lv_5_Soul_Unification_2
				trait = Lv_5_Soul_Unification_3
				trait = Lv_6_Undying_Body_1
				trait = Lv_6_Undying_Body_2
				trait = Lv_6_Undying_Body_3
				trait = Lv_7_True_Immortal_1
				trait = Lv_7_True_Immortal_2
				trait = Lv_7_True_Immortal_3
				trait = Lv_8_Immortal_God_1
				trait = Lv_8_Immortal_God_2
				trait = Lv_8_Immortal_God_3
				trait = Lv_9_Ancestral_God_1
				trait = Lv_9_Ancestral_God_2
				trait = Lv_9_Ancestral_God_3
			}
		}
	
		potential = {
			NOT = { has_character_modifier = xgi-birthcontrol }
		}
	
		allow = {
			NOT = { has_character_modifier = xgi-birthcontrol }
				from = { piety = 30 }
		}
		
		effect = {
				from = { piety = -30 }
			FROM = {
				add_character_modifier = {
					name = xgi-birthcontrol
					stacking = no
					duration =  -1
				}
			}
		}
	}

	xgi-stop_birthcontrol = {
		filter = self
		ai = no
		
		only_playable = yes
		
		is_high_prio = no
	
		from_potential = {
			OR = {
				trait = Lv_1_Spiritual_Seed_Shaping_1
				trait = Lv_1_Spiritual_Seed_Shaping_2
				trait = Lv_1_Spiritual_Seed_Shaping_3
				trait = Lv_2_Spiritual_Seed_Nurturing_1
				trait = Lv_2_Spiritual_Seed_Nurturing_2
				trait = Lv_2_Spiritual_Seed_Nurturing_3
				trait = Lv_3_Soul_Germination_1
				trait = Lv_3_Soul_Germination_2
				trait = Lv_3_Soul_Germination_3
				trait = Lv_4_Soul_Perfection_1
				trait = Lv_4_Soul_Perfection_2
				trait = Lv_4_Soul_Perfection_3
				trait = Lv_5_Soul_Unification_1
				trait = Lv_5_Soul_Unification_2
				trait = Lv_5_Soul_Unification_3
				trait = Lv_6_Undying_Body_1
				trait = Lv_6_Undying_Body_2
				trait = Lv_6_Undying_Body_3
				trait = Lv_7_True_Immortal_1
				trait = Lv_7_True_Immortal_2
				trait = Lv_7_True_Immortal_3
				trait = Lv_8_Immortal_God_1
				trait = Lv_8_Immortal_God_2
				trait = Lv_8_Immortal_God_3
				trait = Lv_9_Ancestral_God_1
				trait = Lv_9_Ancestral_God_2
				trait = Lv_9_Ancestral_God_3
			}
		}
	
		potential = {
			has_character_modifier = xgi-birthcontrol
		}
	
		allow = {
			has_character_modifier = xgi-birthcontrol
		}
		
		effect = {
			remove_character_modifier = xgi-birthcontrol
			remove_character_modifier = {
				name = xgi-birthcontrol
				stacking = no
				duration =  -1
			}
		}
	
	}

}