﻿lease_holding_interaction = {
	category = interaction_category_friendly
	common_interaction = yes
	desc = lease_holding_interaction.desc
	interface_priority = 80
	target_type = title
	target_filter = recipient_domain_titles
	auto_accept = no
	ai_accept = {
		base = -50 # Try to make it 0 for most interactions

		modifier = {
			scope:hook = yes
			add = 100
			desc = SCHEME_WEAK_HOOK_USED
		}
		
		modifier = {
		 scope:actor = {
			exists = dynasty
			dynasty.dynasty_prestige_level >= 2
		 }
			add = {
				value = dynasty.dynasty_prestige_level
				add = 10
				subtract = 5
			}
		 
		}
		modifier = {
			 has_trait = zealous
			 add = 30
			}
		modifier = {
			 has_trait = cynical
			 add = -50
			}
		opinion_modifier = { # Opinion Factor
			who = scope:recipient
			opinion_target = scope:actor
			multiplier = 1
			desc = AI_SIMPLE_OPINION_REASON
		}
	
	
	}
	ai_frequency = 0
	
	
	can_be_picked_title = {
		scope:target = {
			is_leased_out = no
			tier = tier_barony
		}
	}
	
	is_shown = {
		scope:actor = {
			is_ai = no
			OR = {
			AND = {
			has_character_modifier = multi_baron_modifier
			is_landed = yes }
			has_government = holy_order_government}
		}
		scope:recipient = {
			is_landed = yes
			OR = {
			has_government = feudal_government 
			AND = {
			scope:actor = { has_government = holy_order_government }
			has_government = republic_government}
			} #So holy orders can lease cities too
		}
	}
	
	can_send = {
		scope:actor = {
			is_ai = no
			is_ruler = yes
			gold >= 500
		}
	 } 	
	
	
	on_accept = {
	    scope:actor = { pay_short_term_gold = { target = scope:recipient gold = 500 }}
		scope:actor.faith = { random_faith_holy_order = { limit = { this.leader = scope:actor } save_scope_as = holy_order } }
		scope:target = {		
			lease_out_to = scope:holy_order
		}
	}
}