﻿z_easycheats_8_female_child = { 

	on_other_nation = no
	on_own_nation = yes
	
	sound = "event:/SFX/UI/Character/Unique/sfx_ui_character_reward"
	
	message = no	

	potential_trigger = {
		hidden:scope:target = {
			is_alive = yes
			NOT = { employer = { tag = REB } }
			NOT = { employer = { tag = BAR } }	
			employer = {
				is_ai = no
			}
			AND = {
				exists = spouse
				spouse = {
					is_alive = yes
				}
			}
		}		
	}

	allowed_trigger = {
		scope:target = {						
			is_alive = yes
			AND = {
				exists = spouse
				spouse = {
					is_alive = yes
				}
			}		
		}
	}	
	
	effect = {			
		scope:target = {	
			country = {
				random_owned_province = {
					limit = {
						is_capital = no
						total_population >= 1
					}
					save_scope_as = newborn_birthplace
				}
			}
			if = {
				limit = {
					is_male = yes
				}
				country = {
					create_character = {
						age = 0
						female = yes
						birth_province = scope:newborn_birthplace
						family = scope:target.family
						religion = scope:target.religion
						culture = scope:target.culture
						mother = scope:target.spouse
						father = scope:target
						save_scope_as = newborn
					}
				}
				scope:target.spouse = {		
				}
			}		
			if = {
				limit = {
					is_male = no
				}
				country = {
					create_character = {
						age = 0
						female = yes
						birth_province = scope:newborn_birthplace
						family = scope:target.family
						religion = scope:target.religion
						culture = scope:target.culture
						mother = scope:target
						father = scope:target.spouse
						save_scope_as = newborn
					}
				}
			}	
		}
	}
}	
