﻿# BLOOD LEGACIES

blood_legacy_1 = { # Noble Veins
	legacy = blood_legacy_track

	character_modifier = {
		name = blood_legacy_1_modifier
		positive_random_genetic_chance = 0.30
		positive_inactive_inheritance_chance = 0.30
	}
	
	ai_chance = {
		value = 11
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
		# Start New Bloc
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_family }
					root.house = { has_house_modifier = trad_wisdom }
					root.house = { has_house_modifier = trad_distinction }
				}
			}
			multiply = 10
		}
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_pride }
					root.house = { has_house_modifier = trad_survival }
					root.house = { has_house_modifier = trad_knowledge }
					root.house = { has_house_modifier = trad_peace }
				}
			}
			multiply = 5
		}
		# End New Bloc
	}
}

blood_legacy_2 = { # Convergent Blood
	legacy = blood_legacy_track

	character_modifier = {
		genetic_trait_strengthen_chance = 0.3
	}
}

blood_legacy_3 = { # Resilient Bloodline
	legacy = blood_legacy_track

	character_modifier = {
		name = blood_legacy_3_modifier
		negative_random_genetic_chance = -0.30
		negative_inactive_inheritance_chance = -0.30
	}
}


blood_legacy_4 = { # Architected Ancestry
	legacy = blood_legacy_track

	effect = {
		# Effect is applied in the on action 'on_birth_child'
		custom_description_no_bullet = {
			text = blood_legacy_4_effect
		}
	}

	traits = {
		beauty_good_1 = 100
		intellect_good_1 = 100
		physique_good_1 = 100
		fecund = 50
		albino = 50
		giant = 10
		dwarf = 1
		scaly = 1
	}
}

blood_legacy_5 = { # Octogenarians
	legacy = blood_legacy_track

	character_modifier = {
		life_expectancy = 5
	}
}

# WARFARE LEGACIES

warfare_legacy_1 = { # House of Warriors
	legacy = warfare_legacy_track

	character_modifier = {
		name = warfare_legacy_1_name
		prowess = 2
		knight_effectiveness_mult = 0.15
	}
	
	ai_chance = {
		value = 11
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
		# Start New Bloc
		if = {
			limit = {
				root.house = { has_house_modifier = trad_valor }
				NOT = { culture = { has_cultural_pillar = heritage_north_germanic } }
			}
			add = 1000
		}
		else_if = {
			limit = {
				root.house = { has_house_modifier = trad_valor }
				culture = { has_cultural_pillar = heritage_north_germanic }

				OR = {
					has_dynasty_perk = fp1_adventure_legacy_5
					has_dynasty_perk = fp1_pillage_legacy_5
				}
			}
			add = 1000
		}
		if = {
			limit = {
				OR = {
					# root.house = { has_house_modifier = trad_valor }
					root.house = { has_house_modifier = trad_honor }
					root.house = { has_house_modifier = trad_duty }
					root.house = { has_house_modifier = trad_vigilance }
				}
			}
			multiply = 20
		}
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_distinction }
				}
			}
			multiply = 5
		}
		# End New Bloc
	}
}

warfare_legacy_2 = { # Generational Belligerence
	legacy = warfare_legacy_track

	character_modifier = {
		pursue_efficiency = 0.15
		retreat_losses = -0.15
	}

	effect = {
		custom_description_no_bullet = {
			text = warfare_legacy_2_effect
		}
	}
}

warfare_legacy_3 = { # Squire Traditions
	legacy = warfare_legacy_track

	effect = {
		custom_description_no_bullet = {
			text = warfare_legacy_3_effect
		}
	}

	character_modifier = {
		monthly_martial_lifestyle_xp_gain_mult = 0.1
	}
}

warfare_legacy_4 = { # Inherited Tactics
	legacy = warfare_legacy_track

	character_modifier = {
		counter_efficiency = 0.15
		advantage = 5
	}
}

warfare_legacy_5 = { # Private Army
	legacy = warfare_legacy_track

	character_modifier = {
		men_at_arms_cap = 1
	}
	effect = {
		custom_description_no_bullet = {
			text = warfare_legacy_5_unlock_effect
		}
		custom_description_no_bullet = {
			text = warfare_legacy_5_effect
		}
	}
}

# LAW LEGACIES

law_legacy_1 = { # Mostly Fair
	legacy = law_legacy_track

	character_modifier = {
		county_opinion_add = 5
	}
	
	effect = {
		custom_description_no_bullet = {
			text = law_legacy_1_effect
		}	
	}
	
	ai_chance = {
		value = 11
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
		# Start New Bloc
		if = {
			limit = { root.house = { has_house_modifier = trad_justice } }
			add = 1000
		}
		if = {
			limit = {
				OR = {
					# root.house = { has_house_modifier = trad_justice }
					root.house = { has_house_modifier = trad_vengeance }
					root.house = { has_house_modifier = trad_vigilance }
				}
			}
			multiply = 20
		}
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_honor }
					root.house = { has_house_modifier = trad_duty }
					root.house = { has_house_modifier = trad_pride }
					root.house = { has_house_modifier = trad_power }
					root.house = { has_house_modifier = trad_respect }
					root.house = { has_house_modifier = trad_truth }
					root.house = { has_house_modifier = trad_peace }
				}
			}
			multiply = 10
		}
		if = {
			limit = { dynasty = dynasty:1047006 } # Alfred the Great of Wessex
			add = 1000
		}
		if = {
			limit = { dynasty = dynasty:25061 } # Carolingnian Dynasty
			add = 1000
		}
		# End New Bloc
	}
}

law_legacy_2 = { # Faithful Magistrates
	legacy = law_legacy_track

	character_modifier = {
		name = law_legacy_2_name
		monthly_county_control_growth_add = 0.2
		title_creation_cost_mult = -0.2
	}
}

law_legacy_3 = { # Power and Prosperity
	legacy = law_legacy_track

	character_modifier = {
		monthly_stewardship_lifestyle_xp_gain_mult = 0.1
		build_gold_cost = -0.05
		holding_build_gold_cost = -0.05
	}
}

law_legacy_4 = { # Delegated Authority
	legacy = law_legacy_track

	character_modifier = {
		name = law_legacy_4_name
		powerful_vassal_opinion = 5
		happy_powerful_vassal_tax_contribution_mult = 0.1
		happy_powerful_vassal_levy_contribution_mult = 0.1
	}
}

law_legacy_5 = { # Home Estates
	legacy = law_legacy_track

	character_modifier = {
		name = law_legacy_5_name
		domain_limit = 1
		controlled_province_advantage = 5
	}
}

# GUILE LEGACIES

guile_legacy_1 = { # Ominous Reputation
	legacy = guile_legacy_track

	character_modifier = {
		dread_gain_mult = 0.2
		dread_baseline_add = 15
	}
	
	ai_chance = {
		value = 11
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
		# Start New Bloc
		if = {
			limit = { root.house = { has_house_modifier = trad_guile } }
			add = 1000
		}
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_vengeance }
					root.house = { has_house_modifier = trad_respect }
					# root.house = { has_house_modifier = trad_guile }
					root.house = { has_house_modifier = trad_survival }
				}
			}
			multiply = 20
		}
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_power }
					root.house = { has_house_modifier = trad_influence }
					root.house = { has_house_modifier = trad_family }
				}
			}
			multiply = 10
		}
		# End New Bloc
	}
}

guile_legacy_2 = { # Long Reach
	legacy = guile_legacy_track

	effect = {
		custom_description_no_bullet = {
			text = guile_legacy_2_effect
		}	
	}

	character_modifier = {
		name = guile_legacy_2_name
		owned_hostile_scheme_success_chance_add = 10
	}
}

guile_legacy_3 = { # Natural Schemers
	legacy = guile_legacy_track

	character_modifier = {
		monthly_intrigue_lifestyle_xp_gain_mult = 0.1
		owned_scheme_secrecy_add = 15
	}
}

guile_legacy_4 = { # Venial
	legacy = guile_legacy_track

	character_modifier = {
		monthly_tyranny = -0.05
		intimidated_vassal_tax_contribution_mult = 0.1
		cowed_vassal_tax_contribution_mult = 0.2
	}
}

guile_legacy_5 = { # Family Connections
	legacy = guile_legacy_track

	effect = {
		custom_description_no_bullet = {
			text = guile_legacy_5_effect
		}
	}
}

# ERUDITION LEGACIES

erudition_legacy_1 = { # Vibrant Court
	legacy = erudition_legacy_track

	effect = {
		custom_description_no_bullet = {
			text = erudition_legacy_1_effect
		}
	}
	
	character_modifier = {
		courtier_and_guest_opinion = 10
		court_grandeur_baseline_add = 5
	}
	
	ai_chance = {
		value = 11
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
		# Start New Bloc
		if = {
			limit = { root.house = { has_house_modifier = trad_knowledge } }
			add = 1000
		}
		if = {
			limit = {
				OR = {
					# root.house = { has_house_modifier = trad_knowledge }
					root.house = { has_house_modifier = trad_truth }
					root.house = { has_house_modifier = trad_devotion }
				}
			}
			multiply = 20
		}
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_wisdom }
					root.house = { has_house_modifier = trad_peace }
				}
			}
			multiply = 10
		}
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_distinction }
				}
			}
			multiply = 5
		}
		# End New Bloc
	}
}

erudition_legacy_2 = { # Ordained Rulership
	legacy = erudition_legacy_track

	character_modifier = {
		name = erudition_legacy_2_modifier_name
		monthly_piety_gain_mult = 0.1
	}

	doctrine_character_modifier = {
		name = erudition_legacy_2_modifier_name
		doctrine = doctrine_theocracy_lay_clergy
		zealot_opinion = 5
	}
	doctrine_character_modifier = {
		name = erudition_legacy_2_modifier_name
		doctrine = doctrine_theocracy_temporal
		clergy_opinion = 5
	}
}

erudition_legacy_3 = { # Treasured Knowledge
	legacy = erudition_legacy_track

	character_modifier = {
		monthly_learning_lifestyle_xp_gain_mult = 0.1
		development_growth_factor = 0.2
		county_fertility_decline_mult = -0.1
	}
}

erudition_legacy_4 = { # True Believers
	legacy = erudition_legacy_track

	effect = {
		custom_description_no_bullet = {
			text = erudition_legacy_4_effect
		}
	}
	
	character_modifier = {
		faith_creation_piety_cost_mult = -0.2
	}

	doctrine_character_modifier = {
		name = erudition_legacy_4_modifier_name
		doctrine = doctrine_no_head
		domain_tax_same_faith_mult = 0.05
	}
	doctrine_character_modifier = {
		name = erudition_legacy_4_modifier_name
		doctrine = doctrine_spiritual_head
		religious_head_opinion = 15
	}
	doctrine_character_modifier = {
		name = erudition_legacy_4_modifier_name
		doctrine = doctrine_temporal_head
		tolerance_advantage_mod = 5
	}
}

erudition_legacy_5 = { # Bureaucrats
	legacy = erudition_legacy_track

	effect = {
		custom_description_no_bullet = {
			text = erudition_legacy_5_effect
		}
	}

#	character_modifier = {
#
#	}
}

# GLORY LEGACIES

glory_legacy_1 = { # Desirable Match
	legacy = glory_legacy_track
	
	character_modifier = {
		ai_amenity_target_baseline = 0.2
		glory_hound_opinion = 5
	}

	effect = {
		custom_description_no_bullet = {
			text = glory_legacy_1_perk_effect
		}
	}
	
	ai_chance = {
		value = 11
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
		# Start New Bloc
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_respect }
					root.house = { has_house_modifier = trad_influence }
				}
				NOT = { culture = { has_cultural_pillar = heritage_north_germanic }
 }
			}
			add = 1000
		}
		else_if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_respect }
					root.house = { has_house_modifier = trad_influence }
				}
				culture = { has_cultural_pillar = heritage_north_germanic }

				OR = {
					has_dynasty_perk = fp1_adventure_legacy_5
					has_dynasty_perk = fp1_pillage_legacy_5
				}
			}
			add = 1000
		}
		# Activities legacy from T&T is better for pride
		# if = {
		# 	limit = { root.house = { has_house_modifier = trad_pride } }
		# 	add = 1000
		# }
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_pride }
					root.house = { has_house_modifier = trad_power }
					root.house = { has_house_modifier = trad_distinction }
					# root.house = { has_house_modifier = trad_respect }
					# root.house = { has_house_modifier = trad_influence }
				}
			}
			multiply = 20
		}
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_valor }
				}
			}
			multiply = 10
		}
		if = {
			limit = { dynasty = dynasty:25061 } # Carolingnian Dynasty
			add = 2000
		}
		if = {
			limit = { dynasty = dynasty:dynn_Targaryen } # AGOTCK3 Targaryens
			add = 2000
		}
		# End New Bloc
	}
}

glory_legacy_2 = { # Renowned Name
	legacy = glory_legacy_track

	character_modifier = {
		name = glory_legacy_2_name
		active_accolades = 1
		monthly_prestige_gain_mult = 0.1
		mercenary_hire_cost_mult = -0.1
		knight_limit = 1
		monthly_court_grandeur_change_mult = 1
	}
}

glory_legacy_3 = { # Earning Respect
	legacy = glory_legacy_track

	character_modifier = {
		monthly_diplomacy_lifestyle_xp_gain_mult = 0.1
		personal_scheme_phase_duration_add = medium_scheme_phase_duration_bonus_value
	}
}

glory_legacy_4 = { # Assertive Rulers
	legacy = glory_legacy_track

	effect = {
		custom_description_no_bullet = {
			text = glory_legacy_4_perk_effect
		}
	}

	character_modifier = {
		short_reign_duration_mult = -0.2
		vassal_limit = 10
		court_grandeur_baseline_add = 5
	}
}

glory_legacy_5 = { # Righteousness
	legacy = glory_legacy_track

	character_modifier = {
		name = glory_legacy_5_name
		general_opinion = 10
		max_sway_schemes_add = 1
	}
}

# KIN LEGACIES

kin_legacy_1 = { # Bounteous Loins
	legacy = kin_legacy_track

	character_modifier = {
		fertility = 0.1
		attraction_opinion = 5
	}
	
	ai_chance = {
		value = 11
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
		# Start New Bloc
		if = {
			limit = { root.house = { has_house_modifier = trad_family } }
			add = 1000
		}
		if = {
			limit = {
				OR = {
					# root.house = { has_house_modifier = trad_family }
					root.house = { has_house_modifier = trad_peace }
				}
			}
			multiply = 20
		}
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_pride }
					root.house = { has_house_modifier = trad_survival }
				}
			}
			multiply = 10
		}
		# End New Bloc
	}
}

kin_legacy_2 = { # Studious Youth
	legacy = kin_legacy_track

	character_modifier = {
		child_opinion = 10
	}

	effect = {
		custom_description_no_bullet = {
			text = kin_legacy_2_legacy_effect
		}
	}
}

kin_legacy_3 = { # Constant Care
	legacy = kin_legacy_track

	effect = {
		custom_description_no_bullet = {
			text = kin_legacy_3_legacy_effect
		}
	}

	character_modifier = {
		spouse_opinion = 10
		negate_health_penalty_add = 0.5
	}
}

kin_legacy_4 = { # Close Bonds
	legacy = kin_legacy_track

	effect = {
		custom_description_no_bullet = {
			text = kin_legacy_4_legacy_effect
		}
		custom_description_no_bullet = {
			text = kin_accolade_effect
		}
	}

	character_modifier = {
		dynasty_opinion = 5
		close_relative_opinion = 10
	}
}

kin_legacy_5 = { # Graceful Aging
	legacy = kin_legacy_track

	effect = {
		custom_description_no_bullet = {
			text = kin_legacy_5_legacy_effect
		}
	}

	character_modifier = {
		no_prowess_loss_from_age = yes
	}
}
