#my_casus_belli = {
#	potential = { ... }		# trigger to make some CBs invalid for certain types of countries; this = attacker (CB owner); default: { always = yes }
#	is_valid = { ... }		# trigger, evaluated daily to check if CB should be created or destroyed automatically, does not affect CBs granted via script;
#								# this = attacker (CB owner), from = defender (target country); default: { always = yes }
#	destroy_if = { ... }	# trigger, evaluated daily to destroy CBs that have been granted via script ahead of expiration date;
#								# this = attacker (CB owner), from = defender (target country); default: { always = no }
#}

cb_fe_punishment = {
	show_notification = yes
	potential = {
		is_country_type = fallen_empire
	}
	is_valid = {
		OR = {
			has_opinion_modifier = { who = from modifier = opinion_angered_fallen_machine_empire }
			has_opinion_modifier = { who = from modifier = opinion_refused_fallen_empire_demand }
			has_opinion_modifier = { who = from modifier = opinion_majorly_failed_fallen_empire_task }
		}
	}
	proxy_war_resources = {
		category = proxy_war
		cost = {
			influence = 100
		}
	}
	on_proxy_war_start = {
		pay_proxy_war_additional_resources = { VALUE = -25 }
	}
}
cb_ae_total_war = {
	show_notification = no
	potential = {
		OR = {
			is_country_type = awakened_fallen_empire
			has_country_flag = reached_eotc_situation_stage2
			has_country_flag = can_declare_total_war_to_eotc
		}
	}
	is_valid = {
		from = { is_country_type = default }
	}
	proxy_war_resources = {
		category = proxy_war
		cost = {
			influence = 200
		}
	}
	on_proxy_war_start = {
		pay_proxy_war_additional_resources = { VALUE = -50 }
	}
}

cb_ae_entertainment = {
	show_notification = no
	potential = {
		is_country_type = awakened_fallen_empire
		has_country_flag = fallen_empire_hive_war
	}
	is_valid = {
		from = { is_country_type = default }
	}
	proxy_war_resources = {
		category = proxy_war
		cost = {
			influence = 100
		}
	}
	on_proxy_war_start = {
		pay_proxy_war_additional_resources = { VALUE = -25 }
	}
}
