# Targetted decisions are possible vs _all_ other characters and shown are in the Diplomacy View, not the Intrigue View. The taker is in the FROM scope.
#
# filter = [self/court/home_court/vassals/sub_realm/realm/dynasty/all] (self MUST be set for decisions targetting only the taker, the other filter types can be set to lessen CPU load)
# #ai_target_filter  = [self/court/home_court/vassals/sub_realm/realm/dynasty/all] (which characters for which the AI evaluates the decision.)
#	court: all characters in the AI's host court, including prisoners, and characters currently away (wards, prisoners, etc)
#	home_court: all characters in the AI's home court, including prisoners, and characters currently away (wards, prisoners, etc)
#	vassals: direct vassal rulers of the AI's employer
#	sub_realm: all characters below the AI's employer
#	realm: all characters in the same top realm as the AI
#	dynasty: all members of the same dynasty (including the dead!)
#	all: all living characters (Avoid if possible. VERY CPU-HEAVY!)
#	

targetted_decisions = {

	Use_Off_Potion = {
		is_high_prio = no
		filter = self
		from_potential = {
			is_adult = yes
			ai = no
			prisoner = no
			has_regent = no
			trait = Off_Potion
		}
		
		potential = {
			is_adult = yes
			ai = no
			prisoner = no
			has_regent = no
			trait = Off_Potion
			vassal_of = FROM
				
		}
		
		allow = {
			
		}
		
		effect = {
			remove_trait = Off_Potion
			add_character_modifier = { name = off_potion duration = 30 }
		}
		
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	Use_Def_Potion = {
		is_high_prio = no
		filter = self
		from_potential = {
			is_adult = yes
			ai = no
			prisoner = no
			has_regent = no
			trait = Def_Potion
		}
		
		potential = {
			is_adult = yes
			ai = no
			prisoner = no
			has_regent = no
			trait = Def_Potion
			vassal_of = FROM
				
		}
		
		allow = {
			
		}
		
		effect = {
			remove_trait = Def_Potion
			add_character_modifier = { name = def_potion duration = 30 }
		}
		
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	Use_Morale_Potion = {
		is_high_prio = no
		filter = self
		from_potential = {
			is_adult = yes
			ai = no
			prisoner = no
			has_regent = no
			trait = Morale_Potion
		}
		
		potential = {
			is_adult = yes
			ai = no
			prisoner = no
			has_regent = no
			trait = Morale_Potion
				
		}
		
		allow = {
			
		}
		
		effect = {
			remove_trait = Morale_Potion
			add_character_modifier = { name = morale_potion duration = 30 }
		}
		
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	Use_Heal_Potion = {
		is_high_prio = no
		filter = vassals
		from_potential = {
			is_adult = yes
			ai = no
			prisoner = no
			trait = Heal_Potion
		}
		
		potential = {
			is_adult = yes
			prisoner = no
			vassal_of = FROM
			OR = {
				trait = ill
				trait = pneumonic
				trait = has_tuberculosis
				trait = has_typhoid_fever
				trait = has_typhus
				trait = has_bubonic_plague
				trait = has_measles
				trait = has_small_pox
				trait = leper
				trait = infirm
				trait = incapable
				trait = maimed
				trait = wounded 
				trait = syphilitic
			}
		}
		
		allow = {
			
		}
		
		effect = {
			remove_trait = Heal_Potion
			add_character_modifier = { name = heal_potion duration = 30 }
			if = {
				limit = {
					trait = ill 
				}
				remove_trait = ill 
			}			
			if = {
				limit = {
					trait = pneumonic 
				}
				remove_trait = pneumonic 
			}
			if = {
				limit = {
					trait = has_tuberculosis
				}
				remove_trait = has_tuberculosis 
			}		
			if = {
				limit = {
					trait = has_typhoid_fever  
				}
				remove_trait = has_typhoid_fever  
			}
			if = {
				limit = {
					trait = has_typhus  
				}
				remove_trait = has_typhus  
			}
			if = {
				limit = {
					trait = has_bubonic_plague  
				}
				remove_trait = has_bubonic_plague  
			}
			if = {
				limit = {
					trait = has_measles 
				}
				remove_trait = has_measles 
			}
			if = {
				limit = {
					trait = has_small_pox 
				}
				remove_trait = has_small_pox 
			}
			if = {
				limit = {
					trait = leper 
				}
				remove_trait = leper 
			}
			if = {
				limit = {
					trait = infirm 
				}
				remove_trait = infirm 
			}
			if = {
				limit = {
					trait = incapable 
				}
				remove_trait = incapable 
			}
			if = {
				limit = {
					trait = maimed 
				}
				remove_trait = maimed 
			}
			if = {
				limit = {
					trait = wounded 
				}
				remove_trait = wounded 
			}		
			if = {
				limit = {
					trait = syphilitic 
				}
				remove_trait = syphilitic 
			}
		}
		
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	Use_Mana_Potion = {
		is_high_prio = no
		filter = self
		from_potential = {
			is_adult = yes
			ai = no
			prisoner = no
			has_regent = no
			trait = Mana_Potion
		}
		
		potential = {
			is_adult = yes
			ai = no
			prisoner = no
			has_regent = no
			trait = Mana_Potion
			vassal_of = FROM
				
		}
		
		allow = {
			
		}
		
		effect = {
			remove_trait = Mana_Potion
			add_character_modifier = { name = mana_potion duration = 180 }
		}
		
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	Use_Wealth_Potion = {
		is_high_prio = no
		filter = self
		from_potential = {
			is_adult = yes
			ai = no
			prisoner = no
			has_regent = no
			trait = Wealth_Potion
		}
		
		potential = {
			is_adult = yes
			prisoner = no
			has_regent = no
			vassal_of = FROM
				
		}
		
		allow = {
			
		}
		
		effect = {
			remove_trait = Wealth_Potion
			add_character_modifier = { name = wealth_potion duration = 60 }
		}
		
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	Use_Opinion_Potion = {
		is_high_prio = no
		filter = self
		from_potential = {
			is_adult = yes
			ai = no
			prisoner = no
			has_regent = no
			trait = Opinion_Potion
		}
		
		potential = {
			is_adult = yes
			prisoner = no
			has_regent = no
			vassal_of = FROM
				
		}
		
		allow = {
			
		}
		
		effect = {
			remove_trait = Opinion_Potion
			add_character_modifier = { name = opinion_potion duration = 30 }
		}
		
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	Use_Strength_Potion = {
		is_high_prio = no
		filter = self
		from_potential = {
			is_adult = yes
			ai = no
			prisoner = no
			has_regent = no
			trait = Strength_Potion
		}
		
		potential = {
			is_adult = yes
			prisoner = no
			has_regent = no
			ai = no
			vassal_of = FROM
			trait = Strength_Potion
				
		}
		
		allow = {
			
		}
		
		effect = {
			remove_trait = Strength_Potion
			add_character_modifier = { name = strength_potion duration = 30 }
		}
		
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	Use_Construction_Potion = {
		is_high_prio = no
		filter = self
		from_potential = {
			is_adult = yes
			ai = no
			prisoner = no
			has_regent = no
			trait = Construction_Potion
		}
		
		potential = {
			is_adult = yes
			prisoner = no
			has_regent = no
			ai = no
			vassal_of = FROM
			trait = Construction_Potion
				
		}
		
		allow = {
			
		}
		
		effect = {
			remove_trait = Construction_Potion
			add_character_modifier = { name = construction_potion duration = 180 }
		}
		
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
}