# p1 Hair  --- WARNING! Property 1 MUST be Hair, otherwise the hair hiding helmets wont work ---
1 = {
	0 = { # 0 - Completely bald
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = { is_female = no }

					trigger_if = {
						limit = { practical_age >= 70 }
						blg_hair_celtic = no
					}
				}

				trigger_if = {
					limit = {
						blg_hair_tidy_all = yes
					}
					blg_hair_celtic = no
					trigger_if = {
						limit = { is_female = yes }
						blg_hair_byzantine = no
						blg_hair_turkish = no
					}
				}
			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 1 }
			}
		}

		modifier = {
			factor = 0.1
			is_female = no
			practical_age < 40

			blg_hair_ek = no
			blg_hair_celtic = no
		}

		modifier = { # Maiden hairstyle
			factor = 4
			age < 50
			is_female = yes
			OR = {
				blg_hair_byzantine = yes
				blg_hair_turkish = yes
			}
		}

		modifier = { # Uncouth hairstyle
			factor = 4
			is_female = yes
			OR = {
				trait = uncouth
				trait = slovenly
				prisoner = yes
			}
			OR = {
				blg_hair_celtic = yes
				blg_hair_turkish = yes
			}
		}

		modifier = { # Warrior maiden hairstyle
			factor = 10
			is_female = yes
			OR = {
				blg_guard = yes
				this_is_sea_raider_trigger = yes
			}
			blg_hair_african = yes
		}
	}

	1 = { # a - Black Adder
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = { is_female = no }

					trigger_if = {
						limit = { practical_age >= 70 }
						OR = {
							blg_hair_ek = yes
							blg_hair_african = yes
						}
					}
				}

				trigger_if = {
					limit = {
						blg_hair_tidy_ranking = yes
					}
					blg_hair_turkish = no
					trigger_if = {
						limit = { is_female = yes }
						blg_hair_southern = no
					}
				}
			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 2 }
			}
		}

		modifier = { # Maiden hairstyle
			factor = 4
			age < 50
			is_female = yes
			OR = {
				blg_hair_southern = yes
				blg_hair_turkish = yes
			}
		}

		modifier = { # Warrior maiden hairstyle
			factor = 10
			is_female = yes
			OR = {
				blg_guard = yes
				this_is_sea_raider_trigger = yes
			}
			blg_hair_african = yes
		}
	}

	2 = { # b - Page
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = { is_female = no }

					trigger_if = {
						limit = { practical_age >= 70 }
						OR = {
							blg_hair_ek = yes
							blg_hair_turkish = yes
						}
					}
				}
				trigger_else = {
					trigger_if = {
						limit = {
							blg_hair_tidy_ranking = yes
						}
						blg_hair_frankish = no
						blg_hair_westernslavic = no
						blg_hair_african = no
					}
				}
			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 3 }
			}
		}
	}

	3 = { # c - Synth
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = { is_female = no }

					trigger_if = {
						limit = { practical_age >= 70 }
						OR = {
							blg_hair_ek = yes
							blg_hair_frankish = yes
							blg_hair_southern = yes
						}
					}

					trigger_if = {
						limit = {
							blg_hair_tidy_all = yes
						}
						blg_hair_celtic = no
					}
				}
			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 4 }
			}
		}
	}

	4 = { # d - Long straight
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = { is_female = no }

					trigger_if = {
						limit = { practical_age >= 70 }
						OR = {
							blg_hair_ek = yes
							blg_hair_celtic = yes
						}
					}
				}

				trigger_if = {
					limit = {
						blg_hair_tidy_ranking = yes
					}
					blg_hair_westernslavic = no
					blg_hair_turkish = no
					trigger_if = {
						limit = { is_female = no }
						blg_hair_african = no
					}
					trigger_else = {
						blg_hair_byzantine = no
						blg_hair_frankish = no
					}
				}
			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 5 }
			}
		}

		modifier = { # Maiden hairstyle
			factor = 4
			age < 50
			is_female = yes
			OR = {
				blg_hair_byzantine = yes
				blg_hair_frankish = yes
				blg_hair_westernslavic = yes
				blg_hair_turkish = yes
			}
		}
	}

	5 = { # e - Long curly
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = { is_female = no }

					trigger_if = {
						limit = { practical_age >= 70 }
						OR = {
							blg_hair_ek = yes
							blg_hair_byzantine = yes
						}
					}
				}

				trigger_if = {
					limit = {
						blg_hair_tidy_ranking = yes
					}
					blg_hair_frankish = no
					blg_hair_turkish = no
					blg_hair_celtic = no
					trigger_if = {
						limit = { is_female = yes }
						blg_hair_westernslavic = no
					}
				}
			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 6 }
			}
		}

		modifier = { # Maiden hairstyle
			factor = 4
			age < 50
			is_female = yes
			OR = {
				blg_hair_frankish = yes
				blg_hair_westernslavic = yes
				blg_hair_turkish = yes
				blg_hair_celtic = yes
			}
		}

		modifier = { # Uncouth hairstyle
			factor = 4
			OR = {
				trait = uncouth
				trait = slovenly
				prisoner = yes
			}
			is_female = no
			blg_hair_frankish = yes
		}
	}

	6 = { # f - Tonsure
		factor = 1
		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = { is_female = no }

					trigger_if = {
						limit = { practical_age >= 70 }
						OR = {
							blg_hair_ek = yes
							blg_hair_frankish = yes
							blg_hair_african = yes
							blg_hair_celtic = yes
						}
					}
				}
				trigger_else = {
					trigger_if = {
						limit = {
							blg_hair_tidy_ranking = yes
						}
						blg_hair_southern = no
						blg_hair_african = no
					}
				}

			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 7 }
			}
		}

		modifier = { # Maiden hairstyle
			factor = 4
			age < 50
			is_female = yes
			OR = {
				blg_hair_southern = yes
				blg_hair_african = yes
			}
		}

		modifier = { # Warrior maiden hairstyle
			factor = 10
			is_female = yes
			OR = {
				blg_guard = yes
				this_is_sea_raider_trigger = yes
			}
			OR = {
				blg_hair_byzantine = yes
				blg_hair_westernslavic = yes
			}
		}
	}

	7 = { # g - Short
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = { is_female = no }

					trigger_if = {
						limit = { practical_age >= 70 }
						OR = {
							blg_hair_ek = yes
							blg_hair_frankish = yes
							blg_hair_westernslavic = yes
							blg_hair_african = yes
						}
					}

					trigger_if = {
						limit = {
							blg_hair_tidy_ranking = yes
						}
						blg_hair_celtic = no
					}
				}
			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 8 }
			}
		}

		modifier = { # Uncouth hairstyle
			factor = 4
			is_female = no
			OR = {
				trait = uncouth
				trait = slovenly
				prisoner = yes
			}
			OR = {
				blg_hair_celtic = yes
				blg_hair_turkish = yes
			}
		}

		modifier = { # Warrior maiden hairstyle
			factor = 10
			is_female = yes
			OR = {
				blg_guard = yes
				this_is_sea_raider_trigger = yes
			}
			OR = {
				blg_hair_frankish = yes
				blg_hair_celtic = yes
			}
		}
	}

	8 = { # h - Short curly
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = { is_female = no }

					trigger_if = {
						limit = { practical_age >= 70 }
						OR = {
							blg_hair_ek = yes
							blg_hair_african = yes
						}
					}
				}
			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 9 }
			}
		}

		modifier = { # Warrior maiden hairstyle
			factor = 10
			is_female = yes
			OR = {
				blg_guard = yes
				this_is_sea_raider_trigger = yes
			}
			blg_hair_frankish = yes
		}
	}

	9 = { # i - Short uncouth
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = {
						is_female = no
						practical_age >= 70
					}
					blg_hair_ek = yes
				}

				trigger_if = {
					limit = {
						blg_hair_tidy_all = yes
					}
					blg_hair_southern = no
					blg_hair_turkish = no
					trigger_if = {
						limit = { is_female = no }
						blg_hair_westernslavic = no
						blg_hair_celtic = no
					}
					trigger_else = {
						blg_hair_african = no
					}
				}
			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 10 }
			}
		}

		modifier = { # Maiden hairstyle
			factor = 4
			age < 50
			is_female = yes
			OR = {
				blg_hair_southern = yes
				blg_hair_turkish = yes
			}
		}

		modifier = { # Uncouth hairstyle
			factor = 4
			OR = {
				trait = uncouth
				trait = slovenly
				prisoner = yes
			}
			is_female = no
			blg_hair_celtic = yes
		}

		modifier = { # Warrior maiden hairstyle
			factor = 10
			is_female = yes
			OR = {
				blg_guard = yes
				this_is_sea_raider_trigger = yes
			}
			blg_hair_celtic = yes
		}
	}

	10 = { # j - Long uncouth
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = { is_female = no }

					trigger_if = {
						limit = { practical_age >= 70 }
						blg_hair_ek = yes
					}
				}
				trigger_else = {
					# Limited hair range
					blg_hair_byzantine = no
					blg_hair_southern = no
				}

				trigger_if = {
					limit = {
						blg_hair_tidy_all = yes
					}
					blg_hair_westernslavic = no
					trigger_if = {
						limit = { is_female = no }
						blg_hair_byzantine = no
						blg_hair_african = no
						blg_hair_celtic = no
					}
					trigger_else = {
						blg_hair_frankish = no
					}
				}
			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 11 }
			}
		}

		modifier = { # Maiden hairstyle
			factor = 4
			age < 50
			is_female = yes
			OR = {
				blg_hair_frankish = yes
				blg_hair_westernslavic = yes
			}
		}

		modifier = { # Uncouth hairstyle
			factor = 4
			OR = {
				trait = uncouth
				trait = slovenly
				prisoner = yes
			}
			is_female = no
			OR = {
				blg_hair_celtic = yes
				blg_hair_turkish = yes
			}
		}
	}

	11 = { # k - Balding
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = { is_female = no }

					trigger_if = {
						limit = { practical_age >= 70 }
						# Reverse of others
						blg_hair_celtic = no
					}
				}
				trigger_else = {
					# Limited hair range
					blg_hair_byzantine = no
					blg_hair_southern = no
				}

				trigger_if = {
					limit = {
						blg_hair_tidy_ranking = yes
					}
					trigger_if = {
						limit = { is_female = no }
						blg_hair_celtic = no
					}
					trigger_else = {
						blg_hair_frankish = no
						blg_hair_westernslavic = no
						blg_hair_african = no
						blg_hair_turkish = no
					}
				}
			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 12 }
			}
		}

		modifier = { # Maiden hairstyle
			factor = 4
			age < 50
			is_female = yes
			OR = {
				blg_hair_frankish = yes
				blg_hair_westernslavic = yes
				blg_hair_turkish = yes
			}
		}

		modifier = { # Uncouth hairstyle
			factor = 4
			OR = {
				trait = uncouth
				trait = slovenly
				prisoner = yes
			}
			trigger_if = {
				limit = { is_female = no }
				blg_hair_celtic = yes
			}
			trigger_else = {
				OR = {
					blg_hair_frankish = yes
					blg_hair_westernslavic = yes
				}
			}
		}

		modifier = { # Warrior maiden hairstyle
			factor = 10
			is_female = yes
			OR = {
				blg_guard = yes
				this_is_sea_raider_trigger = yes
			}
			blg_hair_celtic = yes
		}
	}

	12 = { # l - Marine
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = { is_female = no }

					trigger_if = {
						limit = { practical_age >= 70 }
						OR = {
							blg_hair_ek = yes
							blg_hair_westernslavic = yes
						}
					}
				}
				trigger_else = {
					# Limited hair range
					blg_hair_byzantine = no
					blg_hair_southern = no
					trigger_if = {
						limit = {
							blg_hair_tidy_all = yes
						}
						blg_hair_african = no
						blg_hair_celtic = no
					}
				}
			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 13 }
			}
		}

		modifier = { # Uncouth hairstyle
			factor = 4
			is_female = yes
			OR = {
				trait = uncouth
				trait = slovenly
				prisoner = yes
			}
			blg_hair_celtic = yes
		}
	}

	13 = { # m - Mohawk
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = { is_female = no }

					trigger_if = {
						limit = { practical_age >= 70 }
						OR = {
							blg_hair_ek = yes
							blg_hair_african = yes
							blg_hair_turkish = yes
						}
					}
				}
				trigger_else = {
					# Limited hair range
					blg_hair_byzantine = no
					blg_hair_southern = no
				}

				trigger_if = {
					limit = {
						blg_hair_tidy_all = yes
					}
					trigger_if = {
						limit = { is_female = no }
						blg_hair_byzantine = no
						blg_hair_frankish = no
						blg_hair_westernslavic = no
						blg_hair_turkish = no
					}
					trigger_else = {
						blg_hair_african = no
						blg_hair_celtic = no
					}
				}
			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 14 }
			}
		}

		modifier = { # Maiden hairstyle
			factor = 4
			age < 50
			is_female = yes
			OR = {
				blg_hair_african = yes
				blg_hair_celtic = yes
			}
		}
	}

	14 = { # n - Hair
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_hair value = 0 } }

				trigger_if = {
					limit = { is_female = no }

					trigger_if = {
						limit = { practical_age >= 70 }
						OR = {
							blg_hair_ek = yes
							blg_hair_byzantine = yes
							blg_hair_celtic = yes
						}
					}

					trigger_if = {
						limit = {
							blg_hair_tidy_all = yes
						}
						blg_hair_frankish = no
						blg_hair_westernslavic = no
						blg_hair_turkish = no
					}
				}
				trigger_else = {
					# Limited hair range
					blg_hair_byzantine = no
					blg_hair_southern = no
				}
			}
			trigger_else = {
				is_variable_equal = { which = ca_hair value = 15 }
			}
		}

		modifier = { # Uncouth hairstyle
			factor = 4
			OR = {
				trait = uncouth
				trait = slovenly
				prisoner = yes
			}
			OR = {
				blg_hair_frankish = yes
				blg_hair_westernslavic = yes
			}
		}

		modifier = { # Warrior maiden hairstyle
			factor = 10
			is_female = yes
			OR = {
				blg_guard = yes
				this_is_sea_raider_trigger = yes
			}
			blg_hair_westernslavic = yes
		}
	}

	15 = {
		factor = 1
		trigger = {
			blg_hair_ek = yes
			OR = {
				is_variable_equal = { which = ca_hair value = 0 }
				is_variable_equal = { which = ca_hair value = 16 }
			}
		}
	}

	16 = {
		factor = 1
		trigger = {
			blg_hair_ek = yes
			OR = {
				is_variable_equal = { which = ca_hair value = 0 }
				is_variable_equal = { which = ca_hair value = 17 }
			}
		}
	}

	17 = {
		factor = 1
		trigger = {
			blg_hair_ek = yes
			OR = {
				is_variable_equal = { which = ca_hair value = 0 }
				is_variable_equal = { which = ca_hair value = 18 }
			}
		}
	}

	18 = {
		factor = 1
		trigger = {
			blg_hair_ek = yes
			OR = {
				is_variable_equal = { which = ca_hair value = 0 }
				is_variable_equal = { which = ca_hair value = 19 }
			}
		}
	}

	19 = {
		factor = 1
		trigger = {
			blg_hair_ek = yes
			OR = {
				is_variable_equal = { which = ca_hair value = 0 }
				is_variable_equal = { which = ca_hair value = 20 }
			}
		}
	}
}
