# -*- ck2.decisions -*-

decisions = {
	
	cathar_remove_perfecti = {
		ai_target_filter = self
		
		potential = {
			religion = cathar
			trait = perfecti
		}
		allow = {
			war = no
			religion = cathar
			custom_tooltip = { text = NEEDS_200_PRESTIGE_COST hidden_tooltip = { prestige = 200 } }
			custom_tooltip = { text = NEEDS_200_PIETY_COST hidden_tooltip = { piety = 50 } }
		}
		effect = {
			prestige = -200
			piety = -50
			remove_trait = perfecti
			clr_character_flag = consolamentum_taken
			if = {
				limit = { trait = celibate }
				remove_trait = celibate
			}
			if = {
				limit = { trait = zealous }
				remove_trait = zealous
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.1
				always = yes
			}
			modifier = {
				factor = 0.1
				is_theocracy = yes
			}
			modifier = {
				factor = 0.2
				trait = zealous
			}
			modifier = {
				factor = 4
				trait = gluttonous
			}
			modifier = {
				factor = 4
				trait = envious
			}
			modifier = {
				factor = 4
				trait = greedy
			}
			modifier = {
				factor = 0
				NOT = { age = 25 }
			}
			modifier = {
				factor = 2
				OR = {
					trait = possessed
					trait = lunatic
					trait = detached_priest
					is_theocracy = no
				}
			}
		}
	}
	
}