#Triggers to control Coat of Arms weighting

# highest_held_title_tier
# holder.primary_title.tier = tier_barony
#building_requirement_tribal_holding_in_county = {
#	NOT = {
#		county = {
#			any_county_province = {
#				has_holding_type = tribal_holding
#			}
#		}
#	}
#}

# culture = { has_cultural_pillar = heritage_west_germanic }
# current_date > 1000.1.1


################
#    실험 트리거   #
################



coa_cat_tier_king_trigger2 = {
	holder = {
			holder.primary_title.tier >= tier_duchy #tier_empire #tier_kingdom
	}
}

coa_cat_tier_king_trigger = {
	holder = {
			exists = scope:title
			scope:title = {
				holder.primary_title.tier >= tier_duchy
				}
		}
}

coa_cat_tier_empire_trigger = {
	holder = {
			exists = scope:title
			scope:title = {
				holder.primary_title.tier = tier_empire
				}
		}
}


cat_coa_has_trait_saint_trigger = {
	holder = {
			OR = {
			has_trait = faith_warrior
			has_trait = crusader_king
			has_trait = paragon
			has_trait = consecrated_blood
			has_trait = saint
			has_trait = devoted
			has_trait = sayyid
			has_trait = saoshyant
			has_trait = saoshyant_descendant
			has_trait = savior
			has_trait = divine_blood
			has_trait = blood_of_prophet
			has_trait = zealous
			}
		}
}

cat_coa_female_trigger = {
	holder = {
			is_female = yes
		}
}






################
# 종교 관련 트리거  #
################

#기독교가 아닐때 -작동함-
cat_coa_notchrist_religion_trigger = {
	holder = {
		NOT = {
			faith.religion = religion:christianity_religion
			}
	}
}

#기독교 그룹 -작동함-
cat_coa_christ_religion_trigger = {
	holder = {
			faith.religion = religion:christianity_religion
	}
}

#이슬람 그룹 -작동함-
cat_coa_islam_religion_trigger = {
	holder = {
			faith.religion = religion:islam_religion
	}
}

#유대교 그룹
cat_coa_judaism_religion_trigger = {
	holder = {
			faith.religion = religion:judaism_religion
	}
}

# 파간 종교 종합 -작동함-
cat_coa_pagan_religion_trigger = {
	holder = {
		OR = {
			faith.religion = religion:germanic_religion
			faith.religion = religion:slavic_religion
			faith.religion = religion:finno_ugric_religion
			faith.religion = religion:baltic_religion
			faith.religion = religion:tengrism_religion
			faith.religion = religion:magyar_religion
			faith.religion = religion:siberian_religion
			faith.religion = religion:paganism_religion
			}
	}
}

#헬레닉 그룹
cat_coa_hellenism_religion_trigger = {
	holder = {
			faith.religion = religion:hellenism_religion
	}
}

#불교 그룹
cat_coa_buddhism_religion_trigger = {
	holder = {
			faith.religion = religion:buddhism_religion
	}
}



################
# 정부 체제 트리거 #
###############

coa_cat_republic_trigger = { # 공화정
	holder = { has_government = republic_government }
}

coa_cat_tribal_trigger = { # 부족정
	holder = { has_government = tribal_government }
}

coa_cat_theocracy_trigger = { # 신정
	holder = { has_government = theocracy_government }
}

# feudal_government 봉건정일때
# clan_government 클랜일때
# mercenary_government 용병일때
# holy_order_government 기사단일때








############
# 가문 트리거 #
############

# 카롤링거 가문 karling	
coa_cat_dynasty_karling_trigger = {
	holder = { dynasty = dynasty:25061 }
}

# 합스부르크(에티초넨 가문) Etichonen
coa_cat_dynasty_habsburg_trigger = {
	holder = { dynasty = dynasty:664 }
}

# 사보이 가문 savoie
coa_cat_dynasty_savoie_trigger = {	
	holder = {
		dynasty = dynasty:240
		}
}

# 아스티 가문 asti
coa_cat_dynasty_asti_trigger = {	
	holder = {
			dynasty = dynasty:799
		}
}

# 호엔슈타우펜 가문 hohenstaufen	
coa_cat_dynasty_hohenstaufen_trigger = {
	holder = { dynasty = dynasty:529 }
}

# 호엔촐레른 가문 Hohenzollern	
coa_cat_dynasty_hohenzollern_trigger = {
	holder = { dynasty = dynasty:12476 }
}

# 노르망디 가문 normandy
coa_cat_dynasty_normandy_trigger = {
	holder = { dynasty = dynasty:752 }
}

# 팔라올로기스 가문 palaiologos
coa_cat_dynasty_palaiologos_trigger = {
	holder = { dynasty = dynasty:48}
}

# 피아스트 가문 piast
coa_cat_dynasty_piast_trigger = {
	holder = { dynasty = dynasty:699 }
}

# 메로빙거 가문 meroving		
coa_cat_dynasty_meroving_trigger = {
	holder = { dynasty = dynasty:542 }
}

# Luitpolding / 비텔스바흐 Wittelsbach / 안스바흐 Andechs
coa_cat_dynasty_luitpolding_trigger = {
	holder = { dynasty = dynasty:416 }
}

# 올덴부르크 가문 oldenburg / 글뤼크스부르크 glucksburg
coa_cat_dynasty_oldenburg_trigger = {
	holder = { dynasty = dynasty:224 }
}

# 튀지냥 가문 lusignan
coa_cat_dynasty_lusignan_trigger = {
	holder = { dynasty = dynasty:93 }
}



#################
#  가문 특수 트리거  #
#################


# 메로빙거 가문이거나 상위군주들이 메로빙거 가문일때		
coa_cat_meroving_liege_trigger = {
	OR = {
	holder = { dynasty = dynasty:542 }
	holder = { 
		any_liege_or_above = {dynasty = dynasty:542 }
		}
	}
}

#카롤링거 가문이거나 상위군주들이 카롤링거 가문일때
coa_cat_karling_liege_trigger = {
	OR = {
		holder = { dynasty = dynasty:25061 }
		holder = { 
		any_liege_or_above = {dynasty = dynasty:25061 }
		}
	}
}

#로베르틴 가문이거나 상위군주들이 로베르틴 가문일때
coa_cat_robertien_liege_trigger = {
	OR = {
		holder = { dynasty = dynasty:743 }
		holder = { 
		any_liege_or_above = {dynasty = dynasty:743 }
		}
	}
}

#오트빌 가문이거나 노르만 문장일때
coa_cat_hauteville_norman_trigger = {
	OR = {
		holder = { dynasty = dynasty:678 }
		holder.culture = { has_coa_gfx = norman_coa_gfx }
	}
}



################
# 문화 관련 트리거  #
################

cat_coa_central_germanic_group_trigger = { # 독일 중게르만그룹은 다 사용
	holder.culture = { has_coa_gfx = german_group_coa_gfx }
}

cat_coa_dutch_culture_trigger = { # 더치, 프리슬란트
	holder.culture = { has_coa_gfx = frisian_coa_gfx }
}

cat_coa_iberian_group_trigger = { # 이베리아 문화는 안달루시아 빼고 다 사용
	holder.culture = { has_coa_gfx = iberian_group_coa_gfx }
}
# castilian		# castilian_coa_gfx
# asturleonese	# leonese_coa_gfx

cat_coa_frankish_group_trigger = { # 프랑스 그룹은 다 사용
	holder.culture = { has_coa_gfx = frankish_group_coa_gfx }
}

cat_coa_french_culture_trigger = { # 프랑스
	holder.culture = { has_coa_gfx = french_coa_gfx }
}
# norman		# norman_coa_gfx
# occitan		# occitan_coa_gfx

cat_coa_norman_culture_trigger = { # 노르만
	holder.culture = { has_coa_gfx = norman_coa_gfx }
}

cat_coa_byzantine_group_trigger = { # 비잔티움 그룹은 다 사용
	holder.culture = { has_coa_gfx = byzantine_group_coa_gfx }
}

cat_coa_latin_group_trigger = { # 라틴 그룹은 다 사용
	holder.culture = { has_coa_gfx = latin_group_coa_gfx }
}

cat_coa_irish_trigger = { # 아일랜드 문화만
	holder.culture = { has_coa_gfx = irish_coa_gfx }
}

cat_coa_scott_trigger = { # gaelic scottish pictish cumbrian
	holder.culture = { has_coa_gfx = scottish_coa_gfx }
}

cat_coa_welsh_trigger = { # cornish welsh
	holder.culture = { has_coa_gfx = welsh_coa_gfx }
}

cat_coa_breton_trigger = { # breton
	holder.culture = { has_coa_gfx = breton_coa_gfx }
}

cat_coa_anglo_saxon_trigger = { # anglo saxon
	holder.culture = { has_coa_gfx = anglo_saxon_coa_gfx }
}

cat_coa_eng_nor_trigger = { # 프랑크 잉글랜드
	holder.culture = {
		OR = {
			has_coa_gfx = english_coa_gfx
			has_coa_gfx = frankish_group_coa_gfx
		}
	}
}

cat_coa_norse_trigger = { # 노스
	holder.culture = { has_coa_gfx = norse_coa_gfx }
}

# 슬라브 종합
cat_coa_slavic_g_culture_trigger = {
	holder.culture = {
		OR = {
			has_coa_gfx = east_slavic_group_coa_gfx
			has_coa_gfx = south_slavic_group_coa_gfx
			has_coa_gfx = west_slavic_group_coa_gfx
		}
	}
}

cat_coa_east_slavic_trigger = { # 동슬라브 그룹
	holder.culture = {
			has_coa_gfx = east_slavic_group_coa_gfx
	}
}

cat_coa_south_slavic_trigger = { # 남슬라브 그룹
	holder.culture = {
			has_coa_gfx = south_slavic_group_coa_gfx
	}
}

cat_coa_west_slavic_trigger = { # 서슬라브 그룹
	holder.culture = {
			has_coa_gfx = west_slavic_group_coa_gfx
	}
}

cat_coa_polish_trigger = { # 폴란드 (폴란드, 슬로비엔, 폴라비엔)
	holder.culture = {
			has_coa_gfx = polish_coa_gfx
	}
}

cat_coa_magyar_trigger = { # 헝가리, 마자르
	holder.culture = {
			has_coa_gfx = magyar_group_coa_gfx
	}
}

cat_turkic_group_coa_gfx_trigger = { # 투르크그룹
	holder.culture = {
			has_coa_gfx = turkic_group_coa_gfx
	}
}

cat_iranian_group_coa_gfx_trigger = { # 페르시아 그룹
	holder.culture = {
			has_coa_gfx = iranian_group_coa_gfx
	}
}

cat_western_coa_gfx_trigger = { # 유럽문장 그룹
	holder.culture = {
			has_coa_gfx = western_coa_gfx
	}
}

cat_west_g_culture_trigger = { # 서방문화권 or 4차십자군
	holder.culture = {
		OR = {
			has_coa_gfx = frankish_group_coa_gfx
			has_coa_gfx = iberian_group_coa_gfx
			has_coa_gfx = west_germanic_group_coa_gfx
			has_coa_gfx = german_group_coa_gfx
			has_coa_gfx = west_slavic_group_coa_gfx
			has_coa_gfx = magyar_group_coa_gfx
			has_coa_gfx = latin_group_coa_gfx
			has_coa_gfx = irish_coa_gfx
			has_coa_gfx = scottish_coa_gfx
			has_coa_gfx = english_coa_gfx
			has_coa_gfx = anglo_saxon_coa_gfx
			has_coa_gfx = norman_coa_gfx
#			has_coa_gfx = north_germanic_group_coa_gfx
		}
	}
}

################
# 문화 특수 트리거  #
################

# 블라흐 명백
cat_coa_vlach_heritage_trigger = { #
	holder.culture = { has_cultural_pillar = heritage_vlach }
}

# 문화가 서고트 코드 전통을 가지고 있을때
cat_coa_visigoth_trigger = { # 작동
	holder.culture = { has_cultural_tradition = tradition_visigothic_codes }
}

# 르네상스 혁신을 가질 때
cat_innovation_renaissance_trigger = { #작동
	holder.culture = { has_innovation = innovation_development_04 }
}

# 대포 혁신을 가질 때
cat_innovation_bombard_trigger = {
holder.culture = { has_innovation = innovation_bombard }
}



################
# 작위 관련 트리거  #
################

# 신롬권역
coa_cat_hre_liege_trigger = {
	OR = {
		holder = {
			OR = {
				has_title 		= title:e_hre
				has_claim_on 	= title:e_hre
			}
		}
	holder = { 
		any_liege_or_above = { has_title = title:e_hre }
		}
	}
}

# 동롬 똥롬
coa_cat_byzantium_trigger = {
	holder = {
		OR = {
			has_title 		= title:e_byzantium
			has_claim_on 	= title:e_byzantium
		}
#		NOT = {
#			exists = title:e_byzantium.holder
#		}
	}
}

# 크로아티아
coa_cat_croatia_trigger = {
	holder = {
		OR = {
			has_title 		= title:k_croatia
			has_claim_on 	= title:k_croatia
		}
	}
}

# 헝가리 권역
coa_cat_hungary_liege_trigger = {
	OR = {
		holder = {
			OR = {
				has_title 		= title:k_hungary
				has_claim_on 	= title:k_hungary
			}
		}
	holder = { 
		any_liege_or_above = { has_title = title:k_hungary }
		}
	}
}

# 베네치아 권역
coa_cat_venice_liege_trigger = {
	holder = { 
		OR = {
		any_liege_or_above = { has_title = title:k_venice }
		has_title 		= title:k_venice
			}
		}
}



################
#   특수 트리거   #
################

coa_date_a_trigger = { #900년보다 낮거나 같을때
	current_date <= 900.1.1
}

#coa_date_b_trigger = { #1066년 9월 보다 높거나 같을때 -작동함-
#	current_date >= 1066.9.17
#}

# 독립영주일경우
coa_cat_independent_trigger = {
	holder = { is_independent_ruler = yes }
}

# 대헝가리
coa_cat_great_hungary_trigger = {
	holder = {
			completely_controls = title:k_croatia # 크로아티아
			}
}

















