﻿###
# Regula Traits
#	Regula Bloodline Traits Male + Female
#	Generic Bloodline Traits
###

# Standard Values
@pos_compat_high = 30
@pos_compat_medium = 15
@pos_compat_low = 5

@neg_compat_high = -30
@neg_compat_medium = -15
@neg_compat_low = -5

################ Magister Bloodlines ###################
## Female traits
# Charmer Bloodline
# Magister earns this by charming anyone.
# Small diplomacy bonus, plus extra opinion with another +10 for attraction opinion.
regula_fascinare_bloodline = {

	inherit_chance = 100
	birth = 0

	random_creation = 0
	shown_in_ruler_designer = no

	diplomacy_per_piety_level = 1
	attraction_opinion = 10
	general_opinion = 10

	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
}

# Mindshaper Bloodline
# Magister earns this by dominating Mulsa into Paelex
# Makes inbreeding less likely, and adds 25% to positive random genetic traits and stregthen genetic traits.
regula_domitans_bloodline = {

	inherit_chance = 100
	birth = 0

	random_creation = 0
	shown_in_ruler_designer = no

	valid_sex = female

	inbreeding_chance = -0.25
	positive_random_genetic_chance = 0.25
	genetic_trait_strengthen_chance = 0.25

	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
		}
	}
}

# Obedience Bloodline
# Magister earns this by charming their wards
# Grants stress loss, and parent + liege opinion
regula_obedience_bloodline = {

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

	valid_sex = female

	stress_loss_mult = 0.3
	opinion_of_parents = 20
	liege_opinion = 20
	ai_boldness = -100
	ai_honor = 50

	flag = regula_bloodline_magister

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this }
				}
				desc = trait_regula_obedience_bloodline_desc
			}
			desc = trait_regula_obedience_bloodline_character_desc
		}
	}
}

## Male traits
# Thrallmaker Bloodline
# Magister earns this by turning prisoners into Contubernalis by rending their souls ;_;
# Gives some prowess, monthly dread and a dread baseline bonus.
regula_contubernalis_bloodline = {

	inherit_chance = 100
	birth = 0

	random_creation = 0
	shown_in_ruler_designer = no

	prowess = 3
	monthly_dread = 1
	dread_baseline_add = 15

	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
	}
}

# Subjagtor Bloodline
# Magister earns this by winning domination wars
# Adds Accolad glory gain multiplier and increases knight limit and effectiveness
regula_domination_war_bloodline = {

	inherit_chance = 100
	birth = 0

	random_creation = 0
	shown_in_ruler_designer = no

	accolade_glory_gain_mult = 0.25
	knight_limit = 5
	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
	}
}

# Chessmaster Bloodline
# Magister earns this by enabling servitude wars in other realms (and winning them!)
# Increases vassal contributions and also adds extra vassal limit
regula_servitude_war_bloodline = {

	inherit_chance = 100
	birth = 0
	valid_sex = male

	random_creation = 0
	shown_in_ruler_designer = no

	vassal_tax_contribution_add = 0.05
	vassal_levy_contribution_add = 0.05
	vassal_limit = 25

	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
	}
}

# Imperator Bloodline
# Magister earns this by making Queens into his Vassals via Potestas no Transfunde
# Grants prestige and reduces tyranny. Also reduces title creation cost
regula_potestas_queen_bloodline = {

	inherit_chance = 100
	birth = 0
	random_creation = 0

	valid_sex = male

	shown_in_ruler_designer = no

	tyranny_gain_mult = -0.2
	monthly_prestige_gain_mult = 0.25
	title_creation_cost_mult = -0.25

	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 ###################

# Generic male-only bloodline that gives an extra personal scheme and domain limit
# Rewarded if a man has four consorts pregnant at the same time
# Is inherited by kids.
regula_multitasker_bloodline = {
	category = fame
	inherit_chance = 100
	birth = 0

	random_creation = 0
	ruler_designer_cost = 50

	domain_limit = 1
	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
	}
}

# Generic female-only bloodline that increases chance of twins/triplets on birth
# Rewarded to women if they have six children (and get pregnant again)
# Is inherited by females only.
# Has a bonus chance of twins/triplets/quadruplets via regula_bloodline.0023
regula_bun_bloodline = {
	category = fame
	inherit_chance = 100
	birth = 0
	valid_sex = female

	random_creation = 0
	ruler_designer_cost = 50

	negate_health_penalty_add = miniscule_health_bonus
	years_of_fertility = 5

	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 = {
		lustful = @pos_compat_high
		gregarious = @pos_compat_medium
		ambitious = @pos_compat_low
		greedy = @pos_compat_low
		content = @neg_compat_low
	}
}