﻿clergymen = {
	texture = "gfx/interface/icons/pops_icons/clergymen.dds"
	color = hsv{ 0.13 0.52 0.91 }
	start_quality_of_life = 10
	wage_weight = 3
	paid_private_wage = yes
	literacy_target = 0.80
	education_access = 0.5
	dependent_wage = 0.5	# per year
	unemployment = yes

	# 50% - 100% politically engaged
	political_engagement_base = 0.5
	political_engagement_literacy_factor = 0.5

	political_engagement_mult = {
		value = 1

		add = {
			desc = "POP_STARVATION"

			if = {
				limit = {
					is_in_mild_starvation = yes
				}
				value = 0.5
			}
			else_if = {
				limit = {
					is_in_severe_starvation = yes
				}
				value = 1.5
			}
		}
	}

	qualifications_growth_desc = "CLERGYMEN_QUALIFICATIONS_DESC"
	qualifications = {
		if = {
			limit = {
				literacy_rate > 0.05 #was 0.2
			}
			# baseline: ( literacy - 0.2 ) * 20, norm 6 for Literacy 50% and Accepted Religion
			add = {
				value = literacy_rate
				subtract = 0.1 #was 0.2
				min = 0
				multiply = 20 #was 20
				desc = "QUALIFICATIONS_LITERACY_FACTOR"
			}
			if = {
				limit = {
					is_pop_type = peasants
				}
				multiply = {
					value = 0.5 #was none
					desc = "QUALIFICATIONS_FAVORED_TYPE"
				}
			}
			if = {
				limit = {
					is_pop_type = laborers
				}
				multiply = {
					value = 0.25 #was none
					desc = "QUALIFICATIONS_FAVORED_TYPE"
				}
			}
			if = {
				limit = {
					is_pop_type = academics
				}
				multiply = {
					value = 10 #was 5
					desc = "QUALIFICATIONS_FAVORED_TYPE"
				}
			}
			if = {
				limit = {
					is_pop_type = aristocrats
				}
				multiply = {
					value = 5
					desc = "QUALIFICATIONS_FAVORED_TYPE"
				}
			}
			if = {
				limit = {
					state = {
						state_religious_acceptance = {
							target = ROOT.religion
							value < religious_acceptance_medium
					   	}
					}
				}
				multiply = {
					value = 0.2
					desc = "POTENTIALS_RELIGIOUS_DISCRIMINATION"
				}
			}
			if = {
				limit = {
					owner = {
						has_law_or_variant = law_type:law_total_separation
					}
				}
				multiply = {
					value = 0.5
					desc = "QUALIFICATIONS_CLERGYMEN_UNDER_TOTAL_SEPARATION"
				}
			}
			if = {
				limit = {
					is_peasant_under_serfdom = yes
				}
				multiply = {
					value = 0.25
					desc = "QUALIFICATIONS_PEASANTS_UNDER_SERFDOM"
				}
			}
			if = {
				limit = {
					religion = rel:atheist
				}
				multiply = {
					value = 0.1
					desc = "ATHEIST_CLERGYMEN"
				}
			}
		}
		else = {
			value = {
				desc = "QUALIFICATIONS_INSUFFICIENT_LITERACY_DECAY"
				value = -1
			}
		}
	}

	portrait_age = {
		integer_range = {
			min = define:NPortrait|GRACEFUL_AGING_START
			max = define:NPortrait|GRACEFUL_AGING_END
		}
	}
	portrait_pose = { value = 0 }
	portrait_is_female = { always = yes }
}
