# p3 Clothes
3 = {
	0 = { # 0 - Royal clothes 1
		factor = 10

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_clothes value = 0 } }
				blg_clothes_royal = yes
			}
			trigger_else = {
				is_variable_equal = { which = ca_clothes value = 1 }
			}
		}

		modifier = {
			factor = 0.05
			OR = {
				trait = humble
				blg_merchant_clothes = yes
			}
		}
	}

	1 = { # a - Royal clothes 2
		factor = 10

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_clothes value = 0 } }
				blg_clothes_royal = yes
			}
			trigger_else = {
				is_variable_equal = { which = ca_clothes value = 2 }
			}
		}

		modifier = {
			factor = 0.05
			OR = {
				trait = humble
				blg_merchant_clothes = yes
			}
		}
	}

	2 = { # b - Royal clothes 3
		factor = 10

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_clothes value = 0 } }
				blg_clothes_royal = yes
			}
			trigger_else = {
				is_variable_equal = { which = ca_clothes value = 3 }
			}
		}

		modifier = {
			factor = 0.05
			OR = {
				trait = humble
				blg_merchant_clothes = yes
			}
		}
	}

	3 = { # c - Noble clothes 1
		factor = 2

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_clothes value = 0 } }
				blg_clothes_noble = yes
			}
			trigger_else = {
				is_variable_equal = { which = ca_clothes value = 4 }
			}
		}
	}

	4 = { # d - Noble clothes 2
		factor = 2

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_clothes value = 0 } }
				blg_clothes_noble = yes
			}
			trigger_else = {
				is_variable_equal = { which = ca_clothes value = 5 }
			}
		}
	}

	5 = { # e - Noble clothes 3
		factor = 2

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_clothes value = 0 } }
				blg_clothes_noble = yes
			}
			trigger_else = {
				is_variable_equal = { which = ca_clothes value = 6 }
			}
		}
	}

	6 = { # f - Modest clothes 1
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_clothes value = 0 } }
				blg_clothes_common = yes
			}
			trigger_else = {
				is_variable_equal = { which = ca_clothes value = 7 }
			}
		}
	}

	7 = { # g - Modest clothes 2
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_clothes value = 0 } }
				blg_clothes_common = yes
			}
			trigger_else = {
				is_variable_equal = { which = ca_clothes value = 8 }
			}
		}
	}

	8 = { # h - Modest clothes 3
		factor = 1

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_clothes value = 0 } }
				blg_clothes_common = yes
			}
			trigger_else = {
				is_variable_equal = { which = ca_clothes value = 9 }
			}
		}
	}

	9 = { # i - Shady clothes
		factor = 3

		trigger = {
			trigger_if = {
				limit = { is_variable_equal = { which = ca_clothes value = 0 } }
				blg_clothes_intrigue = yes
			}
			trigger_else = {
				is_variable_equal = { which = ca_clothes value = 10 }
			}
		}
	}

	10 = { # j - Martial
		factor = 90

		trigger = {
			trigger_if = {
				limit = { NOT = { is_variable_equal = { which = ca_clothes value = 11 } } }
				trigger_if = {
					limit = {
						blg_merchant_clothes = yes
					}
					is_variable_equal = { which = ca_clothes value = 0 }
				}
				trigger_else = {
					blg_clothes_military = yes
					NOT = { trait = knight }
				}
			}
		}

		modifier = {
			factor = 0.01
			blg_merchant_clothes = yes
		}
	}

	11 = { # k - Ragged clothes
		factor = 100

		trigger = {
			trigger_if = {
				limit = { NOT = { is_variable_equal = { which = ca_clothes value = 12 } } }
				trigger_if = {
					limit = {
						blg_merchant_clothes = yes
					}
					is_variable_equal = { which = ca_clothes value = 0 }
				}
				trigger_else = {
					OR = {
						blg_prisoner = yes
						blg_slave = yes
					}
					NOT = { has_character_modifier = house_arrest }
				}
			}
		}

		modifier = {
			factor = 0.01
			blg_merchant_clothes = yes
		}
	}

	12 = { # l - Royal war gear
		factor = 100

		trigger = {
			trigger_if = {
				limit = { NOT = { is_variable_equal = { which = ca_clothes value = 13 } } }
				trigger_if = {
					limit = {
						blg_merchant_clothes = yes
					}
					is_variable_equal = { which = ca_clothes value = 0 }
				}
				trigger_else = {
					NOT = { check_variable = { which = ca_clothes value = 14 } }
					is_female = no
					blg_default_clothing = no
					blg_clothes_military = yes
					trigger_if = {
						limit = { is_nomadic = yes }
						OR = {
							real_tier = emperor
							spouse_even_if_dead = { real_tier = emperor }
						}
					}
					trigger_else = {
						OR = {
							higher_real_tier_than = duke
							spouse_even_if_dead = { higher_real_tier_than = duke }
						}
					}
				}
			}
		}

		modifier = {
			factor = 0.01
			blg_merchant_clothes = yes
		}
	}

	13 = { # m - Noble war gear
		factor = 100

		trigger = {
			trigger_if = {
				limit = { NOT = { is_variable_equal = { which = ca_clothes value = 14 } } }
				trigger_if = {
					limit = {
						blg_merchant_clothes = yes
					}
					is_variable_equal = { which = ca_clothes value = 0 }
				}
				trigger_else = {
					NOT = { check_variable = { which = ca_clothes value = 15 } }
					is_female = no
					blg_default_clothing = no
					blg_elite_commander = yes
					blg_clothes_military = yes
				}
			}
		}

		modifier = {
			factor = 0.01
			blg_merchant_clothes = yes
		}

		modifier = {
			factor = 0.99
			blg_clothes_chinese = yes
		}
	}

	14 = { # n - Chinese war gear
		factor = 99

		trigger = {
			trigger_if = {
				limit = { NOT = { is_variable_equal = { which = ca_clothes value = 15 } } }
				trigger_if = {
					limit = {
						blg_merchant_clothes = yes
					}
					is_variable_equal = { which = ca_clothes value = 0 }
				}
				trigger_else = {
					is_female = no
					blg_clothes_chinese = yes
					blg_elite_commander = yes
					blg_clothes_military = yes
				}
			}
		}

		modifier = {
			factor = 0.01
			blg_merchant_clothes = yes
		}
	}

	# Goldcloak/Unsullied clothes
	15 = {
		factor = 100
		trigger = {
			is_female = no
			employer = { has_minor_title = title_commander_gold_cloaks }
			OR = {
				culture_group = dornish
				culture_group = andal
				culture_group = first_men
				culture_group = free_folk
			}
		}
	}

	# Knight
	16 = {
		factor = 90
		trigger = {
			is_female = no
			trait = knight
			blg_clothes_military = yes
		}
	}

	# Great House Armor 1
	17 = {
		factor = 100
		trigger = {
			blg_clothes_military = yes
		}
		modifier = {
			factor = 0
			is_female = yes		#Andal females do not have House Armor yet
			culture_group = andal
		}
		modifier = {
			factor = 0
			NOR = {	#Only for these graphical cultures
				culture = stormlander
				culture = reachman
				culture = westerman
				culture = riverlander
				culture = valeman
				culture_group = first_men
				culture_group = iron_isles_culture
				culture = high_valyrian
				culture = eastern_valyrian
				culture_group = dornish
			}
		}
		modifier = {
			factor = 0
			NOR = {
				higher_tier_than = DUKE
				AND = {
					liege = { higher_tier_than = DUKE }
					NOT = { higher_tier_than = COUNT } #Only low-tier bannerman wear their liege's armor
				}
				dynasty = 317	#Baratheon
				dynasty = 1544	#Durrandon
				dynasty = 450224	#Stagborn
				dynasty = 450225	#Stormhart
				dynasty = 450226	#Durrande
				dynasty = 450227	#Deer
				dynasty = 253 #Tyrell
				dynasty = 1254 #Gardener
				dynasty = 450228	#Bloodrose
				dynasty = 450229	#Blackrose
				dynasty = 450230	#Smallrose
				dynasty = 450231	#Greenrose
				dynasty = 190 #Lannister
				dynasty = 450208	#Silvermane
				dynasty = 450209	#Redclaw
				dynasty = 450210	#Roaring
				dynasty = 450211	#Lionford
				dynasty = 159 #Tully
				dynasty = 450216	#Redriver
				dynasty = 450217	#Darkfish
				dynasty = 450218	#Goldfish
				dynasty = 450219	#Steeltrout
				dynasty = 178 #Arryn
				dynasty = 450220	#Redwing
				dynasty = 450221	#Kestrel
				dynasty = 450222	#Bluebird
				dynasty = 450223	#Skywarden
				dynasty = 59		#Stark
				dynasty = 450200	#Whitewolf
				dynasty = 450201	#Goldfang
				dynasty = 450202	#Dreadwolf
				dynasty = 450203	#Winterhold
				dynasty = 107 #Greyjoy
				dynasty = 450232	#Silverink
				dynasty = 450233	#Redjoy
				dynasty = 450234	#Ironkraken
				dynasty = 450235	#Hardman
				dynasty = 496 #Targaryen
				dynasty = 57 #Blackfyre
				dynasty = 450204	#Redwyrm
				dynasty = 450205	#Truedrake
				dynasty = 450206	#Fyreblood
				dynasty = 450207	#Goldfyre
				dynasty = 1 #Martell
				dynasty = 450212	#Darksun
				dynasty = 450213	#Sunviper
				dynasty = 450214	#Blackadder
				dynasty = 450215	#Snakespear
			}
		}
		modifier = {	#Should use Great House Armor 2 instead
			factor = 0
			OR = {
				AND = {  		#Stormlander Culture and a Rhllor/Cadet Baratheon
					OR = {
						AND = {
							dynasty = 317	#Baratheon
							religion = rhllor	#Stannis
						}
						dynasty = 450224	#Stagborn
						dynasty = 450225	#Stormhart
						dynasty = 450226	#Durrande
						dynasty = 450227	#Deer
					}
					culture = stormlander
				}
				AND = {			#Stormlander bannerman employed by Rhllor/Cadet Baratheons
					culture = stormlander
					OR = {
						AND = {
							liege = {  dynasty = 317  }
							liege = {  religion = rhllor  }
						}
						liege = {  dynasty = 450224}	#Stagborn
						liege = {  dynasty = 450225}	#Stormhart
						liege = {  dynasty = 450226}	#Durrande
						liege = {  dynasty = 450227}	#Deer
					}
					NOT = {	higher_tier_than = COUNT }	#Only low-tier bannerman wear their liege's armor
				}
			}
		}
	}

	# Great House Armor 2
	18 = {
		factor = 100
		trigger = {
			blg_clothes_military = yes
			culture = stormlander
			is_female = no
		}

		modifier = {
			factor = 0
			NOR = {
				AND = {  		#Stormlander Culture and a Rhllor/Cadet Baratheon
					OR = {
						AND = {
							dynasty = 317	#Baratheon
							religion = rhllor	#Stannis
						}
						dynasty = 450224	#Stagborn
						dynasty = 450225	#Stormhart
						dynasty = 450226	#Durrande
						dynasty = 450227	#Deer
					}
					culture = stormlander
				}
				AND = {			#Stormlander bannerman employed by Rhllor/Cadet Baratheons
					culture = stormlander
					OR = {
						AND = {
							liege = {  dynasty = 317  }
							liege = {  religion = rhllor  }
						}
						liege = {  dynasty = 450224}	#Stagborn
						liege = {  dynasty = 450225}	#Stormhart
						liege = {  dynasty = 450226}	#Durrande
						liege = {  dynasty = 450227}	#Deer
					}
					NOT = {	higher_tier_than = COUNT }	#Only low-tier bannerman wear their liege's armor
				}
			}
		}
	}
}
