﻿#Vanilla file. Need to comment out a section or the game tries to read both

#MB

is_coptic_faith = {
	group = "special"
	is_available_on_create = {
		has_doctrine = special_doctrine_is_coptic_faith
	}
	# The Alexandrian faiths see each other as Righteous
	special_doctrine_is_coptic_faith = {
		parameters = {
			same_hof_hostility_override = 0
		}
	}

}

is_christian_faith = {
	group = "special"
	
	is_available_on_create = {
		has_doctrine = special_doctrine_is_christian_faith
	}

	special_doctrine_is_christian_faith = {
		parameters = {
			# Since doctrines cannot modify other faith's views of us, only our view of others, all Christian faiths are given this special doctrine which makes them friendlier to Faiths with the Christian Syncretism tenet.
			hostility_override_tenet_christian_syncretism = 2
			christian_syncretic_recipient_opinion_active = yes
			opinion_of_christian_syncretic_actor_opinion_active = 30
			# We don't localise these because Adoptionists are supposed to be a bit of a surprise.
			hostility_override_special_doctrine_adoptionist_school_felicitous_doctrine = 3
			hostility_override_special_doctrine_adoptionist_school_radical_doctrine = 3
		}
	}
}

is_islamic_faith = {
	group = "special"
	
	is_available_on_create = {
		has_doctrine = special_doctrine_is_islamic_faith
	}

	special_doctrine_is_islamic_faith = {
		parameters = {
			# Since doctrines cannot modify other faith's views of us, only our view of others, all Islamic faiths are given this special doctrine which makes them friendlier to Faiths with the Christian Syncretism tenet.
			hostility_override_tenet_islamic_syncretism = 2
			islamic_syncretic_recipient_opinion_active = yes
			opinion_of_islamic_syncretic_actor_opinion_active = 30
			## ME Addition ##
			hostility_override_special_doctrine_is_alb_faith = 0
		}
	}
}

is_jewish_faith = {
	group = "special"
	
	is_available_on_create = {
		has_doctrine = special_doctrine_is_jewish_faith
	}

	special_doctrine_is_jewish_faith = {
		parameters = {
			# Since doctrines cannot modify other faith's views of us, only our view of others, all Jewish faiths are given this special doctrine which makes them friendlier to Faiths with the Christian Syncretism tenet.
			hostility_override_tenet_jewish_syncretism = 2
			jewish_syncretic_recipient_opinion_active = yes
			opinion_of_jewish_syncretic_actor_opinion_active = 30
		}
	}
}

is_eastern_faith = {
	group = "special"
	
	is_available_on_create = {
		has_doctrine = special_doctrine_is_eastern_faith
	}

	special_doctrine_is_eastern_faith = {
		parameters = {
			# Since doctrines cannot modify other faith's views of us, only our view of others, all Eastern faiths are given this special doctrine which makes them friendlier to Faiths with the Eastern Syncretism tenet.
			hostility_override_tenet_eastern_syncretism = 1
			eastern_syncretic_recipient_opinion_active = yes
			opinion_of_eastern_syncretic_actor_opinion_active = 30
		}
	}
}

is_gnostic_faith = {
	group = "special"
	
	is_available_on_create = {
		has_doctrine = special_doctrine_is_gnostic_faith
	}

	special_doctrine_is_gnostic_faith = {
		parameters = {
			hostility_override_tenet_gnosticism = 0
			hostility_override_special_doctrine_is_gnostic_faith = 0
			granting_titles_gives_stress = yes
		}

		traits = {
			virtues = { temperate }
			sins = { gluttonous }
		}

		character_modifier = {
			learning = 2
			stewardship = -2
		}
	}
}

special_tolerance = {
	group = "main_group"
	
	is_available_on_create = {
		always = no # Goes away when creating a new Faith
	}
	
	special_doctrine_ecumenical_christian = {
		parameters = {
			hostility_override_special_doctrine_ecumenical_christian = 1
		}
	}
}

heresy_hostility = {
	group = "not_creatable"
	is_available_on_create = {
		has_doctrine = heresy_hostility_doctrine
	}
	heresy_hostility_doctrine = {
		parameters = {
			hostility_same_religion = 2
		}
	}
}

nudity_doctrine = {
	group = "special"
	is_available_on_create = {
		has_doctrine = special_doctrine_naked_priests
	}

	special_doctrine_naked_priests = {
		parameters = {
			naked_priests_active = yes
		}
	}
}

unreformed_faith = {
	group = "not_creatable"
	is_available_on_create = {
		# Goes away on reformation
		always = no
	}
	unreformed_faith_doctrine = {
		visible = no
		parameters = {
			# unreformed = yes also serves as the basis for the unreformed_syncretic tenet.
			unreformed = yes
			hostility_override_tenet_unreformed_syncretism = 2
			unreformed_syncretic_recipient_opinion_active = yes
			opinion_of_unreformed_syncretic_actor_opinion_active = 30
			conquest_cb_enabled = yes
			faith_can_raid = yes
		}

		character_modifier = {
			monthly_prestige_gain_mult = 0.2
			clan_government_vassal_opinion = -20
			feudal_government_vassal_opinion = -20
			republic_government_vassal_opinion = -20
		}
	}
	west_african_unreformed_faith_doctrine = {
		visible = no
		parameters = {
			# unreformed = yes also serves as the basis for the unreformed_syncretic tenet.
			unreformed = yes
			hostility_override_tenet_unreformed_syncretism = 2
			unreformed_syncretic_recipient_opinion_active = yes
			opinion_of_unreformed_syncretic_actor_opinion_active = 30
			conquest_cb_enabled = yes
			faith_can_raid = yes
		}

		character_modifier = {
			monthly_prestige_gain_mult = 0.1
		}
	}
}

divine_destiny = {
	group = "special"
	is_available_on_create = {
		has_doctrine = divine_destiny_doctrine
	}
	divine_destiny_doctrine = {
		piety_cost = {
			value = faith_doctrine_cost_low
		}
		parameters = {
			divine_destiny_holy_war_cost_reduction = yes
		}
	}
}

adoptionist_school = {
	group = "special"
	
	is_available_on_create = {
		# Removed on reformation.
		always = no
	}

	special_doctrine_adoptionist_school_elipandic_doctrine = {
		parameters = {
			# Elipandics only think other ecumenicals are astray rather than hostile.
			## We can't localise the actual parameter due to structural shenanigans, so we make a dummy one.
			hostility_override_special_doctrine_is_christian_faith = 1
			adoptionists_like_ecumenism = yes
			# ... note that they're only thought of as hostile, unlike the other two schools, who are regarded as evil.
			adoptionists_are_unilateral_hostile = yes
			# Removed on reformation.
			adoptionist_school_removed_on_reformation = yes
			# Adoptionists convert other Christians faster.
			adoptionists_attractively_intuitive_theology = yes
		}
		character_modifier = { learning_per_piety_level = 1 }
		traits = {
			virtues = { stubborn }
		}
	}

	special_doctrine_adoptionist_school_felicitous_doctrine = {
		parameters = {
			# Felicians only think other ecumenicals are astray rather than hostile.
			## We can't localise the actual parameter due to structural shenanigans, so we make a dummy one.
			hostility_override_special_doctrine_is_christian_faith = 1
			adoptionists_like_ecumenism = yes
			# ... other Christians think they're evil, though.
			adoptionists_are_unilateral_evil = yes
			# Removed on reformation.
			adoptionist_school_removed_on_reformation = yes
			# Adoptionists convert other Christians faster.
			adoptionists_attractively_intuitive_theology = yes
		}
		character_modifier = { intrigue_per_piety_level = 1 }
		traits = {
			virtues = { deceitful }
		}
	}

	special_doctrine_adoptionist_school_radical_doctrine = {
		parameters = {
			# Radicals hate & are hated by everyone.
			hostility_override_special_doctrine_is_christian_faith = 3
			adoptionists_are_mutual_evil = yes
			# Removed on reformation.
			adoptionist_school_removed_on_reformation = yes
			# Adoptionists convert other Christians faster.
			adoptionists_attractively_intuitive_theology = yes
		}
		character_modifier = {
			advantage_against_coreligionists = 5
			# And, if you're gonna build a fundamentalist movement...
			ai_war_chance = 1
			ai_war_cooldown = -0.5
		}
		traits = {
			virtues = { arrogant }
		}
	}
}

not_allowed_to_hof = {
	group = "special"
				  
	is_available_on_create = {
		# Removed on reformation.
		always = no
	}
	
	special_doctrine_not_allowed_to_hof = {
		name = {
			first_valid = {
				triggered_desc = {
					trigger = {
						religion_tag = judaism_religion
					}
					desc = prophecy_of_malachi_name
				}
				desc = special_doctrine_not_allowed_to_hof_name
			}
		}

		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						religion_tag = judaism_religion
					}
					desc = prophecy_of_malachi_desc
				}
				desc = special_doctrine_not_allowed_to_hof_desc
			}
		}
		parameters = {
			block_from_create_hof_parameter = yes
		}
	}
}
					  
#Game rule only
full_tolerance = {
	group = "special"
	is_available_on_create = {
		has_doctrine = special_doctrine_full_tolerance
	}
	
	special_doctrine_full_tolerance = {
		parameters = {
			hostility_override_special_doctrine_full_tolerance = 0
		}
	}
}

#ME Addition
is_alb_faith = {
	group = "special"
	
	is_available_on_create = {
		has_doctrine = special_doctrine_is_alb_faith
	}

	special_doctrine_is_alb_faith = {
		parameters = {
			hostility_override_special_doctrine_is_islamic_faith = 0
			hostility_override_tenet_islamic_syncretism = 2
		}
	}
}

has_jizya_doctrine = {

	group = "special"

	is_available_on_create = {
		OR = {
			has_doctrine = special_doctrine_jizya
			has_doctrine = special_doctrine_is_islamic_faith
		}
	}
	special_doctrine_jizya = {
		character_modifier = {
			domain_tax_different_faith_mult = 0.2
			levy_reinforcement_rate_same_faith = 0.25
			levy_reinforcement_rate_different_faith = -0.25
		}  
		parameters = {
			unlock_jizya_contract = yes
											 
		}
	}
}

#Teaching of the Vedas
is_hinduism_faith = {
	group = "special"

	is_available_on_create = {
		has_doctrine = special_doctrine_is_hinduism_faith
	}

	special_doctrine_is_hinduism_faith = {
		parameters = {
			reincarnation_resistance_to_conversion = yes
			reincarnation_events_active = yes
			select_personal_god_active = yes
		}
	}
}

#Teaching of Mahavira
is_jainism_faith = {
	group = "special"

	is_available_on_create = {
		has_doctrine = special_doctrine_is_jainism_faith
	}

	special_doctrine_is_jainism_faith = {
		parameters = {
			take_vows_active = yes
			reincarnation_events_active = yes
			cannot_hunt = yes
		}
	}
}

#Teaching of Gautama Buddha
is_buddhist_faith = {
	group = "special"

	is_available_on_create = {
		has_doctrine = special_doctrine_is_buddhist_faith
	}

	special_doctrine_is_buddhist_faith = {
		parameters = {
			take_vows_active = yes
			reincarnation_events_active = yes
		}
	}
}

# Tibetan Sky Burials
doctrine_sky_burials = {
	group = "special"
	is_available_on_create = {
		has_doctrine = tibetan_sky_burials
	}
	tibetan_sky_burials = {
		visible = no
		parameters = {
			sky_burials_active = yes
		}
	}
}

# Cultural Religion 
doctrine_cultural_religion = {
	group = "special"
	is_available_on_create = {
		has_doctrine = cultural_religion
	}
	cultural_religion = {
		visible = no
		parameters = {
			other_culture_conversion_penalty_active = yes
		}
	}
}

#Tribal Religion
doctrine_tribal_religion = {
	group = "special"
	is_available_on_create = {
		has_doctrine = tribal_religion
	}
	tribal_religion = {
		visible = no
		parameters = {
			other_culture_conversion_penalty_active = yes
			tenet_adaptive_conversion_resistance = yes
		}
	}
}

has_special_heritage = {
	group = "main_group"
	is_available_on_create = {
		has_doctrine = special_faith_has_germanic_heritage
	}
	
	# The former Germanic faiths see each other as Righteous, and they see faiths with the 'Teachings of Ulfilas' doctrine as Astray
	special_faith_has_germanic_heritage = {
		is_shown = {
			has_doctrine = special_faith_has_germanic_heritage
		}
		parameters = {
			hostility_override_special_faith_has_germanic_heritage = 0
		}
	}
	
	## Hellenism and its syncretic faiths see each other as Righteous
	#special_faith_has_hellenic_syncretism = {
	#	is_shown = {
	#		has_doctrine = special_faith_has_hellenic_syncretism
	#	}
	#	parameters = {
	#		hostility_override_special_faith_has_hellenic_syncretism = 0
	#	}
	#}
	
	# Just in case you want to discard your special heritage
	special_faith_no_special_heritage = {
		parameters = {
			no_effect_removed_upon_creation = yes
		}
	}
}