﻿

superior_councillor_trigger = {
	trigger_if = {
		limit = { $COUNCILLOR$ = { has_council_position = councillor_chancellor } }	
		THIS.diplomacy > $COUNCILLOR$.diplomacy
	}
	trigger_else_if = {
		limit = { $COUNCILLOR$ = { has_council_position = councillor_steward } }	
		THIS.stewardship > $COUNCILLOR$.stewardship
	}
	trigger_else_if = {
		limit = { $COUNCILLOR$ = { has_council_position = councillor_marshal } }	
		THIS.martial > $COUNCILLOR$.martial
	}
	trigger_else_if = {
		limit = { $COUNCILLOR$ = { has_council_position = councillor_spymaster } }	
		THIS.intrigue > $COUNCILLOR$.intrigue
	}
	trigger_else_if = {
		limit = { $COUNCILLOR$ = { has_council_position = councillor_court_chaplain } }	
		THIS.learning > $COUNCILLOR$.learning
	}
	trigger_else = {
		always = no
	}
}
has_attribute_for_councillor_trigger = {
	save_temporary_scope_value_as = {
		name = operator
		value = flag:$OPERATOR$
	}
	OR = {
		AND = {
			scope:operator = flag:equals
			trigger_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_chancellor } }	
				THIS.diplomacy = $VALUE$
			}
			trigger_else_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_steward } }	
				THIS.stewardship = $VALUE$
			}
			trigger_else_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_marshal } }	
				THIS.martial = $VALUE$
			}
			trigger_else_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_spymaster } }	
				THIS.intrigue = $VALUE$
			}
			trigger_else_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_court_chaplain } }	
				THIS.learning = $VALUE$
			}
			trigger_else = {
				always = no
			}
		}
		AND = {
			scope:operator = flag:greater
			trigger_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_chancellor } }	
				THIS.diplomacy > $VALUE$
			}
			trigger_else_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_steward } }	
				THIS.stewardship > $VALUE$
			}
			trigger_else_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_marshal } }	
				THIS.martial > $VALUE$
			}
			trigger_else_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_spymaster } }	
				THIS.intrigue > $VALUE$
			}
			trigger_else_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_court_chaplain } }	
				THIS.learning > $VALUE$
			}
			trigger_else = {
				always = no
			}
		}
		AND = {
			scope:operator = flag:less
			trigger_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_chancellor } }	
				THIS.diplomacy < $VALUE$
			}
			trigger_else_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_steward } }	
				THIS.stewardship < $VALUE$
			}
			trigger_else_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_marshal } }	
				THIS.martial < $VALUE$
			}
			trigger_else_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_spymaster } }	
				THIS.intrigue < $VALUE$
			}
			trigger_else_if = {
				limit = { $COUNCILLOR$ = { has_council_position = councillor_court_chaplain } }	
				THIS.learning < $VALUE$
			}
			trigger_else = {
				always = no
			}
		}
	}
}



