####Due to a bug in my game where court chaplain's task wasn't read, i resolved it by putting them in another file

action_inquisition = {
	attribute = learning

	potential = {
	}

	trigger = {
		num_of_settlements = 1
		NAND = {
			FROM = { job_spiritual = { has_character_modifier = spiritual_refused_pagans } }  # See Event ZE.5040
			owner = {
				religion_group = pagan_group
				NOT = { religion = FROM }
			}
		}
		OR = {
			proselytize_convert_independent_trigger = yes
			any_province_lord = {
				OR = {
					character = FROM
					is_liege_or_above = FROM
				}
			}
		}
	}

	display_on_map = {
		tooltip = JOB_PROSELYTIZE_SAME_RELIGION
		trigger = {
			religion = FROM
			any_province_lord = {
				OR = {
					character = FROM
					is_liege_or_above = FROM
				}
			}
		}
		color = { 0 0 255 }
	}

	display_on_map = {
		tooltip = JOB_PROSELYTIZE_DIFFERENT_RELIGION
		trigger = {
			NOT = { religion = FROM }
			any_province_lord = {
				OR = {
					character = FROM
					is_liege_or_above = FROM
				}
			}
		}
		color = { 0 255 0 }
	}

	display_on_map = {
		tooltip = JOB_PROSELYTIZE_CONVERT_INDEPENDENT
		trigger = {
			proselytize_convert_independent_trigger = yes
		}
		color = { 255 35 35 }
	}

	events = { 900 901 902 903 }
}

action_improve_rel_relations = {
	attribute = learning

	potential = {
		FROM = {
			NOT = { religion_group = muslim }
			NOT = {
				government = Bear_feudal_gov
			}
		}
	}

	trigger = {
		any_province_lord = {
			religion = FROM
			is_theocracy = yes
			FROM = {
				job_spiritual = {
					NOT = { character = PREVPREV } # Can't be sent to improve relations with himself...
				}
			}
		}
		is_within_diplo_range = FROM
	}

	events = { 906 907 }
}

action_advance_cul_tech = {
	attribute = learning

	potential = {
		FROM = {
			is_tribal = no
			NOT = {
				government = Bear_feudal_gov
			}
		}
	}

	trigger = {
		any_province_lord = {
			OR = {
				character = FROM
				is_liege_or_above = FROM
			}
		}
		technology_can_spread = yes
	}

	tech_growth_modifier_culture = 0.05

	events = { 926 927 }
}

action_build_zeal = {
	attribute = learning

	potential = {
		FROM = {
			is_tribal = yes
		}
	}

	trigger = {
		FROM = {
			is_capital = PREV
		}
	}

	monthly_character_piety = 0.05

	events = { 20218 }
}

action_hunt_heretics = {
	attribute = learning

	potential = {
		has_dlc = Mystics
	}

	liege_modifier = apostate_liege_mod

	offmap = yes

	events = { MNM.70100 }
}

# Lord Spiritual (Muslim only)
action_charity = {
	attribute = learning

	potential = {
		FROM = { religion_group = muslim }
	}

	trigger = {
		any_province_lord = {
			character = FROM
		}
	}

	local_revolt_risk = -0.01

	events = { 20040 20043 20048 20050 }
}

action_advance_global_tech = {
	attribute = learning

	potential = {
		FROM = {
			government = Bear_feudal_gov
		}
	}

	trigger = {
		any_province_lord = {
			OR = {
				character = FROM
				is_liege_or_above = FROM
			}
		}
		technology_can_spread = yes
	}

	tech_growth_modifier = 0.01
	culture_techpoints = 0.0015
	economy_techpoints = 0.001
	military_techpoints = 0.001

	events = {  }
}

action_religious_sympathy = {
	attribute = learning

	potential = {
		FROM = {
			government = Bear_feudal_gov
		}
	}

	trigger = {
		any_province_character = {
			NOR = {
				religion_group = Animals_grups
				trait = sympathy_animals_religions
			}
		}
	}

	events = { ani_plus.057 ani_plus.058 }
}