﻿##########################################
###### THE RED KEEP DECISIONS START ######
##########################################


### REVIEW KINGS LANDING DEFENCES ####

rk_review_defences_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_rk_defence.dds"
	}
	decision_group_type = struggle
	sort_order = 250	
	title = rk_review_defences_decision_title	
	desc = rk_review_defences_decision_desc
    selection_tooltip = rk_review_defences_decision_tooltip
    confirm_text = rk_review_defences_decision_confirm_text
	cooldown = { 
		years = 5
	}
	is_shown = {
		is_at_war = yes				
		has_title = title:c_kings_landing	
	}	
	is_valid = {
		age > 12
	}	

	effect = {
		custom_tooltip = rk_review_defences_decision_effect_tooltip	
		trigger_event = {
			id = rk_siege_defence.0001
			days = 1
		}	
	}
}

#### Go for a ride ###

rk_go_for_a_ride_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_rk_go_for_a_ride.dds"
	}
	sort_order = 110	
	decision_group_type = struggle
	title = rk_go_for_a_ride_decision_title	
	desc = rk_go_for_a_ride_decision_desc
    selection_tooltip = rk_go_for_a_ride_decision_tooltip
    confirm_text = rk_go_for_a_ride_decision_confirm_text
	cooldown = { 
		years = 3
	}
	is_shown = {		
		is_imprisoned = no
		is_incapable = no
		is_ai = no
		has_title = title:c_kings_landing
		is_available = yes
	}	
	is_valid = {
		age > 12
		is_at_war = no		
	}	
	effect = {
		custom_tooltip = rk_go_for_a_ride_decision_effect_tooltip	
		hidden_effect = {
			random_list = {
				60 = {
					random_list = {
						10 = {
							trigger_event = rk_go_for_ride.0001
							modifier = {
								has_variable = rk_ride_01_fired
								add = -10
							}
						}
						7 = {
							trigger_event = rk_go_for_ride.0002
							modifier = {
								has_variable = rk_ride_02_fired
								add = -11
							}	
							modifier = {
								age <= 20
								add = 4
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0003
							modifier = {
								has_variable = rk_ride_03_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0005
							modifier = {
								has_variable = rk_ride_05_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0006
							modifier = {
								has_variable = rk_ride_06_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0007
							modifier = {
								has_variable = rk_ride_07_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0008
							modifier = {
								has_variable = rk_ride_08_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0009
							modifier = {
								has_variable = rk_ride_09_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0010
							modifier = {
								has_variable = rk_ride_10_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0011
							modifier = {
								has_variable = rk_ride_11_fired
								add = -10
							}
						}
						14 = {
							trigger_event = rk_go_for_ride.0012
							modifier = {
								has_variable = rk_ride_12_fired
								add = -13
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0014
								trigger = {
									exists = cp:kingsguard_lord_commander
								}
							modifier = {
								has_variable = rk_ride_14_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0015
								trigger = {
									exists = cp:kingsguard_lord_commander
								}
							modifier = {
								has_variable = rk_ride_15_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0016
								trigger = {
									exists = cp:kingsguard_lord_commander
								}
							modifier = {
								has_variable = rk_ride_16_fired
								add = -10
							}
						}	
						10 = {
							trigger_event = rk_go_for_ride.0021
								trigger = {
									NOT = {
										has_title = title:b_hayford 
									}
									title:b_hayford.holder = {
										age >= 13
									}
								}
							modifier = {
								has_variable = rk_ride_21_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0022
								trigger = {
									exists = cp:kingsguard_lord_commander
								}
							modifier = {
								has_variable = rk_ride_22_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0023
								trigger = {
									NOT = {
										OR = {
											has_title = title:b_hayford
											has_title = title:b_shinebridge_hall	
											has_title = title:b_bramsfort	
											has_title = title:b_rosby	
											has_title = title:b_wings_pass	
											has_title = title:b_the_gauntlet	
											has_title = title:b_briarcrest					
										}
									}
								}
							modifier = {
								has_variable = rk_ride_23_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0026
							trigger = {
								any_relation = {
									type = friend
									is_courtier = yes
									is_imprisoned = no
									is_incapable = no
								}	
							}
							modifier = {
								has_variable = rk_ride_26_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_go_for_ride.0030
							trigger = {
								any_relation = {
									type = friend
									is_courtier = yes
									is_imprisoned = no
									is_incapable = no
								}	
							}
							modifier = {
								has_variable = rk_ride_30_fired
								add = -10
							}
						}		
						10 = {
							trigger_event = rk_go_for_ride.0031
							modifier = {
								has_variable = rk_ride_31_fired
								add = -10
							}
						}
						10 = {
							trigger = {
								exists = cp:kingsguard_lord_commander
							}
							trigger_event = rk_go_for_ride.0032
							modifier = {
								has_variable = rk_ride_32_fired
								add = -10
							}
						}						
					}
				}
				20 = {
					send_interface_toast = {
						title = rk_ride_toast_1
						custom_tooltip = rk_ride_toast_1_desc
						add_stress = -20
					}					
				}
				5 = {
					send_interface_toast = {
						custom_tooltip = rk_ride_toast_2_desc
						title = rk_ride_toast_2
						add_prowess_skill = 1
					}					
				}
				2 = {
					trigger = {
						NOT = {
							has_trait = wounded_1
						}
					}
					send_interface_toast = {
						title = rk_ride_toast_3
						custom_tooltip = rk_ride_toast_3_desc
						add_trait = wounded_1
					}					
				}
				4 = {
					send_interface_toast = {
						custom_tooltip = rk_ride_toast_4_desc
						title = rk_ride_toast_4
						add_prestige = 50
					}					
				}
				2 = {
					send_interface_toast = {
						custom_tooltip = rk_ride_toast_5_desc
						title = rk_ride_toast_5
						dynasty = {
							add_dynasty_prestige = 5
						}
					}					
				}
				1 = {
					send_interface_toast = {
						custom_tooltip = rk_ride_toast_6_desc
						title = rk_ride_toast_6
						add_character_modifier = {
							modifier = rk_nobility_insights
							years = 3
						}
					}					
				}
				2 = {
					send_interface_toast = {
						custom_tooltip = rk_ride_toast_7_desc
						title = rk_ride_toast_7
						add_character_modifier = {
							modifier = rk_royal_benevolence
							years = 5
						}
					}					
				}
			}
		}
	}
}
### REQUEST GRAIN FROM THE REACH IF YOU OWN THE REACH ####

rk_request_grain_reach_owned_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/rk_request_grain_reach.dds"
	}
	decision_group_type = struggle
	sort_order = 250	
	title = rk_request_grain_reach_owned_decision_title	
	desc = rk_request_grain_reach_owned_decision_desc
    selection_tooltip = rk_request_grain_reach_owned_decision_tooltip
    confirm_text = rk_request_grain_reach_owned_decision_confirm_text
	cooldown = { 
		days = 5 ###REVISE
	}
	is_shown = {			
		has_title = title:c_kings_landing	
		has_title = title:e_the_reach
	}	
	is_valid = {
		age > 12
	}			
	effect = {
		custom_tooltip = rk_request_grain_reach_owned_decision_effect_tooltip	
		remove_short_term_gold = 150
		hidden_effect = {
			if = {
				limit = {
					title:c_kings_landing = {
						has_county_modifier = rk_well_fed
					}
				}	
				send_interface_toast = {
					type = event_toast_effect_good
					title = rk_reach_grain_arrives_title
					custom_tooltip = rk_reach_grain_arrives_desc				
					left_icon = title:e_the_reach.holder
					title:c_kings_landing = {
						remove_county_modifier = rk_well_fed
						add_county_modifier = rk_well_fed
					}
				}
			}
			else_if = {
				limit = {
					title:c_kings_landing = {
						has_county_modifier = rk_sufficiently_fed
					}
				}	
				send_interface_toast = {
					type = event_toast_effect_good
					title = rk_reach_grain_arrives_title
					custom_tooltip = rk_reach_grain_arrives_desc				
					left_icon = title:e_the_reach.holder
					title:c_kings_landing = {
						remove_county_modifier = rk_sufficiently_fed
						add_county_modifier = rk_well_fed
					}
				}			
			}
			else_if = {
				limit = {
					title:c_kings_landing = {
						has_county_modifier = rk_food_strained
					}
				}	
				send_interface_toast = {
					type = event_toast_effect_good
					title = rk_reach_grain_arrives_title
					custom_tooltip = rk_reach_grain_arrives_desc				
					left_icon = title:e_the_reach.holder
					title:c_kings_landing = {
						remove_county_modifier = rk_food_strained
						add_county_modifier = rk_sufficiently_fed
					}
				}				
			}	
			else_if = {
				limit = {
					title:c_kings_landing = {
						has_county_modifier = rk_hungry_population
					}
				}	
				send_interface_toast = {
					type = event_toast_effect_good
					title = rk_reach_grain_arrives_title
					custom_tooltip = rk_reach_grain_arrives_desc				
					left_icon = title:e_the_reach.holder
					title:c_kings_landing = {
						remove_county_modifier = rk_hungry_population
						add_county_modifier = rk_food_strained
					}
				}				
			}		
			else = {
				limit = {
					title:c_kings_landing = {
						has_county_modifier = rk_starving_population
					}
				}	
				send_interface_toast = {
					type = event_toast_effect_good
					title = rk_reach_grain_arrives_title
					custom_tooltip = rk_reach_grain_arrives_desc				
					left_icon = title:e_the_reach.holder
					title:c_kings_landing = {
						remove_county_modifier = rk_starving_population
						add_county_modifier = rk_hungry_population
					}
				}			
			}
		}		
	}
}
#### REQUEST GRAIN FROM THE REACH ####

rk_request_grain_reach_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/rk_request_grain_reach.dds"
	}
	decision_group_type = struggle	
	sort_order = 250	
	title = rk_request_grain_reach_decision_title	
	desc = rk_request_grain_reach_decision_title_desc
    selection_tooltip = rk_request_grain_reach_decision_title_tooltip
    confirm_text = rk_request_grain_reach_decision_confirm_text
	cooldown = { 
		years = 5
	}
	is_shown = {		
		has_title = title:c_kings_landing
		has_global_variable = rk_player_famines		
		NOT = {
			has_title = title:e_the_reach
		}
	}	
	widget = {
		gui = "decision_view_widget_generic_multichoice_with_effects"
		controller = decision_option_list_controller
		decision_to_second_step_button = "REQUEST_GRAIN"
		show_from_start = yes		
		item = {
			value = rk_buy_grain
			is_valid = {		
				NOT = {
					has_relation_rival = title:e_the_reach.holder
				}					
				NOT = {
					is_at_war_with = title:e_the_reach.holder
				}
				NOT = {
					has_title = title:e_the_reach
				}
				title:c_kings_landing = {
					NOT = {
						has_county_modifier = rk_well_fed
					}
				}				
			}
			current_description = rk_buy_grain_desc
			localization = rk_buy_grain_name
			icon = "gfx/interface/icons/character_interactions/request_funding_interaction.dds"
		}
		item = {	
			value = rk_hook_grain
			is_valid = {	
				NOT = {
					has_relation_rival = title:e_the_reach.holder
				}			
				NOT = {
					is_at_war_with = title:e_the_reach.holder
				}
				NOT = {
					has_title = title:e_the_reach
				}
				title:c_kings_landing = {
					NOT = {
						has_county_modifier = rk_well_fed
					}
				}
			}
			current_description = rk_hook_grain_desc
			localization = rk_hook_grain_name
			icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
		}
		item = {
			value = rk_reach_allied
			is_valid = {	
				NOT = {
					has_relation_rival = title:e_the_reach.holder
				}			
				NOT = {
					is_at_war_with = title:e_the_reach.holder
				}
				NOT = {
					has_title = title:e_the_reach
				}
				title:c_kings_landing = {
					NOT = {
						has_county_modifier = rk_well_fed
					}
				}
				is_allied_to = title:e_the_reach.holder			
			}
			current_description = rk_reach_allied_desc
			localization = rk_reach_allied_name
			icon = "gfx/interface/icons/character_interactions/icon_ally.dds"
		}		
		item = {
			value = rk_leverage_opinion
			is_valid = {		
				NOT = {
					is_at_war_with = title:e_the_reach.holder
				}
				NOT = {
					has_title = title:e_the_reach
				}
				title:c_kings_landing = {
					NOT = {
						has_county_modifier = rk_well_fed
					}
				}
				title:e_the_reach.holder = {
					opinion = {
						target = root
						value >= 50
					}
				}
			}
			current_description = rk_leverage_opinion_desc
			localization = rk_leverage_opinion_name
			icon = "gfx/interface/icons/character_interactions/icon_scheme_befriend.dds"
		}		
		item = {
			value = rk_royal_decree
			is_valid = {	
				NOT = {
					has_relation_rival = title:e_the_reach.holder
				}		
				NOT = {
					is_at_war_with = title:e_the_reach.holder
				}
				NOT = {
					has_title = title:e_the_reach
				}
				title:c_kings_landing = {
					NOT = {
						has_county_modifier = rk_well_fed
					}
				}
				title:e_the_reach.holder = {
					has_dread_level_towards	= {
						target = root
						level >= 1
					}
				}				
			}
			current_description = rk_royal_decree_desc
			localization = rk_royal_decree_desc_name
			icon = "gfx/interface/icons/character_interactions/icon_force_governor_removal.dds"
		}
		item = {
			value = rk_use_strong_hook
			is_valid = {		
				NOT = {
					is_at_war_with = title:e_the_reach.holder
				}
				NOT = {
					has_relation_rival = title:e_the_reach.holder
				}				
				NOT = {
					has_title = title:e_the_reach
				}
				title:c_kings_landing = {
					NOT = {
						has_county_modifier = rk_well_fed
					}
				}
				has_strong_usable_hook = title:e_the_reach.holder				
			}
			current_description = rk_use_strong_hook_desc
			localization = rk_use_strong_hook_name
			icon = "gfx/interface/icons/character_interactions/hook_strong.dds"
		}		
	}	
	cost = {
		prestige = {
			value = medium_prestige_value
		}
	}	
	effect = {
		if = {
			limit = { 
				scope:rk_buy_grain = yes 
			}
			custom_tooltip = rk_buy_grain_decision_tooltip
			remove_short_term_gold = 500
			title:e_the_reach.holder = {
				add_gold = 500
			}			
			hidden_effect = {
				if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_well_fed
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_well_fed
							add_county_modifier = rk_well_fed
						}
					}
				}
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_sufficiently_fed
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_sufficiently_fed
							add_county_modifier = rk_well_fed
						}
					}			
				}
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_food_strained
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_food_strained
							add_county_modifier = rk_sufficiently_fed
						}
					}				
				}	
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_hungry_population
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_hungry_population
							add_county_modifier = rk_food_strained
						}
					}				
				}		
				else = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_starving_population
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_starving_population
							add_county_modifier = rk_hungry_population
						}
					}			
				}
			}	
		}
		else_if = {
			limit = { 
				scope:rk_hook_grain = yes 
			}
			custom_tooltip = rk_hook_grain_tooltip
			title:e_the_reach.holder = {
				add_hook = {
					type = favor_hook
					target = root
				}
			}			
			hidden_effect = {
				if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_well_fed
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_well_fed
							add_county_modifier = rk_well_fed
						}
					}
				}
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_sufficiently_fed
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_sufficiently_fed
							add_county_modifier = rk_well_fed
						}
					}			
				}
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_food_strained
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_food_strained
							add_county_modifier = rk_sufficiently_fed
						}
					}				
				}	
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_hungry_population
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_hungry_population
							add_county_modifier = rk_food_strained
						}
					}				
				}		
				else = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_starving_population
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_starving_population
							add_county_modifier = rk_hungry_population
						}
					}			
				}
			}	
		}
		else_if = {
			limit = { 
				scope:rk_leverage_opinion = yes 
			}
			custom_tooltip = rk_leverage_opinion_tooltip
			title:e_the_reach.holder = {
				add_opinion = {
					modifier = annoyed_opinion
					opinion = -25				
					target = root
				}	
			}			
			hidden_effect = {
				if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_well_fed
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_well_fed
							add_county_modifier = rk_well_fed
						}
					}
				}
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_sufficiently_fed
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_sufficiently_fed
							add_county_modifier = rk_well_fed
						}
					}			
				}
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_food_strained
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_food_strained
							add_county_modifier = rk_sufficiently_fed
						}
					}				
				}	
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_hungry_population
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_hungry_population
							add_county_modifier = rk_food_strained
						}
					}				
				}		
				else = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_starving_population
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_starving_population
							add_county_modifier = rk_hungry_population
						}
					}			
				}
			}	
		}
		else_if = {
			limit = { 
				scope:rk_reach_allied = yes 
			}
			custom_tooltip = rk_reach_allied_tooltip			
			hidden_effect = {
				if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_well_fed
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_well_fed
							add_county_modifier = rk_well_fed
						}
					}
				}
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_sufficiently_fed
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_sufficiently_fed
							add_county_modifier = rk_well_fed
						}
					}			
				}
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_food_strained
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_food_strained
							add_county_modifier = rk_sufficiently_fed
						}
					}				
				}	
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_hungry_population
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_hungry_population
							add_county_modifier = rk_food_strained
						}
					}				
				}		
				else = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_starving_population
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_starving_population
							add_county_modifier = rk_hungry_population
						}
					}			
				}
			}	
		}		
		else_if = {
			limit = { 
				scope:rk_royal_decree = yes 
			}
			custom_tooltip = rk_royal_decree_tooltip
			use_hook = title:e_the_reach.holder
			title:e_the_reach.holder = {
				add_opinion = {
					modifier = annoyed_opinion
					opinion = -25				
					target = root
				}	
			}			
			hidden_effect = {
				if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_well_fed
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_well_fed
							add_county_modifier = rk_well_fed
						}
					}
				}
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_sufficiently_fed
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_sufficiently_fed
							add_county_modifier = rk_well_fed
						}
					}			
				}
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_food_strained
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_food_strained
							add_county_modifier = rk_sufficiently_fed
						}
					}				
				}	
				else_if = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_hungry_population
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_hungry_population
							add_county_modifier = rk_food_strained
						}
					}				
				}		
				else = {
					limit = {
						title:c_kings_landing = {
							has_county_modifier = rk_starving_population
						}
					}	
					send_interface_toast = {
						type = event_toast_effect_good
						title = rk_reach_grain_arrives_title
						custom_tooltip = rk_reach_grain_arrives_desc				
						left_icon = title:e_the_reach.holder
						title:c_kings_landing = {
							remove_county_modifier = rk_starving_population
							add_county_modifier = rk_hungry_population
						}
					}			
				}
			}	
		}		
	}				
}


#### UNIFY CRACKCLAW ####


rk_unify_crackclaw_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/crack_decision.dds"
	}
	decision_group_type = struggle	
	sort_order = 10	
	title = rk_unify_crackclaw_decision_title	
	desc = rk_unify_crackclaw_decision_desc
    selection_tooltip = rk_unify_crackclaw_decision_tooltip
    confirm_text = rk_unify_crackclaw_decision_confirm_text
	cooldown = { 
		years = 49
	}
	is_shown = {	
		NOT = { exists = title:d_crackclaw_point.holder }
		has_title = title:c_kings_landing	
		NOT = {
			has_title = title:b_dyre_den
		}
		title:b_dyre_den.holder = {
			is_vassal_of = ROOT
		}
	}	
	is_valid = {
		is_at_war = no		
		is_available_adult = yes
		exists = cp:councillor_castellan
		diplomacy >= 20
	}	

	effect = {
		custom_tooltip = rk_unify_crackclaw_decision_effect_tooltip	
		trigger_event = rk_crackclaw.0001
	}
}


### PLAY FOR THE COURT ####

rk_play_for_the_court_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_rk_entertain_court.png"
	}
	decision_group_type = struggle	
	sort_order = 90	
	title = rk_play_for_the_court_decision_title	
	desc = rk_play_for_the_court_decision_desc
    selection_tooltip = rk_play_for_the_court_decision_tooltip
    confirm_text = rk_play_for_the_court_decision_confirm_text
	cost = {
		prestige = {
			value = 50
		}
	}	
	cooldown = { 
		years = 5 #
	}
	is_shown = {
		is_at_war = no				
		has_title = title:c_kings_landing	
		has_trait = lifestyle_poet
		is_available = yes				
	}	
	is_valid = {
		age > 14	
	}	
	effect = {
		custom_tooltip = rk_play_for_the_court_decision_effect_tooltip	
		trigger_event = rk_court.0001
	}
}



### ASK FOR A BLESSING ####

rk_blessing_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_rk_blessing.png"
	}
	decision_group_type = struggle	
	sort_order = 15	
	title = rk_blessing_decision_title	
	desc = rk_blessing_decision_desc
    selection_tooltip = rk_blessing_decision_tooltip
    confirm_text = rk_blessing_decision_confirm_text
	cooldown = { 
		years = 10 #
	}
	is_shown = {			
		has_title = title:c_kings_landing
		is_available = yes		
	}	
	is_valid = {
		age > 12
		title:k_the_most_devout.holder = {
			opinion = {
				target = root
				value >= 50
			}
		}		
	}	
	cost = {
		gold = {
			value = 100
		}
		piety = {
			value = 100
		}
	}	
	effect = {
		custom_tooltip = rk_blessing_decision_effect_tooltip
		trigger_event = rk_blessing.0001
	}
}


#### VISIT KING'S LANDING IN DISGUISE


rk_visit_the_city_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_rk_visit_city.png"
	}

	sort_order = 90	
	decision_group_type = struggle	
	title = rk_visit_the_city_decision_title	
	desc = rk_visit_the_city_decision_title_desc
    selection_tooltip = rk_visit_the_city_decision_title_tooltip
    confirm_text = rk_visit_the_city_decision_title_confirmation_text	
	cooldown = { 
		years = 5 #change
	}
	is_shown = {
		is_imprisoned = no
		is_incapable = no
		is_ai = no
		has_title = title:c_kings_landing
		is_at_war = no
		is_available = yes		
	}	
	is_valid = {
		age > 14	
	}	
	effect = {
		custom_tooltip = rk_visit_the_city_decision_title_effect_tooltip	
		hidden_effect = {
			random_list = {
				100 = {
					random_list = {
						10 = {
							trigger_event = rk_city.0001
							modifier = {
								has_variable = rk_city_01_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_city.0004
							modifier = {
								has_variable = rk_city_04_fired
								add = -10
							}
						}	
						10 = {
							trigger_event = rk_city.0009
							modifier = {
								has_variable = rk_city_09_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_city.0012
							modifier = {
								has_variable = rk_city_12_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_city.0013
							modifier = {
								has_variable = rk_city_13_fired
								add = -10
							}
						}	
						10 = {
							trigger_event = rk_city.0014
							modifier = {
								has_variable = rk_city_14_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_city.0015
							modifier = {
								has_variable = rk_city_15_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_city.0016
							modifier = {
								has_variable = rk_city_16_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_city.0018
							modifier = {
								has_variable = rk_city_18_fired
								add = -10
							}
						}	
						10 = {
							trigger_event = rk_city.0019
							modifier = {
								has_variable = rk_city_19_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_city.0020
							modifier = {
								has_variable = rk_city_20_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_city.0023
							modifier = {
								has_variable = rk_city_23_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_city.0025
							modifier = {
								has_variable = rk_city_25_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_city.0026
							modifier = {
								has_variable = rk_city_26_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_city.0028
							modifier = {
								has_variable = rk_city_28_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_city.0031
							modifier = {
								has_variable = rk_city_31_fired
								add = -10
							}
						}	
						10 = {
							trigger_event = rk_city.0034
							modifier = {
								has_variable = rk_city_34_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_city.0035
							modifier = {
								has_variable = rk_city_35_fired
								add = -10
							}
						}
						10 = {
							trigger_event = rk_city.0037
							modifier = {
								has_variable = rk_city_37_fired
								add = -10
							}
						}	
						10 = {
							trigger_event = rk_city.0041
							modifier = {
								has_variable = rk_city_41_fired
								add = -10
							}
						}						
					}
				}		
			}
		}		
	}
}



#### VISIT ALCEMIST GUILD


rk_visit_alchemist_guild = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/rk_visit_alchemist_guild_decision.png"
	}
	sort_order = 90	
	decision_group_type = struggle	
	title = rk_visit_alchemist_guild_title	
	desc = rk_visit_alchemist_guild_desc
    selection_tooltip = rk_visit_alchemist_guild_tooltip
    confirm_text = rk_visit_alchemist_guild_confirmation_text	
	cooldown = { 
		years = 5 #change
	}
	cost = {
		piety = {
			value = 100
		}
	}		
	is_shown = {			
		has_title = title:c_kings_landing	
		is_available = yes	
		age > 14		
	}	
	is_valid = {
		age > 14	
	}	
	effect = {
		custom_tooltip = rk_visit_alchemist_guild_effect_tooltip		
		trigger_event = rk_wildfire.0001
	}
}


#### USE WILDFIRE


rk_use_wildfire_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_rk_dungeon_wildfire.png"
	}
	decision_group_type = struggle	
	sort_order = 90	
	title = rk_use_wildfire_decision_title	
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					title:c_kings_landing = {
						has_county_modifier = rk_small_wildfire_stockpile					
					}
				}
				desc = rk_use_wildfire_decision_desc.a
			}	
			triggered_desc = {
				trigger = {
					title:c_kings_landing = {
						has_county_modifier = rk_medium_wildfire_stockpile					
					}
				}
				desc = rk_use_wildfire_decision_desc.b
			}
			triggered_desc = {
				trigger = {
					title:c_kings_landing = {
						has_county_modifier = rk_large_wildfire_stockpile					
					}
				}
				desc = rk_use_wildfire_decision_desc.c
			}
			triggered_desc = {
				trigger = {
					title:c_kings_landing = {
						has_county_modifier = rk_full_wildfire_stockpile					
					}
				}
				desc = rk_use_wildfire_decision_desc.d
			}			
		}
	}
    selection_tooltip = rk_use_wildfire_decision_tooltip
    confirm_text = rk_use_wildfire_decision_confirmation_text	
	cooldown = { 
		years = 2 #change
	}
	cost = {
	}		
	is_shown = {			
		has_title = title:c_kings_landing	
		is_available = yes	
		age > 14	
		title:c_kings_landing = {
			OR = {
				has_county_modifier = rk_small_wildfire_stockpile	
				has_county_modifier = rk_medium_wildfire_stockpile
				has_county_modifier = rk_large_wildfire_stockpile
				has_county_modifier = rk_full_wildfire_stockpile				
			}
		}
	}	
	is_valid = {
	}	
	effect = {
		custom_tooltip = rk_use_wildfire_decision_title_effect_tooltip		
		trigger_event = rk_wildfire.0003
	}
}



### EXPAND ROYAL DEMESNE ####

rk_expand_royal_demesne_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/rk_expand_demesne.dds"
	}
	decision_group_type = struggle	
	sort_order = 10	
	title = rk_expand_royal_demesne_decision_title	
	desc = rk_expand_royal_demesne_decision_desc
    selection_tooltip = rk_expand_royal_demesne_decision_tooltip
    confirm_text = rk_expand_royal_demesne_decision_confirm_text
	cooldown = { 
		years = 10
	}
	is_shown = {			
		has_title = title:c_kings_landing
		is_available_adult = yes
		exists = cp:councillor_castellan	
		NOT = {
			has_global_variable = rk_demesne_expanded_var
		}
	}	
	is_valid = {
		age > 12
		OR = {
			stewardship >= 20		
			has_trait = greedy
			has_trait = avaricious
			has_trait = administrator
			has_trait = ambitious
		}
	}	

	effect = {
		custom_tooltip = rk_expand_royal_demesne_decision_effect_tooltip	
		trigger_event = rk_landingfield.0001
	}
}


### CONVENE THE GUILDS OF KING'S LANDING ####

rk_convene_guilds_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_rk_convene_guildmasters.dds"
	}
	decision_group_type = struggle
	sort_order = 50	
	title = rk_convene_guilds_decision_title	
	desc = rk_convene_guilds_decision_desc
    selection_tooltip = rk_convene_guilds_decision_tooltip
    confirm_text = rk_convene_guilds_decision_confirm_text
	cooldown = { 
		years = 20
	}
	cost = {
		prestige = {
			value = 150
		}
	}		
	is_shown = {
		is_at_war = no				
		has_title = title:c_kings_landing	
		is_available = yes
	}	
	is_valid = {
		age > 14
	}	

	effect = {
		custom_tooltip = rk_convene_guilds_decision_effect_tooltip	
		trigger_event = rk_guild.0001		
	}
}


### SUMMON THE COMMANDER OF THE CITY WATCH ####

rk_summon_gc_commander_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_rk_summon_goldcloack.dds"
	}
	decision_group_type = struggle
	sort_order = 250	
	title = rk_summon_gc_commander_decision_title
	desc = rk_summon_gc_commander_decision_desc
    selection_tooltip = rk_summon_gc_commander_decision_tooltip
    confirm_text = rk_summon_gc_commander_decision_confirm_text
	cost = {
		prestige = {
			value = 50
		}
	}	
	cooldown = { 
		years = 1
	}
	is_shown = {			
		has_title = title:c_kings_landing
		is_available = yes
		NOT = {
			has_title = title:b_goldguard_heights
		}
		title:c_kings_landing = {
			OR = {
				has_county_modifier = rk_city_watch_neglected	
				has_county_modifier = rk_city_watch_funded	
				has_county_modifier = rk_city_watch_well_funded	
				has_county_modifier = rk_city_watch_corrupt	
			}
		}
	}	
	
	is_valid = {
		age > 12
	}	

	effect = {
		custom_tooltip = rk_summon_gc_commander_decision_effect_tooltip	
		trigger_event = rk_gc.0001
	}
}

#########


rk_city_stench_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_rk_stench.dds"
	}
	decision_group_type = struggle
	sort_order = 250	
	title = rk_city_stench_decision_title	
	desc = rk_city_stench_decision_desc
    selection_tooltip = rk_city_stench_decision_tooltip
    confirm_text = rk_city_stench_decision_confirm_text
	is_shown = {
		is_at_war = no				
		has_title = title:c_kings_landing
		NOT = {
			has_character_flag = rk_had_city_stench
		}
		title:c_kings_landing = {
			has_county_modifier = rk_kl_stench_1
		}
	}	
	is_valid = {
		age > 12
		is_available = yes
		exists = cp:councillor_castellan
		stewardship >= 15		
		gold >= 1000
	}	

	effect = {
		custom_tooltip = rk_city_stench_decision_effect_tooltip	
		trigger_event = {
			id = rk_sanitation.0001
			days = 1
		}	
	}
}




#### Establish the Royal Mint


rk_establish_royal_mint_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_repay_debt.dds"
	}
	decision_group_type = struggle
	sort_order = 75	
	title = rk_establish_royal_mint_decision_title	
	desc = rk_establish_royal_mint_decision_desc
    selection_tooltip = rk_establish_royal_mint_decision_tooltip
    confirm_text = rk_establish_royal_mint_decision_confirm_text
	cooldown = { 
		years = 20
	}
	is_shown = {
		is_at_war = no				
		has_title = title:c_kings_landing	
		NOT = {
			has_global_variable = rk_created_royal_mint
		}
	}	
	is_valid = {
		age > 12
		stewardship >= 15
		gold >= 500
		exists = cp:councillor_steward	
	}	

	effect = {
		custom_tooltip = rk_establish_royal_mint_decision_effect_tooltip	
		trigger_event = {
			id = rk_royal_mint.0001
			days = 1
		}	
	}
}

#### Summon the Master of Coin 

rk_summon_master_coin_decision = {
	ai_check_interval = 0
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_repay_debt.dds"
	}
	decision_group_type = struggle
	sort_order = 250	
	title = rk_summon_master_coin_decision_title	
	desc = rk_summon_master_coin_decision_desc
    selection_tooltip = rk_summon_master_coin_decision_decision_tooltip
    confirm_text = rk_summon_master_coin_decision_confirm_text
	cooldown = { 
		years = 5 
	}
	is_shown = {
		is_at_war = no				
		has_title = title:c_kings_landing	
		has_global_variable = rk_has_royal_mint
	}	
	is_valid = {
		age > 12
		exists = cp:councillor_steward	
	}	

	effect = {
		custom_tooltip = rk_summon_master_coin_decision_effect_tooltip	
		trigger_event = {
			id = rk_royal_mint.0003
			days = 1
		}
	}
}