﻿#EK NOTE: Included our own faction modifiers

#####################################################################
# EFFECT LIST
#####################################################################

# add_random_county_corruption_modifier_effect - Adds a random CC modifier the County does not already have
# remove_random_county_corruption_modifier_effect - Removes a random CC the County has

#####################################################################
# EFFECTS
#####################################################################


add_inefficient_tax_collection_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					triggered_desc = {
						trigger = { exists = scope:low_control }
						desc = gain_county_corruption.message.low_control
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_inefficient_tax_collection_modifier
					years = 10
				}
			}
		}
	}
}

add_deserting_levies_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					triggered_desc = {
						trigger = { exists = scope:low_control }
						desc = gain_county_corruption.message.low_control
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_deserting_levies_modifier
					years = 10
				}
			}
		}
	}
}

add_smuggling_ring_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					triggered_desc = {
						trigger = { exists = scope:low_control }
						desc = gain_county_corruption.message.low_control
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_smuggling_ring_modifier
					years = 10
				}
			}
		}
	}
}

add_bandits_rampant_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					triggered_desc = {
						trigger = { exists = scope:low_control }
						desc = gain_county_corruption.message.low_control
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_bandits_rampant_modifier
					years = 10
				}
			}
		}
	}
}

add_inefficient_census_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					triggered_desc = {
						trigger = { exists = scope:low_control }
						desc = gain_county_corruption.message.low_control
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_inefficient_census_modifier
					years = 10
				}
			}
		}
	}
}

add_lack_of_sheriffs_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					triggered_desc = {
						trigger = { exists = scope:low_control }
						desc = gain_county_corruption.message.low_control
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_lack_of_sheriffs_modifier
					years = 10
				}
			}
		}
	}
}

add_lack_of_courts_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					triggered_desc = {
						trigger = { exists = scope:low_control }
						desc = gain_county_corruption.message.low_control
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_lack_of_courts_modifier
					years = 10
				}
			}
		}
	}
}

add_thieves_guild_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					triggered_desc = {
						trigger = { exists = scope:low_control }
						desc = gain_county_corruption.message.low_control
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_thieves_guild_modifier
					years = 10
				}
			}
		}
	}
}

add_unsafe_highways_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					triggered_desc = {
						trigger = { exists = scope:low_control }
						desc = gain_county_corruption.message.low_control
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_unsafe_highways_modifier
					years = 10
				}
			}
		}
	}
}

add_uncooperative_guilds_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					triggered_desc = {
						trigger = { exists = scope:low_control }
						desc = gain_county_corruption.message.low_control
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_uncooperative_guilds_modifier
					years = 10
				}
			}
		}
	}
}

add_lackluster_administration_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_lackluster_administration_modifier
					years = 10
				}
			}
		}
	}
}

add_roaming_bandits_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_roaming_bandits_modifier
					years = 10
				}
			}
		}
	}
}

add_wild_beast_attacks_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_wild_beast_attacks_modifier
					years = 10
				}
			}
		}
	}
}

add_upset_shepherds_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_upset_shepherds_modifier
					years = 10
				}
			}
		}
	}
}

add_rogue_warriors_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_rogue_warriors_modifier
					years = 10
				}
			}
		}
	}
}

add_unruly_nomads_modifier_effect = {
	save_scope_as = county
	holder = {
		send_interface_message = {
			type = msg_county_corruption_bad
			title = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:deficit }
						desc = gain_county_corruption.message.deficit
					}
					desc = gain_county_corruption.message.county_corruption
				}
			}
			left_icon = scope:county
			scope:county = {
				add_county_modifier = {
					modifier = county_corruption_unruly_nomads_modifier
					years = 10
				}
			}
		}
	}
}


#Use this for random addition of County Corruption, APART from Low Control
add_random_county_corruption_modifier_effect = {
	random_list = {
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_inefficient_tax_collection_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_inefficient_tax_collection_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_deserting_levies_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_deserting_levies_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_smuggling_ring_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_smuggling_ring_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_bandits_rampant_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_bandits_rampant_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_inefficient_census_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_inefficient_census_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_lack_of_sheriffs_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_lack_of_sheriffs_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_lack_of_courts_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_lack_of_courts_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_thieves_guild_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_thieves_guild_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_unsafe_highways_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_unsafe_highways_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_uncooperative_guilds_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_uncooperative_guilds_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_lackluster_administration_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_lackluster_administration_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_roaming_bandits_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_roaming_bandits_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_wild_beast_attacks_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_wild_beast_attacks_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_upset_shepherds_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_upset_shepherds_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_rogue_warriors_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_rogue_warriors_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_unruly_nomads_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_unruly_nomads_modifier_effect = yes
		}
	}
}


#Notification includes reference about Low Control
add_random_county_corruption_low_control_effect = {
	random_list = {
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_inefficient_tax_collection_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = low_control
				value = yes
			}
			add_inefficient_tax_collection_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_deserting_levies_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = low_control
				value = yes
			}
			add_deserting_levies_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_smuggling_ring_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = low_control
				value = yes
			}
			add_smuggling_ring_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_bandits_rampant_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = low_control
				value = yes
			}
			add_bandits_rampant_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_inefficient_census_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = low_control
				value = yes
			}
			add_inefficient_census_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_lack_of_sheriffs_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = low_control
				value = yes
			}
			add_lack_of_sheriffs_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_lack_of_courts_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = low_control
				value = yes
			}
			add_lack_of_sheriffs_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_thieves_guild_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = low_control
				value = yes
			}
			add_thieves_guild_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_unsafe_highways_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = low_control
				value = yes
			}
			add_unsafe_highways_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_uncooperative_guilds_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = low_control
				value = yes
			}
			add_uncooperative_guilds_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_roaming_bandits_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_roaming_bandits_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_wild_beast_attacks_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_wild_beast_attacks_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_upset_shepherds_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_upset_shepherds_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_rogue_warriors_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_rogue_warriors_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_unruly_nomads_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			add_unruly_nomads_modifier_effect = yes
		}
		#EK ADDITION: added our own modifier
		# Misc
		100 = {
			trigger = {
				NOT = { has_county_modifier = county_corruption_skeever_infested_modifier }
			}
			save_scope_value_as = {
				name = low_control
				value = yes
			}
			add_skeever_infested_modifier_effect = yes
		}
		# Crimeboss
		200 = {
			trigger = {
				holder = { has_perk = sense_opportunity_perk }
			}
			compare_modifier = {
				target = holder
				value = intrigue
				multiplier = 10
			}
			ek_add_crimeboss_modifier_effect = yes
		}		
		# Crisis 
		100 = {
			trigger = { ek_county_can_have_additional_crisis_modifier = yes } 
			ek_low_control_crisis_modifier_roll_chance = yes
			save_scope_value_as = {
				name = low_control
				value = yes
			}
			ek_add_crisis_modifier_effect = yes		
		}
		#EK ADDITION END
	}
}


#Notification includes reference about Debt
add_random_county_corruption_in_debt_effect = {
	random_list = {
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_inefficient_tax_collection_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_inefficient_tax_collection_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_deserting_levies_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_deserting_levies_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_smuggling_ring_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_smuggling_ring_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_bandits_rampant_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_bandits_rampant_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_inefficient_census_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_inefficient_census_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_lack_of_sheriffs_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_lack_of_sheriffs_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_lack_of_courts_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_lack_of_sheriffs_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_thieves_guild_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_thieves_guild_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_unsafe_highways_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_unsafe_highways_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_uncooperative_guilds_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_uncooperative_guilds_modifier_effect = yes
		}
		500 = {
			trigger = {
				NOR = {
					has_county_modifier = county_corruption_lackluster_administration_modifier
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_lackluster_administration_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_roaming_bandits_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_roaming_bandits_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_wild_beast_attacks_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_wild_beast_attacks_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_upset_shepherds_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_upset_shepherds_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_rogue_warriors_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_rogue_warriors_modifier_effect = yes
		}
		100 = {
			trigger = {
				NOT = {
					has_county_modifier = county_corruption_unruly_nomads_modifier
				}
				OR = {
					title_province = { has_holding_type = nomad_holding }
					title_province = { has_holding_type = herder_holding }
				}
				is_landless_type_title = no
			}
			save_scope_value_as = {
				name = deficit
				value = yes
			}
			add_unruly_nomads_modifier_effect = yes
		}
	}
}

#############
# Removal of County Corruption
#############

remove_inefficient_tax_collection_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_inefficient_tax_collection_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_inefficient_tax_collection_modifier
			}
		}
	}
}

remove_deserting_levies_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_deserting_levies_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_deserting_levies_modifier
			}
		}
	}
}

remove_smuggling_ring_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_smuggling_ring_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_smuggling_ring_modifier
			}
		}
	}
}

remove_bandits_rampant_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_bandits_rampant_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_bandits_rampant_modifier
			}
		}
	}
}

remove_inefficient_census_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_inefficient_census_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_inefficient_census_modifier
			}
		}
	}
}

remove_lack_of_sheriffs_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_lack_of_sheriffs_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_lack_of_sheriffs_modifier
			}
		}
	}
}

remove_lack_of_courts_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_lack_of_courts_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_lack_of_courts_modifier
			}
		}
	}
}

remove_thieves_guild_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_thieves_guild_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_thieves_guild_modifier
			}
		}
	}
}

remove_unsafe_highways_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_unsafe_highways_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_unsafe_highways_modifier
			}
		}
	}
}

remove_uncooperative_guilds_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_uncooperative_guilds_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_uncooperative_guilds_modifier
			}
		}
	}
}

remove_lackluster_administration_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_lackluster_administration_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_lackluster_administration_modifier
			}
		}
	}
}

remove_roaming_bandits_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_roaming_bandits_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_roaming_bandits_modifier
			}
		}
	}
}

remove_wild_beast_attacks_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_wild_beast_attacks_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_wild_beast_attacks_modifier
			}
		}
	}
}

remove_upset_shepherds_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_upset_shepherds_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_upset_shepherds_modifier
			}
		}
	}
}

remove_rogue_warriors_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_rogue_warriors_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_rogue_warriors_modifier
			}
		}
	}
}

remove_unruly_nomads_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = county_corruption_unruly_nomads_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = county_corruption_unruly_nomads_modifier
			}
		}
	}
}

remove_small_investment_in_revolt_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = small_investment_in_revolt_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = small_investment_in_revolt_modifier
			}
		}
	}
}

remove_medium_investment_in_revolt_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = medium_investment_in_revolt_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = medium_investment_in_revolt_modifier
			}
		}
	}
}

remove_high_investment_in_revolt_modifier_effect = {
	save_scope_as = county
	holder = {
		if = {
			limit = {
				exists = scope:marshal_removal
			}
			send_interface_message = {
				type = msg_county_corruption_good_increase_control
				title = remove_county_corruption.message.marshal_removal
				left_icon = scope:county
				right_icon = scope:councillor

				scope:county = {
					remove_county_modifier = high_investment_in_revolt_modifier
				}
			}
		}
		else = {
			scope:county = {
				remove_county_modifier = high_investment_in_revolt_modifier
			}
		}
	}
}
 
remove_random_county_corruption_modifier_effect = {
	random_list = {
		100 = {
			trigger = {
				has_county_modifier = county_corruption_inefficient_tax_collection_modifier
			}
			remove_inefficient_tax_collection_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_deserting_levies_modifier
			}
			remove_deserting_levies_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_smuggling_ring_modifier
			}
			remove_smuggling_ring_modifier_effect = yes
		}
		100 = { # EK EDIT: crisis factions
			trigger = {
				ek_county_has_crisis_faction_modifier = yes
			}	
			ek_county_remove_single_crisis_faction_modifier = yes			
		}
		### EK EDIT: Skeever infection modifier
		100 = {
			trigger = {
				has_county_modifier = county_corruption_bandits_rampant_modifier
			}
			remove_bandits_rampant_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_skeever_infested_modifier
			}
			remove_skeever_infested_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_inefficient_census_modifier
			}
			remove_inefficient_census_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_lack_of_sheriffs_modifier
			}
			remove_lack_of_sheriffs_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_lack_of_courts_modifier
			}
			remove_lack_of_courts_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_thieves_guild_modifier
			}
			remove_thieves_guild_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_unsafe_highways_modifier
			}
			remove_unsafe_highways_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_uncooperative_guilds_modifier
			}
			remove_uncooperative_guilds_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_lackluster_administration_modifier
			}
			remove_lackluster_administration_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_roaming_bandits_modifier
			}
			remove_roaming_bandits_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_wild_beast_attacks_modifier
			}
			remove_wild_beast_attacks_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_upset_shepherds_modifier
			}
			remove_upset_shepherds_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_rogue_warriors_modifier
			}
			remove_rogue_warriors_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_unruly_nomads_modifier
			}
			remove_unruly_nomads_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = small_investment_in_revolt_modifier
			}
			remove_small_investment_in_revolt_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = medium_investment_in_revolt_modifier
			}
			remove_medium_investment_in_revolt_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = high_investment_in_revolt_modifier
			}
			remove_high_investment_in_revolt_modifier_effect = yes
		}
	}
}

remove_every_county_corruption_modifier_effect = {
	if = {
		limit = {
			has_county_modifier = county_corruption_inefficient_tax_collection_modifier
		}
		remove_inefficient_tax_collection_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_deserting_levies_modifier
		}
		remove_deserting_levies_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_smuggling_ring_modifier
		}
		remove_smuggling_ring_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_bandits_rampant_modifier
		}
		remove_bandits_rampant_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_inefficient_census_modifier
		}
		remove_inefficient_census_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_lack_of_sheriffs_modifier
		}
		remove_lack_of_sheriffs_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_lack_of_courts_modifier
		}
		remove_lack_of_courts_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_thieves_guild_modifier
		}
		remove_thieves_guild_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_unsafe_highways_modifier
		}
		remove_unsafe_highways_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_uncooperative_guilds_modifier
		}
		remove_uncooperative_guilds_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_lackluster_administration_modifier
		}
		remove_lackluster_administration_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_roaming_bandits_modifier
		}
		remove_roaming_bandits_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_wild_beast_attacks_modifier
		}
		remove_wild_beast_attacks_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_upset_shepherds_modifier
		}
		remove_upset_shepherds_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_rogue_warriors_modifier
		}
		remove_rogue_warriors_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = county_corruption_unruly_nomads_modifier
		}
		remove_unruly_nomads_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = small_investment_in_revolt_modifier
		}
		remove_small_investment_in_revolt_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = medium_investment_in_revolt_modifier
		}
		remove_medium_investment_in_revolt_modifier_effect = yes
	}
	if = {
		limit = {
			has_county_modifier = high_investment_in_revolt_modifier
		}
		remove_high_investment_in_revolt_modifier_effect = yes
	}
}

marshal_remove_random_county_corruption_modifier_effect = {
	random_list = {
		100 = {
			trigger = {
				has_county_modifier = county_corruption_inefficient_tax_collection_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_inefficient_tax_collection_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_deserting_levies_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_deserting_levies_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_smuggling_ring_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_smuggling_ring_modifier_effect = yes
		}
		100 = {
			trigger = {
				ek_county_has_crisis_faction_modifier = yes
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}			
			ek_county_remove_single_crisis_faction_modifier = yes			
		}
		### EK EDIT: Skeever infection modifier
		100 = {
			trigger = {
				has_county_modifier = county_corruption_skeever_infested_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			if = { 
				limit = { has_county_modifier = county_corruption_skeever_infested_modifier } 
				remove_skeever_infested_modifier_effect = yes
			}
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_inefficient_census_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_inefficient_census_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_lack_of_sheriffs_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_lack_of_sheriffs_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_lack_of_courts_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_lack_of_courts_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_thieves_guild_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_thieves_guild_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_unsafe_highways_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_unsafe_highways_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_uncooperative_guilds_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_uncooperative_guilds_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_lackluster_administration_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_lackluster_administration_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_roaming_bandits_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_roaming_bandits_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_wild_beast_attacks_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_wild_beast_attacks_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_upset_shepherds_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_upset_shepherds_modifier_effect = yes
		}
		### EK EDIT: Skeever infection modifier
		100 = {
			trigger = {
				has_county_modifier = county_corruption_skeever_infested_modifier
			}
			if = {
				limit = {
					scope:councillor = holder.cp:councillor_marshal
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			if = { 
				limit = { has_county_modifier = county_corruption_skeever_infested_modifier } 
				remove_skeever_infested_modifier_effect = yes
			}
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_rogue_warriors_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_rogue_warriors_modifier_effect = yes
		}
		100 = {
			trigger = {
				has_county_modifier = county_corruption_unruly_nomads_modifier
			}
			if = {
				limit = {
					scope:councillor = {
						OR = {
							scope:county.holder.cp:councillor_marshal ?= this
							is_kurultai_trigger = yes
						}
					}
				}
				save_scope_value_as = {
					name = marshal_removal
					value = yes
				}
			}
			hidden_effect = {
				set_variable = {
					name = county_corruption_recent_removal
					years = 3
				}
			}
			remove_unruly_nomads_modifier_effect = yes
		}
	}
}
