# addition to seize_trade_post cb - non-overlapping cases
cb_seize_trade_post_non_councillor = {
	name = CB_NAME_SEIZE_TRADE_POST
	war_name = WAR_NAME_SEIZE_TRADE_POST
	sprite = 18
	truce_days = 1825
	att_ticking_war_score_multiplier = 5.0
	def_ticking_war_score_multiplier = 5.0
	sort_priority = 1900

	is_permanent = yes
	check_all_trade_posts = yes
	can_ask_to_join_war = no
	allow_distant = yes
	allowed_to_target_tributaries = no

	can_use_gui = {
		check_if_crusader_trigger = yes
	}

	can_use = {
		# Attacker
		ROOT = {
			is_patrician = yes

			NOR = {
				is_vassal_or_below_of = FROM # Can't attack liege
				is_liege_or_above_of = FROM # and vassals
			}

			trigger_if = {
				limit = { same_realm = FROM }

				# target not on council
				FROM = { is_voter = no }

				# capture cases that can't use seize_trade_post, targetting weaker Patricians not on council
				num_of_trade_post_diff = {
					character = FROM
					value >= 3
				}
			}
		}
	}

	can_use_title = {
		real_tier = COUNT
		has_trade_post = yes

		location = {
			is_coastal = yes
		}

		trade_post_owner = {
			OR = {
				character = FROM
				is_vassal_or_below_of = FROM
			}
		}

		NOT = { holder = FROM }
	}

	is_valid = {
		# Attacker
		ROOT = {
			is_patrician = yes

			NOR = {
				is_vassal_or_below_of = FROM # Can't attack liege
				is_liege_or_above_of = FROM # and vassals
			}
		}
	}

	is_valid_title = {
		has_trade_post = yes

		trade_post_owner = {
			OR = {
				character = FROM
				is_vassal_or_below_of = FROM
			}
		}

		NOT = { holder = FROM }
	}

	on_add = {
		fire_haruspicy_event_effect = yes
#		anger_china_effect = yes
		if = {
			limit = { defender = { is_offmap_governor = offmap_china } }
			attacker = {  
				sound_effect = china_angered_emperor
				detract_grace_super_huge_effect = yes 
			}
		}
	}

	on_success_title = {
		seize_trade_post = attacker

		attacker = {
			show_scope_change = no

			participation_scaled_prestige = 50
		}

		any_attacker = {
			limit = { NOT = { character = attacker } }
			hidden_effect = { participation_scaled_prestige = 50 }
		}
	}

	on_fail = {
		attacker = {
			show_scope_change = no

			prestige = -50
		}

		defender = {
			show_scope_change = no

			participation_scaled_prestige = 25
		}

		any_defender = {
			limit = { NOT = { character = defender } }
			hidden_effect = { participation_scaled_prestige = 25 }
		}
	}

	on_reverse_demand = {
		attacker = {
			show_scope_change = no

			prestige = -100

			transfer_scaled_wealth = {
				to = defender
				value = 2.0
			}
		}

		defender = {
			show_scope_change = no

			participation_scaled_prestige = 50
		}

		any_defender = {
			limit = { NOT = { character = defender } }
			hidden_effect = { participation_scaled_prestige = 50 }
		}
	}

	attacker_ai_victory_worth = {
		factor = -1 # always accept
	}

	attacker_ai_defeat_worth = {
		factor = 25
	}

	defender_ai_victory_worth = {
		factor = -1 # always accept
	}

	defender_ai_defeat_worth = {
		factor = 25
	}

	ai_will_do = {
		factor = 1

		coronation_factor = yes

		mult_modifier = {
			factor = 0.25

			attacker = {
				NOT = { same_realm = defender }
			}
		}
	}
}
