targetted_decisions = {

	send_gift = {
		ai_target_filter = sub_realm
		
		from_potential = {
			is_landed = yes
			OR = {
				is_merchant_republic = yes
				higher_tier_than = BARON
			}
		}
		potential = {
			OR = {
				AND = {
					is_landed = yes
					same_realm = FROM
				}
				FROM = {ai = no}
			}
			is_within_diplo_range = FROM
			NOT = { character = FROM }                            # Can't do this decision on yourself...
		}
		allow = {
			FROM = {
				wealth = 60
				has_regent = no
				#war = no
				NOT = {trait = greedy}
			}
			war = no
			prisoner = no
			custom_tooltip = {
				text = gift_cd_on
				hidden_tooltip = {
					NOT = {
						reverse_has_opinion_modifier = {
							modifier = gift_cd
							who = FROM
						}
					}
				}
			}
		}
		effect = {
			
			hidden_tooltip = {
				reverse_opinion = {
					modifier = gift_cd
					who = FROM
					months = 72
				}
				letter_event = { id = GFT.100 days = 3 }
			}

		}
		
		revoke_allowed = {
			always = no
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = {religion_group = FROM}
			}
			
			modifier = {
				factor = 0.25
				FROM = {
					NOT = {wealth = 3000} #Too much money give this thing out
				}
			}
			
			
			
			modifier = {
				factor = 0
				FROM = {
					any_liege = {
						character = ROOT #Do not gift your liege
					}
				}
			}
			
			modifier = {
				factor = 2.0
				FROM = {
					any_vassal = {
						character = ROOT #Gift your underlings
					}
				}
			}
			
			modifier = {
				factor = 2.0
				FROM = {
					any_vassal = {
						character = ROOT #Gift your underlings
					}
				}
				in_faction = yes
			}
			
			modifier = {
				factor = 0
				OR = {
					lower_tier_than = COUNT #Why bother
					is_theocracy = yes #Give to all your underlings if they are theocracy
				}
			}
			
			modifier = {
				factor = 2.5
				dynasty = FROM
			}
			
			modifier = {
				factor = 0
				independent = no
				same_liege = FROM
				FROM = {
					in_faction = no
					independent = no
				}
			}
			
			modifier = {
				factor = 8.0
				FROM = {
					in_faction = yes
					OR = {
						leads_faction = faction_succ_feudal_elective
						leads_faction = faction_lower_crown_authority
						leads_faction = faction_claimant
					}
				}
				same_liege = FROM
				NOT = {trait = content}
				in_faction = no
			}
			
			modifier = {
				factor = 0
				#Appropriate Range
				OR = {
					opinion = {
						who = FROM
						value = 50
					}
					
					NOT = {
						opinion = {
							who = FROM
							value = -20
						}
					}
				}
			}
			
			
			# modifier = {
				# factor = 0
				# trait = greedy
			# }
			modifier = {
				factor = 2
				trait = charitable
			}
			modifier = {
				factor = 3
				trait = ambitious
			}
			
			modifier = {
				factor = 0.75
				FROM = {
					NOT = {wealth = 100}
				}
			}
			
			modifier = {
				factor = 0.75
				FROM = {
					NOT = {wealth = 150}
				}
			}
			
			modifier = {
				factor = 0.75
				FROM = {
					NOT = {wealth = 250}
				}
			}
		}
	}
	
}
	