##########################################################################
# Empire edicts
##########################################################################
#Ůף
country_edict = {
	name = "blessing_of_life_goddess"
	length = 0
	cost = { influence = 0 }
	modifier = {
	}
		
	potential = {
		NOT = { has_country_flag = f_blessing_of_life_goddess }
		has_modifier = m_blessing_of_life_goddess
		allow_harmonize = yes
	}
	
	allow = {
		unity > 5000
	}
	
	effect = {
		custom_tooltip = TP_GEN_LIFE_TREE_SEED
		hidden_effect = {
				set_timed_country_flag = { flag = f_blessing_of_life_goddess days = 3600 }
				add_life_tree_seed = yes
		}		
		add_unity = -5000
	}
	#aiӾͲ
	ai_weight = {
		weight = 1
		modifier = {
			factor = 0
			check_variable =  { which = "seed_num"  value > 0 }	
		}		
	}	
}

#鱣
country_edict = {
	name = "protect_tree_spirit"
	length = 0
	cost = { influence = 0 }
	modifier = {
	}
	
	potential = {
		NOT = { has_modifier = m_protect_tree_spirit_edict }
		OR = {
		  has_valid_civic = civic_harmonious_tree
			has_modifier = m_kala_gift
		}
	}
	
	allow = {
	}
	
	effect = {
		hidden_effect = {
			#Ҽ鱣
			if = {
					limit = { NOT = { has_modifier = m_protect_tree_spirit_edict } }
					add_modifier = { modifier =  "m_protect_tree_spirit_edict"  days = -1 } 
			}
			#ÿһǣĴ鱣
			country_event = { id = harmonious_planet.28 } 
		}
	}
	
	#ai
	ai_weight = {
		weight = 1		
	}	
}

#ȡ鱣
country_edict = {
	name = "cancel_protect_tree_spirit"
	length = 0
	cost = { influence = 0 }
	modifier = {
	}
	
	potential = {
		has_modifier = m_protect_tree_spirit_edict
		OR = {
		  has_valid_civic = civic_harmonious_tree
			has_modifier = m_kala_gift
		}
	}
	
	allow = {
	}
	
	effect = {
		hidden_effect = {
			#Ƴ鱣
			remove_modifier = m_protect_tree_spirit_edict
			#ÿһǣƳ鱣
			every_owned_planet = {
					limit = {
							 has_modifier = m_protect_tree_spirit
					}
					remove_modifier = m_protect_tree_spirit					
			}	
		}
	}
	
	#aiӲ
	ai_weight = {
		weight = 0		
	}	
}