namespace = est_philosophy

#Philosophy 3, bonus while fighting mortals.
country_event = {
	id = est_philosophy.1
	hide_window = yes
	is_triggered_only = yes
	
	trigger = {	
		has_active_tradition = tr_est_philosophy_3	
	}
	
	immediate = {
		if = {
			limit = {
				any_war = {
					any_war_participant = {
						is_at_war_with = prevprev
						Not = {
							has_ethic = ethic_gestalt_consciousness
						}							
					}
				}							
			}
			if = {
				limit = {
					Not = {
						has_modifier = mod_est_philosophy_3
					}
				}
				add_modifier = {
					modifier = "mod_est_philosophy_3"
					days = -1
				}
			}	
		}			
		else = {
			if = {
				limit = {
					has_modifier = mod_est_philosophy_3
				}
				remove_modifier = "mod_est_philosophy_3"
			}
		}
	}
}

#Philosophy 3, bonus while fighting mortals (terminator and devouring swarm).
country_event = {
	id = est_philosophy.2
	hide_window = yes
	is_triggered_only = yes
	
	trigger = {	
		has_active_tradition = tr_est_philosophy_3_no_dip		
	}
	
	immediate = {
		if = {
			limit = {
				any_war = {
					any_war_participant = {
						is_at_war_with = prevprev
						Not = {
							has_ethic = ethic_gestalt_consciousness
						}							
					}
				}							
			}
			if = {
				limit = {
					Not = {
						has_modifier = mod_est_philosophy_3_no_dip
					}
				}
				add_modifier = {
					modifier = "mod_est_philosophy_3_no_dip"
					days = -1
				}
			}	
		}			
		else = {
			if = {
				limit = {
					has_modifier = mod_est_philosophy_3_no_dip
				}
				remove_modifier = "mod_est_philosophy_3_no_dip"
			}
		}
	}
}
