﻿#EK NOTE: perks grant xp on unlock for certain cultures

dark_insights_perk = {
	lifestyle = intrigue_lifestyle
	tree = intimidation
	position = { 0 0 }
	icon = node_intrigue
	
	auto_selection_weight = {
		value = 11
		if = {
			limit = {
				has_education_intrigue_trigger = yes
			}
			add = 1989
		}
		if = {
			limit = {
				has_focus = intrigue_intimidation_focus
			}
			multiply = 5
		}
		if = {
			limit = {
				can_start_new_lifestyle_tree_trigger = no
				NOT = { has_perk = dreadful_perk }
			}
			multiply = 0
		}
	}
	
	can_be_picked = {
		always = yes
	}
	
	effect = {
		hidden_effect = { # Set tracking variable
			set_variable = {
				name = dark_insights_prowess_increases
				value = 0
			}
			set_variable = {
				name = dark_insights_intrigue_increases
				value = 0
			}
		}
		custom_description_no_bullet = {
			text = dark_insights_perk_effect
		}
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = torturer_xp_rebate } }
            add_intrigue_lifestyle_xp = 330
        }
	}
}

divine_retribution_perk = {
	lifestyle = intrigue_lifestyle
	tree = intimidation
	position = { 0 1 }
	icon = node_intrigue
	
	parent = dark_insights_perk

	can_be_picked = {
		always = yes
	}
	
	effect = {
		custom_description_no_bullet = {
			text = divine_retribution_perk_effect
		}
		#EK ADDITION: xp for unlocking perk
		if = {
			limit = { culture = { has_cultural_parameter = torturer_xp_rebate } }
			add_intrigue_lifestyle_xp = 330
		}
	}
}

dreadful_perk = {
	lifestyle = intrigue_lifestyle
	tree = intimidation
	position = { 2 0 }
	icon = node_intrigue
	
	auto_selection_weight = {
		value = 11
		if = {
			limit = {
				has_education_intrigue_trigger = yes
			}
			add = 1989
		}
		if = {
			limit = {
				has_focus = intrigue_intimidation_focus
			}
			multiply = 5
		}
		if = {
			limit = {
				can_start_new_lifestyle_tree_trigger = no
				NOT = { has_perk = dark_insights_perk }
			}
			multiply = 0
		}
	}

	can_be_picked = {
		always = yes
	}
	
	character_modifier = {
		dread_gain_mult = 0.3
	}
	effect = {
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = torturer_xp_rebate } }
            add_intrigue_lifestyle_xp = 330
        }
    }
}

thriving_in_chaos_perk = {
	lifestyle = intrigue_lifestyle
	tree = intimidation
	position = { 2 1 }
	icon = node_intrigue

	parent = dreadful_perk
	
	can_be_picked = {
		always = yes
	}
	
	character_modifier = {
		martial_per_stress_level = 4
		intrigue_per_stress_level = 4
		prowess_per_stress_level = 6
	}
	effect = {
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = torturer_xp_rebate } }
            add_intrigue_lifestyle_xp = 330
        }
    }
}

malice_implicit_perk = {
	lifestyle = intrigue_lifestyle
	tree = intimidation
	position = { 1 2 }
	icon = node_intrigue

	parent = divine_retribution_perk
	parent = thriving_in_chaos_perk
	
	name = {
		first_valid = {
			triggered_desc = {
				trigger = { is_landless_adventurer = yes }
				desc = malice_implicit_perk_adventurer_name
			}
			desc = malice_implicit_perk_name
		}
	}
	
	can_be_picked = {
		always = yes
	}
	
	government_character_modifier = {
		flag = government_is_landless_adventurer
		invert_check = yes
		dread_per_tyranny_add = 0.5
	}
	
	effect = {
		if = {
			limit = {
				government_has_flag = government_is_landless_adventurer
			}	
			custom_tooltip = {
				text = adventurer_malice_implicit_perk_effect
			}
		}
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = torturer_xp_rebate } }
            add_intrigue_lifestyle_xp = 330
        }
    }
}

fear_tax_perk = {
	lifestyle = intrigue_lifestyle
	tree = intimidation
	position = { 1 3 }
	icon = node_intrigue
	parent = malice_implicit_perk
	
	name = {
		first_valid = {
			triggered_desc = {
				trigger = { is_landless_adventurer = yes }
				desc = fear_tax_perk_adventurer_name
			}
			desc = fear_tax_perk_name
		}
	}
	
	can_be_picked = {
		always = yes
	}
	
	government_character_modifier = {
		flag = government_is_landless_adventurer
		invert_check = yes
		intimidated_vassal_tax_contribution_mult = 0.15
		intimidated_vassal_levy_contribution_mult = 0.15
		cowed_vassal_tax_contribution_mult = 0.3
		cowed_vassal_levy_contribution_mult = 0.3
	}
	
	government_character_modifier = {
		flag = government_is_nomadic
		intimidated_vassal_herd_contribution_mult = 0.15
		cowed_vassal_herd_contribution_mult = 0.3
	}
	
	effect = {
		if = {
			limit = {
				government_has_flag = government_is_landless_adventurer
			}	
			custom_tooltip = {
				text = adventurer_fear_tax_perk_effect
			}
		}
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = torturer_xp_rebate } }
            add_intrigue_lifestyle_xp = 330
        }
    }
}

forever_infamous_perk = {
	lifestyle = intrigue_lifestyle
	tree = intimidation
	position = { 0 4 }
	icon = node_intrigue

	parent = fear_tax_perk
	
	can_be_picked = {
		always = yes
	}
	
	character_modifier = {
		dread_decay_mult = -10
	}
	
	effect = {
		if = {
			limit = {
				NOT = { government_has_flag = government_is_landless_adventurer }
			}
			custom_description_no_bullet = {
				text = murder_feast_perk_effect
			}
		}
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = torturer_xp_rebate } }
            add_intrigue_lifestyle_xp = 330
        }
    }
}

prison_feudal_complex_perk = {
	lifestyle = intrigue_lifestyle
	tree = intimidation
	position = { 2 4 }
	icon = node_intrigue

	parent = fear_tax_perk
	
	can_be_picked = {
		always = yes
	}
	
	effect = {
		custom_description_no_bullet = {
			text = prison_feudal_complex_perk_effect
		}
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = torturer_xp_rebate } }
            add_intrigue_lifestyle_xp = 330
        }
	}
}

torturer_perk = {
	lifestyle = intrigue_lifestyle
	tree = intimidation
	position = { 1 5 }
	icon = trait_torturer
	
	parent = forever_infamous_perk
	parent = prison_feudal_complex_perk
	
	can_be_picked = {
		always = yes
	}
	
	trait = torturer
	effect = {
		add_trait_force_tooltip = torturer
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = torturer_xp_rebate } }
            add_intrigue_lifestyle_xp = 500
        }
	}
}
