﻿# Diplomacy 1 (Foreign Affairs)
accomplished_forger_perk = {
	lifestyle = diplomacy_lifestyle
	tree = foreign_affairs
	position = { 2 3.75 }
	icon = node_diplomacy
	
	parent = forced_vassalage_perk
	parent = flexible_truces_perk
	parent = embassies_perk
	
	name = {
		first_valid = {
			triggered_desc = {
				trigger = { has_government = landless_adventurer_government }
				desc = accomplished_forger_perk_adventurer_name
			}
			desc = accomplished_forger_perk_name
		}
	}
	
	government_character_modifier = {
		flag = government_is_landless_adventurer
		owned_scheme_secrecy_add = 25
	}
	
	effect = {
		if = {
			limit = {
				NOT = { government_has_flag = government_is_landless_adventurer }
			}	
			custom_description_no_bullet = {
				text = accomplished_forger_perk_effect
			}
			custom_description_no_bullet = {
				text = red_wedding_perk_effect
			}
		}
		else = {
			custom_tooltip = {
				text = adventurer_accomplished_forger_perk_effect
			}
			custom_tooltip = {
				text = adventurer_accomplished_forger_perk_effect_2
			}
		}
		# SAS Change
		if = {
			limit = {
				OR = {
					has_game_rule = sas_all_modified_perks
					has_game_rule = spy_and_interactions
				}
			}
			custom_description_no_bullet = {
				text = accomplished_forger_ennoble_perk_effect
			}
		}
		# SAS Change End
	}
}

# Intrigue 1 (Skulduggery)
digging_for_dirt_perk = {
	lifestyle = intrigue_lifestyle
	tree = skulduggery
	position = { 0 1.25 }
	icon = node_intrigue

	parent = truth_is_relative_perk

	can_be_picked = {
		always = yes
	}

	effect = {
		if = {
			limit = {
				NOT = { government_has_flag = government_is_landless_adventurer }
			}
			custom_description_no_bullet = {
				text = digging_for_dirt_perk_effect
			}
		}
		if = {
			limit = {
				government_has_flag = government_is_landless_adventurer
			}	
			custom_tooltip = {
				text = adventurer_digging_for_dirt_perk_effect
			}
		}
		# SAS Change
		custom_description_no_bullet = {
			text = convincing_perk_effect
		}
		# SAS Change End
	}
}

# Intrigue 2 (Temptation)
unshackled_lust_perk = {
	lifestyle = intrigue_lifestyle
	tree = temptation
	position = { 0 1.25 }
	icon = node_intrigue
	
	parent = like_weed_in_a_garden_perk
	
	can_be_picked = {
		always = yes
	}
	
	effect = {
		custom_description_no_bullet = {
			text = unshackled_lust_perk_effect
		}
		# SAS Change
		if = {
			limit = {
				OR = {
					has_game_rule = sas_all_modified_perks
					has_game_rule = spy_and_intrigue_buffs
				}
			}
			custom_description_no_bullet = {
				text = sas_unshackled_lust_perk_effect
			}
		}
		hidden_effect = {
			if = {
				limit = {
					OR = {
						has_game_rule = sas_all_modified_perks
						has_game_rule = spy_and_intrigue_buffs
					}
				}
				add_character_modifier = {
					modifier = unshackled_lust_character_modifier
				}
			}
		}
		# SAS Change End
	}
}

subtle_desire_perk = {
	lifestyle = intrigue_lifestyle
	tree = temptation
	position = { 0 2.5 }
	icon = node_intrigue
	
	parent = unshackled_lust_perk
	
	can_be_picked = {
		always = yes
	}
	
	effect = {
		custom_description_no_bullet = {
			text = subtle_desire_perk_effect
		}
		# SAS Change
		custom_description_no_bullet = {
			text = charismatic_perk_effect
		}
		# SAS Change End
	}
}

mortal_adoration_perk = {
	lifestyle = intrigue_lifestyle
	tree = temptation
	position = { 0 3.75 }
	icon = node_intrigue
	
	parent = subtle_desire_perk
	
	can_be_picked = { always = yes }
	
	effect = {
		custom_description_no_bullet = { text = mortal_adoration_perk_effect }
		if = {
			limit = { government_has_flag = government_is_landless_adventurer }	
			custom_tooltip = { text = adventurer_mortal_adoration_perk_effect }
		}
		if = {
			limit = { government_has_flag = government_is_administrative }	
			custom_description_no_bullet = { text = admin_mortal_adoration_perk_effect }
		}
		if = {
			limit = { government_has_flag = government_is_mandala }	
			custom_description_no_bullet = { text = add_mandala_radiance_perk_effect }
		}
		# SAS Change
		if = {
			limit = {
				OR = {
					has_game_rule = sas_all_modified_perks
					has_game_rule = spy_and_intrigue_buffs
				}
			}
			custom_description_no_bullet = {
				text = sas_mortal_adoration_lovers_perk_effect
			}
			hidden_effect = {
				every_relation = {
					type = lover
					add_to_temporary_list = sas_mortal_adoration_lovers
				}
				every_relation = {
					type = soulmate
					limit = { NOT = { is_in_list = sas_mortal_adoration_lovers } }
					add_to_temporary_list = sas_mortal_adoration_lovers
				}
				every_in_list = {
					list = sas_mortal_adoration_lovers
					root = {
						sas_mortal_adoration_skill_gain_effect = yes
					}
				}
			}
		}
		# SAS Change End
	}
}

enticing_opportunity_perk = {
	lifestyle = intrigue_lifestyle
	tree = temptation
	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_temptation_focus
			}
			multiply = 5
		}
		if = {
			limit = {
				can_start_new_lifestyle_tree_trigger = no
				NOT = { has_perk = like_weed_in_a_garden_perk }
			}
			multiply = 0
		}
	}
	
	can_be_picked = {
		always = yes
	}
	
	character_modifier = {
		seduce_scheme_phase_duration_add = medium_scheme_phase_duration_bonus_value
	}
	government_character_modifier = {
		flag = government_is_landless_adventurer
		seduce_scheme_phase_duration_add = monumental_scheme_phase_duration_bonus_value
	}
	# SAS Change
	effect = {
		if = {
			limit = {
				OR = {
					has_game_rule = sas_all_modified_perks
					has_game_rule = spy_and_interactions
				}
			}
			custom_description_no_bullet = {	
				text = sas_enticing_opportunity_induct_bastard_effect
			}
			custom_description_no_bullet = {
				text = sas_enticing_opportunity_steal_bastard_effect
			}
		}
	}
	
	# SAS Change End
}

graceful_recovery_perk = {
	lifestyle = intrigue_lifestyle
	tree = temptation
	position = { 2 2.5 }
	icon = node_intrigue
	
	parent = home_advantage_perk

	can_be_picked = {
		always = yes
	}
	
	effect = {
		custom_description_no_bullet = {
			text = graceful_recovery_perk_effect
		}
		# SAS Change
		if = {
			limit = {
				OR = {
					has_game_rule = sas_all_modified_perks
					has_game_rule = spy_and_intrigue_buffs
				}
			}
			custom_description_no_bullet = {
				text = sas_graceful_recovery_perk_effect
			}
		}
		hidden_effect = {
			if = {
				limit = {
					OR = {
						has_game_rule = sas_all_modified_perks
						has_game_rule = spy_and_intrigue_buffs
					}
				}
				add_character_modifier = {
					modifier = graceful_recovery_character_modifier
				}
			}
		}
		# SAS Change End
	}
}

smooth_operator_perk = {
	lifestyle = intrigue_lifestyle
	tree = temptation
	position = { 2 3.75 }
	icon = node_intrigue
	
	parent = graceful_recovery_perk

	can_be_picked = {
		always = yes
	}
	
	effect = {
		custom_description_no_bullet = {
			text = smooth_operator_perk_effect
		}
		# SAS Change
		if = {
			limit = {
				OR = {
					has_game_rule = sas_all_modified_perks
					has_game_rule = spy_and_intrigue_buffs
				}
			}
			custom_description_no_bullet = {
				text = sas_smooth_operator_perk_effect
			}
		}
		hidden_effect = {
			if = {
				limit = {
					OR = {
						has_game_rule = sas_all_modified_perks
						has_game_rule = spy_and_intrigue_buffs
					}
				}
				add_character_modifier = {
					modifier = smooth_operator_character_modifier
				}
			}
		}
		# SAS Change End
	}	
}

# Intrigue 3 (Intimidation)
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
		}
	}

	# SAS Change
	effect = {
		custom_description_no_bullet = {
			text = omerta_perk_effect
		}
	}
	# SAS Change End

	can_be_picked = {
		always = yes
	}
	
	character_modifier = {
		dread_gain_mult = 0.3
	}
}

# Stewardship 1 (Wealth)
golden_obligations_perk = {
	lifestyle = stewardship_lifestyle
	tree = wealth
	position = { 2 0 }
	icon = node_stewardship
	
	auto_selection_weight = {
		value = 11
		if = {
			limit = {
				has_education_stewardship_trigger = yes
			}
			add = 1989
		}
		if = {
			limit = {
				has_focus = stewardship_wealth_focus
			}
			multiply = 5
		}
		if = {
			limit = {
				can_start_new_lifestyle_tree_trigger = no
			}
			multiply = 0
		}
		if = { # Conquerors go for the best stuff for war!
			limit = {
				has_variable = conqueror
			}
			add = 10000
		}
	}

	government_character_modifier = {
		flag = government_is_clan
		clan_tax_slot_add = 1
	}
	
	effect = {
		# SAS Change
		if = {
			limit = {
				OR = {
					has_game_rule = sas_all_modified_perks
					has_game_rule = spy_and_interactions
				}
			}
			custom_description_no_bullet = {
				text = golden_obligations_embezzle_perk_effect
			}
		}
		else = {
			custom_description_no_bullet = {
				text = golden_obligations_perk_effect
			}
		}
		# SAS Change End
	}
}