tr_est_greed_adopt = {
	modifier = {
		country_minerals_produces_mult = 0.10
	}
}

tr_est_greed_finish = {
	modifier = {
		country_energy_produces_mult = 0.10
		ascension_perks_add = 1
	}
}


tr_est_greed_1 = {
	custom_tooltip = tr_est_greed_1_desc

	on_enabled = {
		if = {
			limit = {
				has_country_resource = { 
					type = energy 
					amount < 500 
				}
			}
			#Nothing
		}
		else = {
			if = {
				limit = {
					has_country_resource = { 
						type = energy 
						amount < 6000 
					}
				}
				add_modifier = {
					modifier = mod_est_greed_1_1
					days = -1
				}
			}
			else = {
				if = {
					limit = {
						has_country_resource = { 
							type = energy 
							amount < 25000 
						}
					}
					add_modifier = {
						modifier = mod_est_greed_1_2
						days = -1
					}
				}	
				else = {
					if = {
						limit = {
							has_country_resource = { 
								type = energy 
								amount < 80000
							}
						}
						add_modifier = {
							modifier = mod_est_greed_1_3
							days = -1
						}
					}
					else = {
						add_modifier = {
							modifier = mod_est_greed_1_4
							days = -1
						}
					}
				}				
			}
		}
	}
	
	tradition_swap = {
		name = tr_est_greed_1_AI
		inherit_icon = yes
		inherit_name = yes
		trigger = { is_ai = yes }	
		modifier = {
			country_base_influence_produces_add = 1
		}
		weight = { factor = 1 }
	}
	ai_weight = {
		factor = 4000
	}

	ai_weight = { factor = 5000 }
}

tr_est_greed_2 = {
	custom_tooltip = tr_est_greed_2_desc

	possible = { has_tradition = tr_est_greed_1 }
	
	modifier = {
		country_trade_fee = -0.05
	}
		
	tradition_swap = {
		name = tr_est_greed_2_no_dip
		trigger = {
			OR = {
				has_civic = civic_fanatic_purifiers
				has_civic = civic_inwards_perfection
				has_civic = civic_hive_devouring_swarm
				has_civic = civic_machine_terminator
			}
		}	
		modifier = {
			country_starbase_influence_cost_mult = -0.15
		}
		weight = { factor = 1 }
	}
		
	tradition_swap = {
		name = tr_est_greed_2_AI
		inherit_icon = yes
		inherit_name = yes
		trigger = {
			NOR = {
				has_civic = civic_fanatic_purifiers
				has_civic = civic_inwards_perfection
				has_civic = civic_hive_devouring_swarm
				has_civic = civic_machine_terminator
			}
			is_ai = yes
		}	
		modifier = {
			country_trade_attractiveness = 0.05
			country_trade_fee = -0.05
		}
		weight = { factor = 1 }
	}

	ai_weight = { factor = 5000 }
}

tr_est_greed_3 = {	
	modifier = {
		planet_pops_consumer_goods_upkeep_mult = -0.10
		planet_pops_organics_food_upkeep_mult = -0.10
	}

	ai_weight = { factor = 5000 }
}

tr_est_greed_4 = {
	custom_tooltip = tr_est_greed_4_desc

	possible = {
		has_tradition = tr_est_greed_1
		has_tradition = tr_est_greed_3
	}

	ai_weight = { factor = 5000 }
}

tr_est_greed_5 = {
	custom_tooltip = tr_est_greed_5_desc

	possible = { has_tradition = tr_est_greed_4 }
		
	tradition_swap = {
		name = tr_est_greed_5_AI
		inherit_icon = yes
		inherit_name = yes
		trigger = { is_ai = yes }	
		modifier = {
			pop_happiness = 0.05			
		}
		weight = { factor = 1 }
	}

	ai_weight = { factor = 5000 }
}