﻿namespace = mz_east_europe
# decision_revive_magyar_paganism, by Flavio Verna
# 0032

##################################################
# Reviving Magyarism (edited for compatibility)
##################################################

scripted_effect mz_revive_magyar_paganism_notify_players_effect = {
	every_player = {
		limit = {
			NOT = { this = root }
			capital_province = {
				geographical_region = world_europe_east
			}
		}
		trigger_event = east_europe.0034
	}
}

mz_east_europe.0032 = {
	type = character_event
	title = east_europe.0032.t
	desc = east_europe.0032.desc
	theme = faith
	left_portrait = {
		character = scope:scoped_ruler
		animation = personality_zealous
	}
	override_background = { reference = throne_room }
	
	immediate = {
		play_music_cue = "mx_cue_faith_conversion"
		save_scope_as = scoped_ruler
		faith = { save_scope_as = old_faith }
		revive_magyar_paganism_decision_scripted_effect = yes
		legend_seed_great_deed_faith_effect = {
			ANTAGONIST = scope:old_faith.religious_head
			OLD_FAITH = scope:old_faith
		}		
	}

	#The Old Ways need no adjustment.
	option = {
		name = east_europe.0032.a
		#Get a nice reward for your adherence to the true faith.
		add_piety_level = 1
		#Sort notification copy for players.
		save_scope_value_as = {
			name = hungarian_return
			value = flag:vanilla
		}
		mz_revive_magyar_paganism_notify_players_effect = yes
	}
	#Syncretism: perhaps we don't leave behind *all* the new teachings...
	option = {
		name = east_europe.0032.b
		#Requires you to have been in a religion that actually has a syncretic tenet available.
		trigger = {
			scope:old_faith.religion = {
				OR = {
					this = religion:christianity_religion
					this = religion:islam_religion
					this = religion:judaism_religion
					is_in_family = rf_eastern
				}
			}
		}
		#Reasonable carrot for your efforts.
		add_piety_experience = major_piety_value
		#Christian/Islamic/Jewish/Eastern syncretism replaces astrology.
		if = {
			limit = { scope:old_faith.religion = religion:christianity_religion }
			faith:magyar_pagan = {
				remove_doctrine = doctrine_mz_no_syncretism
				add_doctrine = tenet_christian_syncretism
			}
		}
		else_if = {
			limit = { scope:old_faith.religion = religion:islam_religion }
			faith:magyar_pagan = {
				remove_doctrine = doctrine_mz_no_syncretism
				add_doctrine = tenet_islamic_syncretism
			}
		}
		else_if = {
			limit = { scope:old_faith.religion = religion:judaism_religion }
			faith:magyar_pagan = {
				remove_doctrine = doctrine_mz_no_syncretism
				add_doctrine = tenet_jewish_syncretism
			}
		}
		else = {
			faith:magyar_pagan = {
				remove_doctrine = doctrine_mz_no_syncretism
				add_doctrine = tenet_eastern_syncretism
			}
		}
		#Sort notification copy for players.
		save_scope_value_as = {
			name = hungarian_return
			value = flag:syncretic
		}
		mz_revive_magyar_paganism_notify_players_effect = yes
	}
	#Human Sacrifice: we must assert our differences with blood and skulls!
	option = {
		name = east_europe.0032.c
		#Reasonable carrot for your efforts.
		add_piety_experience = major_piety_value
		#Human sacrifice replaces ancestor worship-
		faith:magyar_pagan = {
			remove_doctrine = tenet_ancestor_worship
			add_doctrine = tenet_human_sacrifice
		}
		#Sort notification copy for players.
		save_scope_value_as = {
			name = hungarian_return
			value = flag:bloodthirsty
		}
		mz_revive_magyar_paganism_notify_players_effect = yes
	}
	#Adaptive: we should always remain protean.
	option = {
		name = east_europe.0032.d
		#Reasonable carrot for your efforts.
		add_piety_experience = major_piety_value
		#Adaptive replaces auspicious birthright.
		faith:magyar_pagan = {
			remove_doctrine = tenet_mystical_birthright
			add_doctrine = tenet_adaptive
		}
		#Sort notification copy for players.
		save_scope_value_as = {
			name = hungarian_return
			value = flag:adaptive
		}
		mz_revive_magyar_paganism_notify_players_effect = yes
	}
}

mz_east_europe.9999 = {
	hidden = yes
	orphan = yes

	trigger = { always = no }

	immediate = {
		trigger_event = east_europe.0032
		trigger_event = middle_east_decisions.0007
	}
}