﻿DecisionCheatAddSomePopluationEffect = {
	if = {
		limit = {
			has_variable = PopluationCheaMarkCulture_mark_one_variable
			has_variable = PopluationCheaMarkReligion_mark_one_variable
		}
		every_scope_state = {
			limit = {
				has_decree = DecisionCheatDecree_MarkState
			}
			DC_AddPopluation_culture_religion = {
				pop_type = $pop_type$
				size = $size$
			}
		}
	}
	else_if = {
		limit = {
			has_variable = PopluationCheaMarkCulture_mark_one_variable
		}
		every_scope_state = {
			limit = {
				has_decree = DecisionCheatDecree_MarkState
			}
			DC_AddPopluation_culture = {
				pop_type = $pop_type$
				size = $size$
			}
		}
	}
	else_if = {
		limit = {
			has_variable = PopluationCheaMarkReligion_mark_one_variable
		}
		every_scope_state = {
			limit = {
				has_decree = DecisionCheatDecree_MarkState
			}
			DC_AddPopluation_culture_religion = {
				pop_type = $pop_type$
				size = $size$
			}
		}
	}
	else = {
		every_scope_state = {
			limit = {
				has_decree = DecisionCheatDecree_MarkState
			}
			create_pop = {
				culture = han
				pop_type = $pop_type$
				size = $size$
			}
		}
	}
}
DecisionCheatChangePopluationCultureEffect = {
	every_scope_state = {
		limit = {
			has_decree = DecisionCheatDecree_MarkState
		}
		every_scope_pop = { DC_ChangePop_culture = yes }
	}
}
DecisionCheatChangePopluationReligionEffect = {
	every_scope_state = {
		limit = {
			has_decree = DecisionCheatDecree_MarkState
		}
		every_scope_pop = { DC_ChangePop_religion = yes }
	}
}

#$pop_type$
#$size$
DC_AddPopluation_culture_religion = {
	DC_select_culture_two_arguments_effect = {
		effect = DC_AddPopluation_culture_religion_A_effect
		varA = pop_type
		valueA = $pop_type$
		varB = size
		valueB = $size$
	}
}
DC_AddPopluation_culture_religion_A_effect = {
	DC_select_religion_three_arguments_effect = {
		effect = DC_AddPopluation_culture_religion_B_effect
		varA = pop_type
		valueA = $pop_type$
		varB = size
		valueB = $size$
		varC = culture
		valueC = $culture$
	}
}
DC_AddPopluation_culture_religion_B_effect = {
	create_pop = {
		culture = $culture$
		religion = $religion$
		pop_type = $pop_type$
		size = $size$
	}
}

#$pop_type$
#$size$
DC_AddPopluation_culture = {
	DC_select_culture_two_arguments_effect = {
		effect = DC_AddPopluation_culture_effect
		varA = pop_type
		valueA = $pop_type$
		varB = size
		valueB = $size$
	}
}
DC_AddPopluation_culture_effect = {
	create_pop = {
		culture = $culture$
		pop_type = $pop_type$
		size = $size$
	}
}
#$pop_type$
#$size$
DC_AddPopluation_religion = {
	DC_select_religion_two_arguments_effect = {
		effect = DC_AddPopluation_religion_effect
		varA = pop_type
		valueA = $pop_type$
		varB = size
		valueB = $size$
	}
}
DC_AddPopluation_religion_effect = {
	create_pop = {
		religion = $religion$
		culture = han
		pop_type = $pop_type$
		size = $size$
	}
}
DC_ChangePop_culture = {
	DC_select_culture_no_arguments_effect = {
		effect = DC_ChangePop_culture_effect
	}
}
DC_ChangePop_culture_effect = {
	change_pop_culture = {
		target = cu:$culture$
		value = 1
	}
}
DC_ChangePop_religion = {
	DC_select_religion_no_arguments_effect = {
		effect = DC_ChangePop_religion_effect
	}
}
DC_ChangePop_religion_effect = {
	change_pop_religion = {
		target = rel:$religion$
		value = 1
	}
}
DC_add_primary_culture = {
	DC_select_culture_no_arguments_effect = {
		effect = DC_add_primary_culture_effect
	}
}
DC_add_primary_culture_effect = {
	add_primary_culture = cu:$culture$
}
DC_remove_primary_culture = {
	DC_select_culture_no_arguments_effect = {
		effect = DC_remove_primary_culture_effect
	}
}
DC_remove_primary_culture_effect = {
	remove_primary_culture = cu:$culture$
}
DC_set_country_religion = {
	DC_select_religion_no_arguments_effect = {
		effect = DC_set_country_religion_effect
	}
}
DC_set_country_religion_effect = {
	set_state_religion = rel:$religion$
}













DC_select_religion_no_arguments_effect = {
	if = {
		limit = {
			root = { has_variable = DC_MarkReligion_catholic }
		}
		$effect$ = {
			religion = catholic
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_protestant }
		}
		$effect$ = {
			religion = protestant
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_orthodox }
		}
		$effect$ = {
			religion = orthodox
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_oriental_orthodox }
		}
		$effect$ = {
			religion = oriental_orthodox
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_sunni }
		}
		$effect$ = {
			religion = sunni
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_shiite }
		}
		$effect$ = {
			religion = shiite
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_jewish }
		}
		$effect$ = {
			religion = jewish
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_mahayana }
		}
		$effect$ = {
			religion = mahayana
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_gelugpa }
		}
		$effect$ = {
			religion = gelugpa
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_theravada }
		}
		$effect$ = {
			religion = theravada
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_confucian }
		}
		$effect$ = {
			religion = confucian
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_hindu }
		}
		$effect$ = {
			religion = hindu
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_shinto }
		}
		$effect$ = {
			religion = shinto
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_sikh }
		}
		$effect$ = {
			religion = sikh
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_animist }
		}
		$effect$ = {
			religion = animist
		}
	}
	else = {
		limit = {
			root = { has_variable = DC_MarkReligion_atheist }
		}
		$effect$ = {
			religion = atheist
		}
	}
}
DC_select_religion_two_arguments_effect = {
	if = {
		limit = {
			root = { has_variable = DC_MarkReligion_catholic }
		}
		$effect$ = {
			religion = catholic
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_protestant }
		}
		$effect$ = {
			religion = protestant
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_orthodox }
		}
		$effect$ = {
			religion = orthodox
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_oriental_orthodox }
		}
		$effect$ = {
			religion = oriental_orthodox
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_sunni }
		}
		$effect$ = {
			religion = sunni
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_shiite }
		}
		$effect$ = {
			religion = shiite
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_jewish }
		}
		$effect$ = {
			religion = jewish
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_mahayana }
		}
		$effect$ = {
			religion = mahayana
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_gelugpa }
		}
		$effect$ = {
			religion = gelugpa
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_theravada }
		}
		$effect$ = {
			religion = theravada
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_confucian }
		}
		$effect$ = {
			religion = confucian
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_hindu }
		}
		$effect$ = {
			religion = hindu
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_shinto }
		}
		$effect$ = {
			religion = shinto
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_sikh }
		}
		$effect$ = {
			religion = sikh
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_animist }
		}
		$effect$ = {
			religion = animist
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
	else = {
		limit = {
			root = { has_variable = DC_MarkReligion_atheist }
		}
		$effect$ = {
			religion = atheist
			$varA$ = $valueA$
			$varB$ = $valueB$
		}
	}
}
DC_select_religion_three_arguments_effect = {
	if = {
		limit = {
			root = { has_variable = DC_MarkReligion_catholic }
		}
		$effect$ = {
			religion = catholic
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_protestant }
		}
		$effect$ = {
			religion = protestant
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_orthodox }
		}
		$effect$ = {
			religion = orthodox
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_oriental_orthodox }
		}
		$effect$ = {
			religion = oriental_orthodox
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_sunni }
		}
		$effect$ = {
			religion = sunni
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_shiite }
		}
		$effect$ = {
			religion = shiite
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_jewish }
		}
		$effect$ = {
			religion = jewish
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_mahayana }
		}
		$effect$ = {
			religion = mahayana
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_gelugpa }
		}
		$effect$ = {
			religion = gelugpa
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_theravada }
		}
		$effect$ = {
			religion = theravada
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_confucian }
		}
		$effect$ = {
			religion = confucian
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_hindu }
		}
		$effect$ = {
			religion = hindu
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_shinto }
		}
		$effect$ = {
			religion = shinto
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_sikh }
		}
		$effect$ = {
			religion = sikh
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else_if = {
		limit = {
			root = { has_variable = DC_MarkReligion_animist }
		}
		$effect$ = {
			religion = animist
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
	else = {
		limit = {
			root = { has_variable = DC_MarkReligion_atheist }
		}
		$effect$ = {
			religion = atheist
			$varA$ = $valueA$
			$varB$ = $valueB$
			$varC$ = $valueC$
		}
	}
}





































