###
# Indices notes for other modders
# Reserved 6500 - 6599 for this mod
# 6550-6559: Magister traits.
# 6560-6569: Concubine traits. 
# 6570-6579: Random lifestyle traits.
# 6580-6589: Magister Bloodlines
# 6590-6599: Generic Bloodlines
###

magister_1 = {
	index = 6551

    inherit_chance = 0
	birth = 0
    random_creation = 0

    diplomacy = -3
	learning = -3
	stress_gain_mult = 0.25
	health = -0.5
	prowess = -2
	same_faith_opinion = 15

	flag = carn_no_consequences_for_extramarital_sex_with_others

	shown_in_ruler_designer = no

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_magister_1_desc
			}
			desc = trait_magister_1_character_desc
		}
	}

	group = magister_trait_group
    level = 1

	#AI Values
    ai_honor = -15
	ai_zeal = -20

	compatibility = {
		seducer = @pos_compat_high
		lustful = @pos_compat_medium
		arrogant = @neg_compat_high
		calm = @neg_compat_medium
		ambitious = @neg_compat_medium
		chaste = @neg_compat_low
		greedy = @neg_compat_low
	}
}

magister_2 = {
	index = 6552

    inherit_chance = 0
	birth = 0
    random_creation = 0

    intrigue = 1
    diplomacy = 1
	fertility = 0.1
	attraction_opinion = 5
	stress_gain_mult = -0.25
	prowess = 4
	same_faith_opinion = 25
	monthly_piety = 1

	flag = carn_no_consequences_for_extramarital_sex_with_others

	shown_in_ruler_designer = no

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_magister_2_desc
			}
			desc = trait_magister_2_character_desc
		}
	}

	group = magister_trait_group
    level = 2

	#AI Values
    ai_honor = -15
	ai_zeal = -20

	compatibility = {
		seducer = @pos_compat_high
		lustful = @pos_compat_medium
		arrogant = @neg_compat_high
		calm = @neg_compat_medium
		ambitious = @neg_compat_medium
		chaste = @neg_compat_low
		greedy = @neg_compat_low
	}
}

magister_3 = {
	index = 6553

    inherit_chance = 0
	birth = 0
    random_creation = 0

    intrigue = 3
    diplomacy = 3
	attraction_opinion = 10
	prowess = 6
	fertility = 0.15
	health = 0.25
	stress_gain_mult = -0.50
	same_faith_opinion = 25
	monthly_piety = 1

	flag = carn_no_consequences_for_extramarital_sex_with_others

	shown_in_ruler_designer = no

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_magister_3_desc
			}
			desc = trait_magister_3_character_desc
		}
	}

	group = magister_trait_group
    level = 3

	#AI Values
    ai_honor = -15
	ai_zeal = -20

	compatibility = {
		seducer = @pos_compat_high
		lustful = @pos_compat_medium
		arrogant = @neg_compat_high
		calm = @neg_compat_medium
		ambitious = @neg_compat_medium
		chaste = @neg_compat_low
		greedy = @neg_compat_low
	}
}

magister_4 = {
	index = 6554

    inherit_chance = 0
	birth = 0
    random_creation = 0

    intrigue = 3
	diplomacy = 3
	martial = 3
	prowess = 8
	fertility = 0.2
	health = 0.40
	attraction_opinion = 20
	stress_gain_mult = -0.60
	dread_gain_mult = 0.25
	different_faith_opinion = 5
	same_faith_opinion = 25
	monthly_piety = 1

	flag = carn_no_consequences_for_extramarital_sex_with_others

	shown_in_ruler_designer = no

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_magister_4_desc
			}
			desc = trait_magister_4_character_desc
		}
	}

	group = magister_trait_group
    level = 4

	#AI Values
    ai_honor = -15
	ai_zeal = -20

	compatibility = {
		seducer = @pos_compat_high
		lustful = @pos_compat_medium
		arrogant = @neg_compat_high
		calm = @neg_compat_medium
		ambitious = @neg_compat_medium
		chaste = @neg_compat_low
		greedy = @neg_compat_low
	}
}

magister_5 = {
	index = 6555

    inherit_chance = 0
	birth = 0
    random_creation = 0

    intrigue = 3
	diplomacy = 3
	martial = 3
	attraction_opinion = 25
	prowess = 10
	fertility = 0.25
	health = 0.50
	stress_gain_mult = -0.75
	dread_gain_mult = 0.50
	dread_decay_mult = -0.25
	same_faith_opinion = 25
	different_faith_opinion = 15
	monthly_piety = 1

	flag = carn_no_consequences_for_extramarital_sex_with_others

	shown_in_ruler_designer = no

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_magister_5_desc
			}
			desc = trait_magister_5_character_desc
		}
	}

	group = magister_trait_group
    level = 5

	#AI Values
    ai_honor = -15
	ai_zeal = -20

	compatibility = {
		seducer = @pos_compat_high
		lustful = @pos_compat_medium
		arrogant = @neg_compat_high
		calm = @neg_compat_medium
		ambitious = @neg_compat_medium
		chaste = @neg_compat_low
		greedy = @neg_compat_low
	}
}

magister_6 = {
	index = 6556

    inherit_chance = 0
	birth = 0
    random_creation = 0

    intrigue = 3
	diplomacy = 3
	martial = 3
	prowess = 12
	attraction_opinion = 25
	fertility = 0.25
	health = 0.50
	stress_gain_mult = -0.90
	dread_gain_mult = 0.50
	dread_decay_mult = -0.50
	same_faith_opinion = 25
	different_faith_opinion = 25
	monthly_piety = 1

	flag = carn_no_consequences_for_extramarital_sex_with_others

	shown_in_ruler_designer = no

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_magister_6_desc
			}
			desc = trait_magister_6_character_desc
		}
	}

	group = magister_trait_group
    level = 6

	#AI Values
    ai_honor = -15
	ai_zeal = -20

	compatibility = {
		seducer = @pos_compat_high
		lustful = @pos_compat_medium
		arrogant = @neg_compat_high
		calm = @neg_compat_medium
		ambitious = @neg_compat_medium
		chaste = @neg_compat_low
		greedy = @neg_compat_low
	}
}

mulsa = {
	index = 6561
	opposites = {
		magister_trait_group
	}

    inherit_chance = 0
	birth = 0
    random_creation = 0

    stewardship = 3
	learning = 3
	fertility = 0.3
	attraction_opinion = 10
	same_opinion = 15
	opposite_opinion = 25
    
	stress_gain_mult = 0.2
	group = devoted_trait_group
	level = 1

	forced_portrait_age_index = 1 # Slows aging.
	shown_in_ruler_designer = no

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_mulsa_desc
			}
			desc = trait_mulsa_character_desc
		}
	}
}

paelex = {
	index = 6562
	opposites = {
		magister_trait_group
	}

	inherit_chance = 0
	birth = 0
	random_creation = 0

	stewardship = 3
	learning = 3
	prowess = 4
	fertility = 0.5
	health = 0.50
	attraction_opinion = 10
	same_opinion = 25
	opposite_opinion = 50
	stress_gain_mult = 0.25
	group = devoted_trait_group
	level = 2

	flag = can_not_marry

	forced_portrait_age_index = 1 # Slows aging.
	shown_in_ruler_designer = no

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_paelex_desc
			}
			desc = trait_paelex_character_desc
		}
	}

	ai_honor = dominant_positive_ai_value  # Should shut down seduce schemes.

}

domina = {
	index = 6563
	opposites = {
		magister_trait_group
	}

	inherit_chance = 0
	birth = 0
	random_creation = 0

	intrigue = 3
	stewardship = 3
	prowess = 6
	fertility = 0.25
	health = 1
	attraction_opinion = 10
	same_opinion = 50
	opposite_opinion = 50
	stress_gain_mult = -0.25
	group = devoted_trait_group
	level = 3

	forced_portrait_age_index = 1 # Slows aging.
	shown_in_ruler_designer = no

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_domina_desc
			}
			desc = trait_domina_character_desc
		}
	}

	ai_honor = dominant_positive_ai_value  # Should shut down seduce schemes.

}

orba = {
	index = 6564
	opposites = {
		magister_trait_group
	}

	inherit_chance = 0
	birth = 0
	random_creation = 0

	diplomacy = -5
	martial = -5
	stewardship = -5
	learning = -5
	intrigue = -5
	health = -4
	opposite_opinion = 50
	stress_gain_mult = 0.50
	group = devoted_trait_group
	level = 4

	flag = can_not_marry
	can_have_children = no
	shown_in_ruler_designer = no

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_orba_desc
			}
			desc = trait_orba_character_desc
		}
	}
}

contubernalis = {
	index = 6565

	opposites = {
		devoted_trait_group
		magister_trait_group
	}

	diplomacy = -10
	intrigue = -10
	stewardship = -10
	martial = -10
	learning = -10
	prowess = -15
	fertility = 1
	immortal = yes

	inherit_chance = 0
	birth = 0
	random_creation = 0

	stress_gain_mult = -1 # Ignorance is bliss, as they say.
	stress_loss_mult = 1
	dread_baseline_add = -25
	dread_loss_mult = 1

	incapacitating = yes
	can_have_children = no
	disables_combat_leadership = yes

	blocks_from_claim_inheritance = yes 
	flag = can_not_be_granted_titles
	# flag = carn_cannot_be_enslaved
	flag = can_not_marry
	flag = is_naked

	ai_honor = dominant_positive_ai_value
	shown_in_ruler_designer = no

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this }
				}
				desc = trait_contubernalis_desc
			}
			desc = trait_contubernalis_character_desc
		}
	}

	ai_energy = -100
}

regula_undying = {
	index = 6566

	opposites = {
		magister_trait_group
	}

    inherit_chance = 0
	birth = 0
    random_creation = 0

	opposite_opinion = 500
	immortal = yes
	shown_in_ruler_designer = no
	stress_gain_mult = -1
	stress_loss_mult = 1
	negate_health_penalty_add = 1
	can_have_children = no
	dread_baseline_add = 25

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_regula_undying_desc
			}
			desc = trait_regula_undying_character_desc
		}
	}
}

sigillum = {
	index = 6567

	inherit_chance = 0
	birth = 0
    random_creation = 0
	shown_in_ruler_designer = no

	health = -0.25
	intrigue = -2
	fertility = -0.2

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_sigillum_desc
			}
			desc = trait_sigillum_character_desc
		}
	}
}

regula_virus = {
	index = 6568
	health_trait = yes
	
	inherit_chance = 0
	birth = 0
    random_creation = 0
	shown_in_ruler_designer = no

	diplomacy = -1
	intrigue = -1
	stewardship = -1
	martial = -1
	learning = -1


	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_regula_virus_desc
			}
			desc = trait_regula_virus_character_desc
		}
	}
}

regula_gossip = {
	index = 6570

	inherit_chance = 0
	birth = 0
	random_creation = 0

	diplomacy = 3
	intrigue = -1

	same_opinion = 10
	liege_opinion = -5

	ruler_designer_cost = 20

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_regula_gossip_desc
			}
			desc = trait_regula_gossip_character_desc
		}
	}
}

regula_child_of_the_book = {
	index = 6571

	inherit_chance = 0
	birth = 0
	random_creation = 0

	diplomacy = 2 
	martial = 2
	stewardship = 2
	intrigue = 2
	learning = 2

	# liege_opinion = 22
	opinion_of_liege = 20
	courtier_and_guest_opinion = 20
	monthly_stewardship_lifestyle_xp_gain_mult = 0.5
	monthly_piety = 2

	show_in_ruler_designer = no

	ai_energy = 45

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_regula_child_of_the_book_desc
			}
			desc = trait_regula_child_of_the_book_character_desc
		}
	}
}


################ Magister Bloodlines ###################

regula_fascinare_bloodline = {
	index = 6580

	inherit_chance = 100
	birth = 0

	random_creation = 0
	shown_in_ruler_designer = no

	diplomacy = 2
	fertility = 0.05

	valid_sex = female

	flag = regula_bloodline_magister

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_regula_fascinare_bloodline_desc
			}
			desc = trait_regula_fascinare_bloodline_character_desc
		}
	}

	ai_sociability = 15

}

regula_domitans_bloodline = {
	index = 6581

	inherit_chance = 100
	birth = 0

	random_creation = 0
	shown_in_ruler_designer = no

	valid_sex = female

	inbreeding_chance = -0.25
	years_of_fertility = 5

	flag = regula_bloodline_magister

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_regula_domitans_bloodline_desc
			}
			desc = trait_regula_domitans_bloodline_character_desc
		}
	}
}

regula_contubernalis_bloodline = {
	index = 6582

	inherit_chance = 100
	birth = 0

	random_creation = 0
	shown_in_ruler_designer = no

	attraction_opinion = -20
	monthly_dread = 1

	valid_sex = male

	flag = regula_bloodline_magister

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_regula_contubernalis_bloodline_desc
			}
			desc = trait_regula_contubernalis_bloodline_character_desc
		}
	}

	compatibility = {
		craven = @pos_compat_medium
		just = @neg_compat_medium
		compassionate = @neg_compat_high
	}
}

regula_domination_war_bloodline = {
	index = 6583

	inherit_chance = 100
	birth = 0

	random_creation = 0
	shown_in_ruler_designer = no

	dread_baseline_add = 5
	knight_limit = 4
	knight_effectiveness_mult = 0.25

	valid_sex = male

	flag = regula_bloodline_magister

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_regula_domination_war_bloodline_desc
			}
			desc = trait_regula_domination_war_bloodline_character_desc
		}
	}

	compatibility = {
		craven = @pos_compat_medium
		arrogant = @neg_compat_medium
		ambitious = @neg_compat_low
	}
}

regula_servitude_war_bloodline = {
	index = 6584

	inherit_chance = 100
	birth = 0
	valid_sex = male

	random_creation = 0
	shown_in_ruler_designer = no

	vassal_limit = 10
	personal_scheme_power_add = 15

	flag = regula_bloodline_magister

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_regula_servitude_war_bloodline_desc
			}
			desc = trait_regula_servitude_war_bloodline_character_desc
		}
	}
	
	compatibility = {
		deceitful = @pos_compat_medium
		fickle = @pos_compat_medium
		ambitious = @pos_compat_low
		brave = @neg_compat_low
		just = @neg_compat_low
	}
}

regula_potestas_queen_bloodline = {
	index = 6585

	inherit_chance = 100
	birth = 0
	random_creation = 0

	valid_sex = male

	shown_in_ruler_designer = no

	monthly_prestige = 0.5
	monthly_tyranny = -0.2
	
	flag = regula_bloodline_magister

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_regula_potestas_queen_bloodline_desc
			}
			desc = trait_regula_potestas_queen_bloodline_character_desc
		}
	}
}


################ Generic Bloodlines ###################

regula_multitasker_bloodline = {
	index = 6590

	inherit_chance = 80
	birth = 0

	fame = yes
	good = yes

	random_creation = 0
	ruler_designer_cost = 200

	max_personal_schemes_add = 1

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_regula_multitasker_bloodline_desc
			}
			desc = trait_regula_multitasker_bloodline_character_desc
		}
	}

	#AI Values
    ai_honor = -15
	ai_energy = 20
	ai_sociability = 20

	compatibility = {
		seducer = @pos_compat_high
		lustful = @pos_compat_medium
		trusting = @pos_compat_low
		chaste = @neg_compat_medium
		temperate = @neg_compat_low
	}
}

regula_bun_bloodline = {
	index = 6591

	inherit_chance = 80
	birth = 0
	valid_sex = female

	fame = yes
	good = yes

	fertility = 0.1

	random_creation = 0
	ruler_designer_cost = 80

	flag = regula_twin_boost

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this } 
				}
				desc = trait_regula_bun_bloodline_desc
			}
			desc = trait_regula_bun_bloodline_character_desc
		}
	}

	compatibility = {
		gregarious = @pos_compat_high
		impatient = @neg_compat_medium
		ambitious = @pos_compat_low
		greedy = @pos_compat_medium
	}
}