﻿###########################
# NEOW CULTURAL TRADITIONS 
###########################

#######################
# Generic
#######################

tradition_british_armoires = {
	category = regional

	layers = {
		0 = martial
		1 = western
		4 = bow.dds
	}

	is_shown = {
		OR = {
			has_cultural_pillar = heritage_anglo_frisian
			has_cultural_pillar = heritage_brythonic
		}
	}
	can_pick = {
		OR = {
			has_cultural_pillar = heritage_anglo_frisian
			has_cultural_pillar = heritage_brythonic
		}
	}
	
	character_modifier = {
		archers_max_size_add = 2
	}
	
	parameters = {
		unlock_maa_handgonners = yes
	}
	
	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			# Ethos requirement.
			if = {
				limit = {
					NOR = {
						culture_pillar:ethos_stoic = { is_in_list = traits }
						culture_pillar:ethos_bureaucratic = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_stoic_or_bureaucratic_desc
				}
			}
			# Certain number of archer MaA requirement.
			if = {
				limit = {
					scope:character = {
						number_maa_soldiers_of_base_type = {
							type = archers
							# Remember to sync the below with longbow_competitions_minimum_archer_maa_value.
							value < 1200
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = culture_head_lacks_archer_maa_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	
	ai_will_do = {
		value = 800
		if = {
			limit = {
				OR = {
					culture_has_pikemen_maa = yes
					culture_has_heavy_cavalry_maa = yes
				}
			}
			multiply = 0
		}
	}
}

tradition_british_palace_politics = {
	category = regional

	layers = {
		0 = intrigue
		1 = western
		4 = palace_politics.dds 
	}

	is_shown = {
			OR = {
				has_cultural_pillar = heritage_anglo_frisian
				has_cultural_pillar = heritage_scottish
				this = culture:prytoneg
					any_parent_culture_or_above = {
					this = culture:prytoneg
				}
			}
			scope:character = {
				OR = {
					has_title = title:e_brittania
				}
			}
		# DLC check.
		has_ep3_dlc_trigger = yes
		NOT = {
			has_cultural_tradition = tradition_byzantine_succession
		}
	}
	can_pick = {
		custom_tooltip = {
			text = cannot_have_tradition_court_eunuchs
			NOT = { culture_tradition:tradition_court_eunuchs = { is_in_list = traits } }
		}
		custom_tooltip = {
			text = cannot_have_tradition_merciful_blindings
			NOT = { culture_tradition:tradition_merciful_blindings = { is_in_list = traits } }
		}
	}
	
	parameters = {
		unlock_maa_conrois = yes
		unlock_voluntary_laampdom = yes
		much_more_likely_to_be_laamps = yes
		ambitious_trait_more_common = yes
		wanderers_gain_extra_combat_skills = yes
		mercenary_courtiers_gain_extra_skills = yes
		more_likely_to_leave_court = yes
		cultrad_unlocks_t2_countermeasures = yes
		enable_garden_duchy_building = yes
		can_appoint_court_gardener = yes
		can_recruit_gardeners = yes		
	}
	character_modifier = {
		monthly_court_grandeur_change_mult = 0.2
		political_scheme_phase_duration_add = minor_scheme_phase_duration_bonus_value
		personal_scheme_phase_duration_add = minor_scheme_phase_duration_bonus_value
		heavy_cavalry_damage_mult = 0.2
		heavy_cavalry_pursuit_mult = 0.2
		heavy_cavalry_max_size_add = 2
		siege_phase_time = -0.1
		ai_honor = -20
		ai_war_chance = 0.5
		ai_war_cooldown = -0.25
		same_culture_mercenary_hire_cost_mult = -0.15
		character_travel_speed_mult = 0.1
		character_travel_safety_mult = 0.1
	}
	
	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOR = {
						culture_pillar:ethos_bureaucratic = { is_in_list = traits }
						culture_pillar:ethos_courtly = { is_in_list = traits }
						culture_pillar:ethos_spiritual = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bureaucratic_courtly_or_spiritual_desc
				}
			}
			if = {
				limit = {
					has_dlc_feature = royal_court
					OR = {
						scope:character = { has_royal_court = no }
						NOT = {
							scope:character = {
								court_grandeur_current_level >= very_high_court_grandeur_level
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = culture_head_court_grandeur_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	
	ai_will_do = {
		value = 200
		if = {
			limit = { # Admin should be more into this
				scope:character = {
					has_government = administrative_government
				}
			}
			multiply = 2
		}
	}
}

tradition_swords_of_freedom = {
	category = regional

	layers = {
		0 = martial
		1 = western
		4 = swords.dds 
	}

	is_shown = {
		OR = {
			this = culture:kuhjung
			any_parent_culture_or_above = {
				this = culture:kuhjung
			}
		}
	}
	can_pick = {
		culture_not_pacifistic_trigger = yes
	}
	
	parameters = {
		unlock_maa_kuhjung = yes
		strong_traits_more_common = yes
	}
	character_modifier = {
		maa_damage_mult = 0.05
		men_at_arms_limit = 1
		county_opinion_add = -10
	}
	
	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOR = {
						culture_pillar:ethos_bellicose = { is_in_list = traits }
						culture_pillar:ethos_stoic = { is_in_list = traits }
						culture_pillar:ethos_communal = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_stoic_or_communal_desc
				}
			}
			if = {
				limit = {
					scope:character = {
						NOR = { # Culture Head need to have a 8 sized regiment of either Light/Heavy/Archer Cavalry
							number_maa_soldiers_of_base_type = {
								type = light_cavalry
								value >= 800
							}
							number_maa_soldiers_of_base_type = {
								type = heavy_cavalry
								value >= 400
							}
							number_maa_soldiers_of_base_type = {
								type = archer_cavalry
								value >= 800
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = culture_head_cavalry_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	
	ai_will_do = {
		value = 200
		if = {
			limit = { # Reduce chance slightly if the culture has access to other "cavalry" types
				OR = {
					has_innovation = innovation_war_camels
					has_innovation = innovation_elephantry
				}
			}
			multiply = 0.4
		}
		else_if = {
			limit = {
				scope:character ?= {
					ai_has_warlike_personality = yes
				}
			}
			multiply = 4
		}
	}
}