﻿aureliani_senate_negotiate_party_1 = {
	scope = character
	is_shown = { aureliani_senate_visible_trigger = yes }
	is_valid = {
		custom_description = { text = aureliani_senate_req_ruler_ready aureliani_senate_visible_trigger = yes }
		custom_description = { text = aureliani_senate_req_alive is_alive = yes }
		custom_description = { text = aureliani_senate_req_capable_adult is_capable_adult = yes }
		custom_description = { text = aureliani_senate_req_not_imprisoned is_imprisoned = no }
		custom_description = { text = aureliani_senate_req_peaceful is_at_war = no }
		trigger_if = {
			limit = { OR = { has_title = title:h_roman_empire house = { var:aureliani_senate_stage = 2 } } }
			custom_description = { text = aureliani_senate_req_roman_independence aureliani_roman_sovereignty_trigger = yes }
		}
		custom_description = { text = aureliani_senate_req_adult_available is_available_adult = yes }
		house = {
			custom_description = { text = aureliani_senate_req_proposal_pending has_variable = aureliani_senate_proposal }
			custom_description = { text = aureliani_senate_req_deliberation_active has_variable = aureliani_senate_deliberating }
			custom_description = { text = aureliani_senate_req_bargain_unused_civic NOT = { has_variable = aureliani_senate_party_1_bargain_spent } }
			custom_description = {
				text = aureliani_senate_req_party_leader_civic
				exists = var:aureliani_senate_party_1_leader
				house:house_aureliani.var:aureliani_senate_party_1_leader = { aureliani_senator_eligible_trigger = yes is_at_war = no var:aureliani_senator_faction = 1 }
			}
		}
	}
	effect = {
		custom_tooltip = aureliani_senate_req_action_negotiate
		hidden_effect = { aureliani_senate_politics_open_hearing_effect = { PARTY = 1 } }
	}
}

aureliani_senate_negotiate_party_2 = {
	scope = character
	is_shown = { aureliani_senate_visible_trigger = yes }
	is_valid = {
		custom_description = { text = aureliani_senate_req_ruler_ready aureliani_senate_visible_trigger = yes }
		custom_description = { text = aureliani_senate_req_alive is_alive = yes }
		custom_description = { text = aureliani_senate_req_capable_adult is_capable_adult = yes }
		custom_description = { text = aureliani_senate_req_not_imprisoned is_imprisoned = no }
		custom_description = { text = aureliani_senate_req_peaceful is_at_war = no }
		trigger_if = {
			limit = { OR = { has_title = title:h_roman_empire house = { var:aureliani_senate_stage = 2 } } }
			custom_description = { text = aureliani_senate_req_roman_independence aureliani_roman_sovereignty_trigger = yes }
		}
		custom_description = { text = aureliani_senate_req_adult_available is_available_adult = yes }
		house = {
			custom_description = { text = aureliani_senate_req_proposal_pending has_variable = aureliani_senate_proposal }
			custom_description = { text = aureliani_senate_req_deliberation_active has_variable = aureliani_senate_deliberating }
			custom_description = { text = aureliani_senate_req_bargain_unused_military NOT = { has_variable = aureliani_senate_party_2_bargain_spent } }
			custom_description = {
				text = aureliani_senate_req_party_leader_military
				exists = var:aureliani_senate_party_2_leader
				house:house_aureliani.var:aureliani_senate_party_2_leader = { aureliani_senator_eligible_trigger = yes is_at_war = no var:aureliani_senator_faction = 2 }
			}
		}
	}
	effect = {
		custom_tooltip = aureliani_senate_req_action_negotiate
		hidden_effect = { aureliani_senate_politics_open_hearing_effect = { PARTY = 2 } }
	}
}

aureliani_senate_negotiate_party_3 = {
	scope = character
	is_shown = { aureliani_senate_visible_trigger = yes }
	is_valid = {
		custom_description = { text = aureliani_senate_req_ruler_ready aureliani_senate_visible_trigger = yes }
		custom_description = { text = aureliani_senate_req_alive is_alive = yes }
		custom_description = { text = aureliani_senate_req_capable_adult is_capable_adult = yes }
		custom_description = { text = aureliani_senate_req_not_imprisoned is_imprisoned = no }
		custom_description = { text = aureliani_senate_req_peaceful is_at_war = no }
		trigger_if = {
			limit = { OR = { has_title = title:h_roman_empire house = { var:aureliani_senate_stage = 2 } } }
			custom_description = { text = aureliani_senate_req_roman_independence aureliani_roman_sovereignty_trigger = yes }
		}
		custom_description = { text = aureliani_senate_req_adult_available is_available_adult = yes }
		house = {
			custom_description = { text = aureliani_senate_req_proposal_pending has_variable = aureliani_senate_proposal }
			custom_description = { text = aureliani_senate_req_deliberation_active has_variable = aureliani_senate_deliberating }
			custom_description = { text = aureliani_senate_req_bargain_unused_sacred NOT = { has_variable = aureliani_senate_party_3_bargain_spent } }
			custom_description = {
				text = aureliani_senate_req_party_leader_sacred
				exists = var:aureliani_senate_party_3_leader
				house:house_aureliani.var:aureliani_senate_party_3_leader = { aureliani_senator_eligible_trigger = yes is_at_war = no var:aureliani_senator_faction = 3 }
			}
		}
	}
	effect = {
		custom_tooltip = aureliani_senate_req_action_negotiate
		hidden_effect = { aureliani_senate_politics_open_hearing_effect = { PARTY = 3 } }
	}
}

aureliani_senate_negotiate_party_4 = {
	scope = character
	is_shown = { aureliani_senate_visible_trigger = yes }
	is_valid = {
		custom_description = { text = aureliani_senate_req_ruler_ready aureliani_senate_visible_trigger = yes }
		custom_description = { text = aureliani_senate_req_alive is_alive = yes }
		custom_description = { text = aureliani_senate_req_capable_adult is_capable_adult = yes }
		custom_description = { text = aureliani_senate_req_not_imprisoned is_imprisoned = no }
		custom_description = { text = aureliani_senate_req_peaceful is_at_war = no }
		trigger_if = {
			limit = { OR = { has_title = title:h_roman_empire house = { var:aureliani_senate_stage = 2 } } }
			custom_description = { text = aureliani_senate_req_roman_independence aureliani_roman_sovereignty_trigger = yes }
		}
		custom_description = { text = aureliani_senate_req_adult_available is_available_adult = yes }
		house = {
			custom_description = { text = aureliani_senate_req_proposal_pending has_variable = aureliani_senate_proposal }
			custom_description = { text = aureliani_senate_req_deliberation_active has_variable = aureliani_senate_deliberating }
			custom_description = { text = aureliani_senate_req_bargain_unused_court NOT = { has_variable = aureliani_senate_party_4_bargain_spent } }
			custom_description = {
				text = aureliani_senate_req_party_leader_court
				exists = var:aureliani_senate_party_4_leader
				house:house_aureliani.var:aureliani_senate_party_4_leader = { aureliani_senator_eligible_trigger = yes is_at_war = no var:aureliani_senator_faction = 4 }
			}
		}
	}
	effect = {
		custom_tooltip = aureliani_senate_req_action_negotiate
		hidden_effect = { aureliani_senate_politics_open_hearing_effect = { PARTY = 4 } }
	}
}

aureliani_senate_negotiate_party_5 = {
	scope = character
	is_shown = { aureliani_senate_visible_trigger = yes }
	is_valid = {
		custom_description = { text = aureliani_senate_req_ruler_ready aureliani_senate_visible_trigger = yes }
		custom_description = { text = aureliani_senate_req_alive is_alive = yes }
		custom_description = { text = aureliani_senate_req_capable_adult is_capable_adult = yes }
		custom_description = { text = aureliani_senate_req_not_imprisoned is_imprisoned = no }
		custom_description = { text = aureliani_senate_req_peaceful is_at_war = no }
		trigger_if = {
			limit = { OR = { has_title = title:h_roman_empire house = { var:aureliani_senate_stage = 2 } } }
			custom_description = { text = aureliani_senate_req_roman_independence aureliani_roman_sovereignty_trigger = yes }
		}
		custom_description = { text = aureliani_senate_req_adult_available is_available_adult = yes }
		house = {
			custom_description = { text = aureliani_senate_req_proposal_pending has_variable = aureliani_senate_proposal }
			custom_description = { text = aureliani_senate_req_deliberation_active has_variable = aureliani_senate_deliberating }
			custom_description = { text = aureliani_senate_req_bargain_unused_reform NOT = { has_variable = aureliani_senate_party_5_bargain_spent } }
			custom_description = {
				text = aureliani_senate_req_party_leader_reform
				exists = var:aureliani_senate_party_5_leader
				house:house_aureliani.var:aureliani_senate_party_5_leader = { aureliani_senator_eligible_trigger = yes is_at_war = no var:aureliani_senator_faction = 5 }
			}
		}
	}
	effect = {
		custom_tooltip = aureliani_senate_req_action_negotiate
		hidden_effect = { aureliani_senate_politics_open_hearing_effect = { PARTY = 5 } }
	}
}
