﻿nht_reinforce_barony_perk_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/nht_city_wall_construction.dds"
	}
	desc = nht_reinforce_barony_perk_decision_desc

	sort_order = 1000
	
	is_shown = {
		OR = {
			has_perk = nht_stonemasons_grace_perk
			has_game_rule = nht_fortify_holding_decision_no_requi
		}
		NOT = { has_variable = nht_has_reinforced_barony }
		NOT = { government_has_flag = government_is_landless_adventurer }
	}

	is_valid = {
		custom_description = {
			text = "has_nht_eligble_barony"
			any_held_county = {
				any_in_de_jure_hierarchy = {
					nht_fortified_barony_is_valid_trigger  = { CHARACTER = scope:ruler }
				}
			}
		}
	}
	
	widget = {
		gui = decision_view_widget_nht_reinforce_barony
		controller = create_holy_order
		barony_valid = {
			trigger_if = {
				limit = { exists = this }
				nht_fortified_barony_is_valid_trigger = { CHARACTER = scope:ruler }
			}
			trigger_else = {
				custom_description = {
					text = "has_nht_barony_selected"
					always = no
				}
			}
		}
	}

	cost = {
		gold = 200
	}

	effect = {
		scope:barony.title_province = {
			add_province_modifier = {
				modifier = nht_reinforced_barony_modifier
				years = 40
			}
			save_scope_as = new_holy_order
		}		
		set_variable = {
			name = nht_has_reinforced_barony
			years = 40
		}
	}

	ai_potential = {
		short_term_gold >= {
			value = 200
		}
		highest_held_title_tier > tier_barony
	}
	
	ai_check_interval = 120

	ai_will_do = {
		base = 100
	}
}


nht_sack_countryside_provisions_decision = {
	picture = { reference = "gfx/interface/illustrations/decisions/ep3_decision_laamp_neutral_mountain.dds" }
	desc = nht_sack_countryside_provisions_decision_desc
	selection_tooltip = nht_sack_countryside_provisions_decision_tooltip
	ai_check_interval = 72
	sort_order = 200
	cooldown = { years = 5 }
	decision_group_type = adventurer_minor

	is_shown = {
		is_landless_adventurer = yes
		OR = {
			has_perk = nht_stonemasons_grace_perk
			has_game_rule = nht_sack_countryside_provisions_decision_no_requi
		}
	}
	is_valid_showing_failures_only = {
		is_available_allow_travelling = yes
	}

	effect = {
		custom_tooltip = {
			text = nht_sack_countryside_provisions_decision_effect_tt
			trigger_event = nht_sack_countryside_provisions.0001
		}
	}

	ai_potential = {
		government_has_flag = government_is_landless_adventurer
		has_perk = nht_stonemasons_grace_perk
		domicile ?= { provisions < max_provisions }
	}

	ai_will_do = {
		base = 100
	}
}