amazon_county_conquest = {
	name = CB_NAME_COUNTY_CONQUEST
	war_name = WAR_NAME_COUNTY_CONQUEST
	sprite = 16
	truce_days = 1825
	hostile_against_others = yes
	is_permanent = yes
	check_all_titles = yes # if permanent, setting this to true will check against all of someones titles, including vassal held titles
	press_claim = yes
	can_ask_to_join_war = no
	
	allow_distant = no
	
	can_use = {
		ROOT = {
			religion_group = amazon
			NOT = { same_realm = FROM }
		}
		FROM = {
			NOT = { religion = ROOT }
		}
	}

	can_use_title = {
		tier = count
		OR = {
			FROM = {
				has_landed_title = PREV
			}
			holder_scope = {
				is_liege_or_above = FROM
				NOT = { same_realm = ROOT }
			}
		}

		NOT = {
			OR = {
				ROOT = {
					has_landed_title = PREV
				}
				holder_scope = {
					is_liege_or_above = ROOT
				}
			}
		}
		
		location = {
			any_neighbor_province = {
				owner = {
					OR = {
						character = ROOT
						is_liege_or_above = ROOT
					}
				}
				
			}
		}
	}

	is_valid_title = {
		ROOT = {
			religion_group = amazon
			NOT = { same_realm = FROM }
		}
		FROM = {
			NOT = { religion = ROOT }
		}
	
		OR = {
			FROM = {
				has_landed_title = PREV
			}
			holder_scope = {
				is_liege_or_above = FROM
			}
		}
	}

	on_success_title = {
		usurp_title_plus_barony_if_unlanded = ROOT
		
		any_de_jure_vassal_title = { # take all baronies too
			limit = {
				has_holder = yes
				holder_scope = {
					OR = {
						character = FROM
						is_liege_or_above = FROM
						AND = {
							is_liege_or_above = ROOT
							NOT = { culture = ROOT }
							NOT = { religion = ROOT }
						}
					}
				}
			}

			usurp_title = ROOT
		}
		
		any_attacker = {
			limit = { character = ROOT }
			participation_scaled_prestige = 50
			participation_scaled_piety = 100
		}
		any_attacker = {
			limit = { NOT = { character = ROOT } }
			hidden_tooltip = { 
				participation_scaled_prestige = 50 
				participation_scaled_piety = 100
			}
		}
		
		ROOT = {
			religion_authority = {
				modifier = won_county_conquest
			}
		}
	}

	on_fail_title = {
		ROOT = {
			piety = -100
			religion_authority = {
				modifier = lost_county_conquest
			}
		}
		any_defender = {
			limit = { character = FROM }
			participation_scaled_piety = 50
		}
		any_defender = {
			limit = { NOT = { character = FROM } }
			hidden_tooltip = { participation_scaled_piety = 50 }
		}
	}

	on_reverse_demand = {
		ROOT = {
			piety = -200
			transfer_scaled_wealth = {
				to = FROM
				value = 4.0
			}
			religion_authority = {
				modifier = lost_county_conquest
			}
		}
		any_defender = {
			limit = { character = FROM }
			participation_scaled_prestige = 50
			participation_scaled_piety = 100
		}
		any_defender = {
			limit = { NOT = { character = FROM } }
			hidden_tooltip = {
				participation_scaled_prestige = 50 
				participation_scaled_piety = 100
			}
		}
	}

	attacker_ai_victory_worth = {
		factor = -1 # always accept
	}
	
	attacker_ai_defeat_worth = {
		factor = 100
	}

	defender_ai_victory_worth = {
		factor = -1 # always accept
	}
	
	defender_ai_defeat_worth = {
		factor = 100
	}
}