﻿namespace = rk_small_council

# The Red Keep Small Council Events
############################################################################################################################################################
	
rk_small_council.0001 = { #Great Lords Witholding Taxes
	type = character_event
	title = rk_small_council.0001.t
	desc = rk_small_council.0001.desc
	theme = rk_red_keep
	override_background = {
		reference = agot_iron_throne
	}
	right_portrait = {
		character = cp:councillor_steward
		animation = throne_room_conversation_2	
	}
	left_portrait = {
		character = cp:councillor_castellan
		animation = debating	
	}
	lower_left_portrait = {
		character = cp:councillor_admiral
		animation = idle	
	}
	lower_center_portrait = {
		character = cp:councillor_chancellor
		animation = idle	
	}
	lower_right_portrait = {
		character = cp:councillor_spymaster
		animation = idle	
	}	
	immediate = {
		if = {
			limit = {
				any_vassal = {
					highest_held_title_tier >= tier_empire
					NOT = { is_councillor_of = ROOT }
				}
			}
			random_vassal = {
				limit = {
					highest_held_title_tier >= tier_empire
					NOT = { is_councillor_of = ROOT }
				}
				save_scope_as = rk_offending_lord
			}
		}
		cp:councillor_admiral = {
			save_scope_as = rk_admiral
		}
		cp:councillor_castellan = {
			save_scope_as = rk_castellan
		}
		cp:councillor_chancellor = {
			save_scope_as = rk_chancellor
		}
		cp:councillor_steward = {
			save_scope_as = rk_steward
		}
		cp:councillor_spymaster = {
			save_scope_as = rk_spymaster
		}		
	}
	option = {  #Send the Hand to Negotiate
		name = rk_small_council.0001.a
		custom_tooltip = rk_small_council.0001.a_tt	
        flavor = rk_small_council.0001.a_f 	
		cp:councillor_chancellor = {
			add_opinion = {
				modifier = frustrated_opinion
				opinion = -5				
				target = root
			}				
		}
		cp:councillor_admiral = {
			add_opinion = {
				modifier = frustrated_opinion
				opinion = -5				
				target = root
			}				
		}	
		cp:councillor_castellan = {
			add_opinion = {
				modifier = pleased_opinion
				opinion = 10				
				target = root
			}				
		}		
		hidden_effect = {
			random_list = {
				50 = {
					send_interface_toast = {
						title = rk_small_council.0001.toast_a
						left_icon = cp:councillor_castellan
						type = event_toast_effect_bad
						add_prestige = -100
					}		
				}
				100 = {
					send_interface_toast = {
						title = rk_small_council.0001.toast_b
						left_icon = cp:councillor_castellan
						type = event_toast_effect_good	
						remove_character_modifier = rk_vassal_tax_withheld	
						add_character_modifier = rk_compromise_reached_1					
					}		
				}
				100 = {
					send_interface_toast = {
						title = rk_small_council.0001.toast_b
						left_icon = cp:councillor_castellan
						type = event_toast_effect_good	
						remove_character_modifier = rk_vassal_tax_withheld	
						add_character_modifier = rk_compromise_reached_2					
					}		
				}
				100 = {
					send_interface_toast = {
						title = rk_small_council.0001.toast_b
						left_icon = cp:councillor_castellan
						type = event_toast_effect_good	
						remove_character_modifier = rk_vassal_tax_withheld	
						add_character_modifier = rk_compromise_reached_3					
					}		
				}			
			
			}
		}		
	}
	option = {  #
		name = rk_small_council.0001.b
		custom_tooltip = rk_small_council.0001.b_tt
        flavor = rk_small_council.0001.b_f 	
		add_tyranny = 5
		imprison = {
			target = scope:rk_offending_lord
			type = dungeon
		}		
		scope:rk_offending_lord = {
			add_opinion = {
				modifier = angry_opinion
				opinion = -20				
				target = root
			}				
		}
		cp:councillor_chancellor = {
			add_opinion = {
				modifier = pleased_opinion
				opinion = 10				
				target = root
			}				
		}
		cp:councillor_admiral = {
			add_opinion = {
				modifier = frustrated_opinion
				opinion = -5				
				target = root
			}				
		}	
		cp:councillor_castellan = {
			add_opinion = {
				modifier = frustrated_opinion
				opinion = -5				
				target = root
			}				
		}		
		hidden_effect = {
			send_interface_toast = {
				title = rk_small_council.0001.toast_b_1
				left_icon = cp:councillor_chancellor
				type = event_toast_effect_good	
				remove_character_modifier = rk_vassal_tax_withheld					
			}		
		}
	}
	option = {  #
		name = rk_small_council.0001.c
		custom_tooltip = rk_small_council.0001.c_tt	
        flavor = rk_small_council.0001.c_f 
		hidden_effect = {
			send_interface_toast = {
				title = rk_small_council.0001.toast_c
				left_icon = cp:councillor_admiral
				type = event_toast_effect_good	
				add_character_modifier = rk_markets_seized					
			}		
		}	
		cp:councillor_chancellor = {
			add_opinion = {
				modifier = frustrated_opinion
				opinion = -5				
				target = root
			}				
		}
		cp:councillor_admiral = {
			add_opinion = {
				modifier = pleased_opinion
				opinion = 10				
				target = root
			}				
		}	
		cp:councillor_castellan = {
			add_opinion = {
				modifier = frustrated_opinion
				opinion = -5				
				target = root
			}				
		}			
	}	
}


rk_small_council.0002 = { #
	type = letter_event
	opening = rk_small_council.0002.opening
	desc = rk_small_council.0002.desc
	sender = {
		character = cp:councillor_steward
	}
	trigger = {
		NOT = {has_character_flag = rk_lords_withheld_taxes}
		has_title = title:c_kings_landing
		exists = cp:councillor_steward	
		exists = cp:councillor_castellan
		exists = cp:councillor_admiral		
	}
	immediate = {
		add_character_modifier = {
			modifier = rk_vassal_tax_withheld
		}
		add_character_flag = rk_lords_withheld_taxes		
	}	
	option = {  #
		name = rk_small_council.0002.a
		custom_tooltip = rk_small_council.0002.a_tt	
        flavor = rk_small_council.0002.a_f 		
		trigger_event = rk_small_council.0001
	}
	option = {  #
		name = rk_small_council.0002.b
		custom_tooltip = rk_small_council.0002.b_tt
        flavor = rk_small_council.0002.b_f 			
	}
}



