### CHINESE PORTRAIT PROPERTIES TRIGGERS ###

### This only applies to portraiture, and is primarily intended to represent the complex interaction between hairstyles and headgear for Chinese characters according to social guidelines of filial piety and official rank

# Filial Piety
# is_devout_chinese_buddhist_trigger	Is a male Chinese character who is a devout Buddhist, a Buddhist monk, or has high-level religious education and is a devout Buddhist who is not also a landed character (except temple holders)
# follows_filial_piety_trigger			Is a Chinese character who is expected to adapt to cultural rules for filial piety
# filial_piety_irrelevant_trigger		Is a Chinese character who is not expected to adapt to cultural rules for filial piety, such as low-level peasants, disreputable characters, criminals, or "wandering" Chinese characters abroad who've "gone native"
# filial_piety_maiden_trigger			Is a Chinese female character who is expected to adhere to filial piety rules, but is unmarried and sports hairstyles which demonstrate this

# Hanfu Rules
# tang_dynasty_putou_trigger			To represent the Tang dynasty's penchant for wearing putou "head wrap" at the emperor tier male character level
# song_dynasty_futou_trigger			To represent the Song dynasty's penchant for wearing "pentagonal" Zhangokfutou at the emperor tier male character level
# chinese_martial_modifier_trigger		To represent the rules for displaying "Martial" gear and allow for extra slots for the martial level clothing for Chinese characters
# chinese_generals_modifier_trigger		To represent the same as above, but for higher-tiered Generals in fancier armor
# chinese_makeup_trigger				Is Chinese and female, and expected to wear some form of facial makeup in the form of facial whitening and/or lip and forehead markings or rouge
# chinese_empress_jewelry_trigger		Is Chinese, is an empress/queen or crown princess
# chinese_generic_jewelry_trigger		Is Chinese, is under follows_filial_piety_trigger, is not an empress/queen



### FILIAL PIETY ###

### A.K.A. The Chinese have a lot of rules about hair. ###

is_devout_chinese_buddhist_trigger = {			### Male, and visually Chinese by race and Buddhist religion; and is a Buddhist monk, a chaplain, or a theocratic ruler.
	graphical_culture = chinesegfx
	religion = buddhist
	is_female = no
	OR = {
		society_member_of = monastic_order_buddhist
		has_job_title = job_spiritual
		AND = {
			is_theocracy = yes
			is_ruler = yes
		}
	}
}

follows_filial_piety_trigger = {				### Is visually Chinese and Han cultured, and therefore expected to follow filial piety, is not a prisoner.
	graphical_culture = chinesegfx
	culture = han
	prisoner = no
}

filial_piety_irrelevant_trigger = {				### Filial piety not expected, allows non-Buddhist religious leaders/devout adherents and ethnically Chinese but different cultured individuals to use an expanded set of hair.
	follows_filial_piety_trigger = no
	NOT = {
		culture = han
		is_devout_chinese_buddhist_trigger = yes
	}
}

filial_piety_maiden_trigger = {					### Expected to follow filial piety but also an unmarried woman under 50 who isn't a ruler or a King-tier or higher character 
	is_married = no
	is_ruler = no
	is_female = yes
	follows_filial_piety_trigger = yes
	NOR = {
		real_tier = king
		real_tier = emperor
		age = 50
	}
}

### HANFU RULES ###

tang_dynasty_putou_trigger = {
	culture = han
	dynasty = 1051150 							### Tang Dynasty, known in almost all later artwork as wearing their putou
	is_female = no
	is_offmap_tag_including_dead = offmap_china
}

song_dynasty_futou_trigger = {
	culture = han
	dynasty = 1051151 							### Song Dynasty, known in almost all official artwork as wearing their weird zhangokfutou
	is_female = no
	is_offmap_tag_including_dead = offmap_china
}

chinese_martial_modifier_trigger = {			### Similar to the default "Martial" gear for everyone else, but used to expand the gearset and also limit the "tier" of armor for these characters
	OR = {
		culture_group = chinese_group
		culture = khitan
		culture = jurchen
	}
	OR = {
		primary_title = {
			OR = {
				mercenary = yes
				holy_order = yes
			}
		}
		AND = {
			is_nomadic = yes
			real_tier = king
			OR = {
				war = yes
				siege = { is_attacker = yes }
			}
		}
		AND = {
			has_job_title = job_marshal
			liege = {
				real_tier = king
				is_feudal = yes
				#OR = {
				#	culture_group = chinese_group
				#	culture = khitan
				#	culture = jurchen
				#}
			}
		}
	}
}

chinese_generals_modifier_trigger = {				### Like the above, but for characters of Duke-tier or higher
	OR = {
		culture_group = chinese_group
		culture = khitan
		culture = jurchen
	}
	OR = {
		has_landed_title = e_china_west_governor
		AND = {
			in_command = yes
			OR = {
				AND = {
					is_nomadic = yes
					real_tier = emperor
					OR = {
						war = yes
						siege = { is_attacker = yes }
					}
				}
				AND = {
					is_nomadic = no
					OR = {
						real_tier = emperor
						real_tier = king
					}
				}
			}
		}
		AND = {
			has_job_title = job_marshal
			liege = {
				real_tier = emperor
				is_feudal = yes
				NOT = { primary_title = { title = e_china_west_governor } }
				#OR = {
				#	culture_group = chinese_group
				#	culture = khitan
				#	culture = jurchen
				#}
			}
		}
	}
}

chinese_makeup_trigger = { 							### Facial makeup expected for those under traditional Han filial piety rules 
	follows_filial_piety_trigger = yes
	OR = {
		higher_real_tier_than = baron
		spouse = { higher_real_tier_than = baron }
		has_character_modifier = jd_princess
	}
}

chinese_empress_jewelry_trigger = {					### Used to display the strange facial jewelry on upper-tier Chinese nobles
	is_female = yes
	OR = {
		higher_real_tier_than = duke
		spouse = { higher_real_tier_than = duke }
		has_character_modifier = jd_princess
	}
}

