﻿random_yearly_playable_pulse = {
	random_on_action = {
		4 = manitweaks_flavor_events
	}
}

on_game_start = {
	on_actions = {
		manitweaks_immediate_action
	}
}

manitweaks_immediate_action = {
	effect = {
		# Incase mod is overriden by another religion file
		if = {
			limit = {
				faith:manichean = {
					has_doctrine = tenet_esotericism
				}
			}
			faith:manichean = {
				remove_doctrine = tenet_esotericism
				add_doctrine = tenet_monasticism
			}
		}
		struggle:persian_struggle = {
			set_faith_as_involved = faith:manichean
		}
	}
}
manitweaks_flavor_events = {
	trigger = {
		basic_is_valid_for_yearly_events_trigger = yes
		OR = {
			capital_province = { geographical_region = world_steppe_east }
			capital_province = { geographical_region = world_steppe_tarim }
			capital_province = { geographical_region = world_middle_east_persia }
			faith = faith:manichean
		}
		OR = { 
			culture = { has_cultural_tradition = tradition_religion_blending }
			faith = faith:tengri_pagan
			faith = faith:manichean
		}
	}
	
	weight_multiplier = {
		base = 1
	}
	
	random_events = {
		chance_to_happen = 60
		
		200 = manitweaks.002 # Han Manichean arrives
		200 = manitweaks.003 # Feast of the Bema
	}
}
