﻿namespace = rk_kings_landing
namespace = rk_famine
namespace = rk_harvest
namespace = rk_crime
namespace = rk_blessing
namespace = rk_guild
namespace = rk_gc
namespace = rk_sanitation
namespace = rk_royal_mint
namespace = rk_maintenance

# King's Landing Events
############################################################################################################################################################

rk_kings_landing.0001 = {
	type = character_event
	window = fullscreen_event
	title = rk_kings_landing.0001.t
	trigger = {
		is_imprisoned = no
		is_incapable = no
		is_ai = no
		has_title = title:c_kings_landing
	}
	desc = {
		desc = rk_kings_landing.0001_desc
	}
	theme = rk_red_keep
	override_background = { reference = rk_kings_landing }
	
	immediate = {
		play_music_cue = mx_rk_trebuchets
		title:c_kings_landing = {
			add_county_modifier = rk_city_watch_neglected	
			add_county_modifier = {
				modifier = rk_city_watch_neglected
			}
			add_county_modifier = {
				modifier = rk_food_strained
			}
			if = {
				limit = {
					NOT = {
						OR = {
							has_county_modifier = rk_kl_stench_2
							has_county_modifier = rk_kl_stench_3
							has_county_modifier = rk_kl_stench_4
							has_county_modifier = rk_kl_stench_5
							has_county_modifier = rk_kl_stench_6
							has_county_modifier = rk_kl_stench_7								
						}						
					}
				}
				add_county_modifier = rk_kl_stench_1
			}		
		
		}
		hidden_effect = {
			set_global_variable = rk_player_famines
			add_realm_law = crown_authority_1
			create_adventurer_title = {
				name = rk_the_red_keep_domicile_title
				holder = root
				government = lp_feudal_government
				save_scope_as = rk_the_red_keep_domicile_title
			}	
			title:b_the_red_keep = { 
				set_variable = { 
					name = rk_domicile_title 
					value = scope:rk_the_red_keep_domicile_title 
				} 
			}			
			domicile = { add_domicile_building = rk_throne_room_01 }				
			domicile = { add_domicile_building = rk_maegors_keep_01 }	
			domicile = { add_domicile_building = rk_tower_hand_01 }	
			domicile = { add_domicile_building = white_sword_tower_01 }	
			domicile = { add_domicile_building = royal_sept_01 }	
			domicile = { add_domicile_building = rk_outer_courtyard_01 }
			domicile = { add_domicile_building = rk_maesters_turret_01 }			
			domicile = { add_domicile_building = rk_royal_gardens_01 }	
			domicile = { add_domicile_building = rk_market_01 }		
			domicile = { add_domicile_building = rk_gatehouse_01 }	
			domicile = { add_domicile_building = rk_royal_stables_01 }	
			domicile = { add_domicile_building = rk_godswood_01 }	
			domicile = { add_domicile_building = rk_port_01 }			
		}
			
	}
	option = { 
		name = rk_kings_landing.0001.a
		hidden_effect = {
			trigger_event = {
				id = rk_maintenance.0001 
				days = 5
			}
		}
	}
}


### Maintenance 

rk_maintenance.001 = {
	hidden = yes
	type = character_event
	trigger = {
		has_title = title:c_kings_landing
	}
	immediate = {
		if = {
			limit = {
				NOT = {
					OR = {
						has_character_modifier = rk_kingsguard_honor_1
						has_character_modifier = rk_kingsguard_honor_2
						has_character_modifier = rk_kingsguard_honor_3
						has_character_modifier = rk_kingsguard_honor_4
						has_character_modifier = rk_kingsguard_honor_5						
					}
				}
			}
			add_character_modifier = rk_kingsguard_honor_3
		}
	}
}


#Event to regain Red Keep Domicile
######################################

rk_kings_landing.0002 = {
	hidden = yes
	trigger = {
		has_title = title:b_the_red_keep
	}	
	immediate = {
		hidden_effect = {
			create_title_and_vassal_change = {
				type = created
				save_scope_as = title_change
				add_claim_on_loss = no
			}
			title:b_the_red_keep.var:rk_domicile_title = {
				change_title_holder = {
					holder = root
					change = scope:title_change
				}
			}
			resolve_title_and_vassal_change = scope:title_change	
		}			
	}
}

#Famine Events
##############################################################################################################################################################################

rk_famine.0001 = { #Event to reduce food supplies
	hidden = yes
	immediate = {
		if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_well_fed
				}
			}
			send_interface_toast = {
				type = event_toast_effect_bad
				title = rk_descend_population_now_sufficiently_fed_title
				custom_tooltip = rk_descend_population_now_sufficiently_fed_desc				
				left_icon = cp:councillor_castellan
				title:c_kings_landing = {
					remove_county_modifier = rk_well_fed
					add_county_modifier = rk_sufficiently_fed
				}
			}			
		}
		else_if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_sufficiently_fed
				}
			}			
			send_interface_toast = {
				type = event_toast_effect_bad
				title = rk_descend_food_supply_strained_title
				custom_tooltip = rk_descend_food_supply_strained_desc				
				left_icon = cp:councillor_castellan
				title:c_kings_landing = {
					remove_county_modifier = rk_sufficiently_fed
					add_county_modifier = rk_food_strained
				}
			}				
		}
		else_if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_food_strained
				}
			}	
			send_interface_toast = {
				type = event_toast_effect_bad
				title = rk_descend_food_supply_hungry_title
				custom_tooltip = rk_descend_food_supply_hungry_desc				
				left_icon = cp:councillor_castellan
				title:c_kings_landing = {
					remove_county_modifier = rk_food_strained
					add_county_modifier = rk_hungry_population
				}
			}		
		}	
		else_if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_hungry_population
				}
			}	
			title:c_kings_landing = {
				remove_county_modifier = rk_hungry_population
				add_county_modifier = rk_starving_population
			}
			send_interface_toast = {
				type = event_toast_effect_bad
				title = rk_remain_population_now_starving_title
				custom_tooltip = rk_remain_population_now_starving_desc				
				left_icon = cp:councillor_castellan
				title:c_kings_landing = {
					remove_county_modifier = rk_hungry_population
					add_county_modifier = rk_starving_population
				}
			}			
		}
		else_if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_starving_population
				}
			}	
			title:c_kings_landing = {
				remove_county_modifier = rk_starving_population
				add_county_modifier = rk_starving_population
			}
			send_interface_toast = {
				type = event_toast_effect_bad
				title = rk_remain_population_now_starving_title
				custom_tooltip = rk_remain_population_now_starving_desc				
				left_icon = cp:councillor_castellan
				title:c_kings_landing = {
					remove_county_modifier = rk_starving_population
					add_county_modifier = rk_starving_population
				}
			}				
		}		
		trigger_event = {
			id = rk_harvest.0001
			years = 2 #Revise**
		}			
	}
}

rk_famine.0002 = { #Event to remove the famine modifiers if the player loses King's Landing ###REVISE CAN BE SIMPLIED***
	hidden = yes
	immediate = {
		if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_well_fed
				}
			}	
			title:c_kings_landing = {
				remove_county_modifier = rk_well_fed
			}
		}
		else_if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_sufficiently_fed
				}
			}	
			title:c_kings_landing = {
				remove_county_modifier = rk_sufficiently_fed
			} 		
		}
		else_if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_food_strained
				}
			}	
			title:c_kings_landing = {
				remove_county_modifier = rk_food_strained
			}			
		}
		else_if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_hungry_population
				}
			}	
			title:c_kings_landing = {
				remove_county_modifier = rk_hungry_population
			}			
		}			
		else = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_starving_population
				}
			}	
			title:c_kings_landing = {
				remove_county_modifier = rk_starving_population
			}			
		}
        remove_global_variable  = rk_player_famines          		
	}
}

#Harvest Events
############################################################################################################################################################################

rk_harvest.0001 = { ### Harvest Type
	hidden = yes
    immediate = {
		random_list = {
			5 = { ## Bountyful harvest
				trigger_event = rk_harvest.0002
			}
			35 = { ## OK harvest
				trigger_event = rk_harvest.0003
			}
			60 = { ## bad harvest
				trigger_event = rk_harvest.0004
			}				
        }		
    }
}


rk_harvest.0002 = { ### Bountyful Harvest
	hidden = yes
	immediate = {
		if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_well_fed
				}
			}	
			send_interface_toast = {
				type = event_toast_effect_good
				title = rk_bounty_pop_well_fed_title
				custom_tooltip = rk_bounty_pop_well_fed_desc				
				left_icon = cp:councillor_castellan
				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_bounty_pop_well_fed_title
				custom_tooltip = rk_bounty_pop_well_fed_desc				
				left_icon = cp:councillor_castellan
				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_bounty_pop_well_fed_title
				custom_tooltip = rk_bounty_pop_well_fed_desc				
				left_icon = cp:councillor_castellan
				title:c_kings_landing = {
					remove_county_modifier = rk_food_strained
					add_county_modifier = rk_well_fed
				}
			}				
		}	
		else_if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_hungry_population
				}
			}	
			send_interface_toast = {
				type = event_toast_effect_good
				title = rk_bounty_pop_sufficiently_fed_title
				custom_tooltip = rk_bounty_pop_sufficiently_fed_desc				
				left_icon = cp:councillor_castellan
				title:c_kings_landing = {
					remove_county_modifier = rk_hungry_population
					add_county_modifier = rk_sufficiently_fed
				}
			}			
		}		
		else_if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_starving_population
				}
			}	
			send_interface_toast = {
				type = event_toast_effect_good
				title = rk_bounty_pop_strained_food_title
				custom_tooltip = rk_bounty_pop_strained_food_desc				
				left_icon = cp:councillor_castellan
				title:c_kings_landing = {
					remove_county_modifier = rk_starving_population
					add_county_modifier = rk_food_strained
				}
			}			
		}			
	}
}



rk_harvest.0003 = { ###OK Harvest
	hidden = yes
	immediate = {
		if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_well_fed
				}
			}	
			send_interface_toast = {
				type = event_toast_effect_good
				title = rk_ok_pop_well_fed_title
				custom_tooltip = rk_ok_pop_well_fed_desc				
				left_icon = cp:councillor_castellan
				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_ok_pop_well_fed_title
				custom_tooltip = rk_ok_pop_well_fed_desc				
				left_icon = cp:councillor_castellan
				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_ok_pop_sufficiently_fed_title
				custom_tooltip = rk_ok_pop_sufficiently_fed_desc				
				left_icon = cp:councillor_castellan
				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_ok_pop_strained_food_title
				custom_tooltip = rk_ok_pop_strained_food_desc				
				left_icon = cp:councillor_castellan
				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_ok_pop_hungry_title
				custom_tooltip = rk_ok_pop_hungry_desc				
				left_icon = cp:councillor_castellan
				title:c_kings_landing = {
					remove_county_modifier = rk_starving_population
					add_county_modifier = rk_hungry_population
				}
			}			
		}			
	}
}


rk_harvest.0004 = { ###Bad Harvest
	hidden = yes
	immediate = {
		if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_well_fed
				}
			}	
			send_interface_toast = {
				type = event_toast_effect_bad
				title = rk_bad_pop_well_fed_title
				custom_tooltip = rk_bad_pop_well_fed_desc				
				left_icon = cp:councillor_castellan
				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_bad
				title = rk_bad_pop_sufficiently_fed_title
				custom_tooltip = rk_bad_pop_sufficiently_fed_desc				
				left_icon = cp:councillor_castellan
				title:c_kings_landing = {
					remove_county_modifier = rk_sufficiently_fed
					add_county_modifier = rk_sufficiently_fed
				}
			}			
		}
		else_if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_food_strained
				}
			}	
			send_interface_toast = {
				type = event_toast_effect_bad
				title = rk_bad_pop_strained_food_title
				custom_tooltip = rk_bad_pop_strained_food_desc				
				left_icon = cp:councillor_castellan
				title:c_kings_landing = {
					remove_county_modifier = rk_food_strained
					add_county_modifier = rk_food_strained
				}
			}			
		}	
		else_if = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_hungry_population
				}
			}		
			send_interface_toast = {
				type = event_toast_effect_bad
				title = rk_bad_pop_hungry_title
				custom_tooltip = rk_bad_pop_hungry_desc				
				left_icon = cp:councillor_castellan
				title:c_kings_landing = {
					remove_county_modifier = rk_hungry_population
					add_county_modifier = rk_hungry_population
				}
			}				
		}		
		else = {
		    limit = {
				title:c_kings_landing = {
					has_county_modifier = rk_starving_population
				}
			}	
			send_interface_toast = {
				type = event_toast_effect_bad
				title = rk_bad_pop_starving_title
				custom_tooltip = rk_bad_pop_starving_desc	
				left_icon = cp:councillor_castellan
				title:c_kings_landing = {
					remove_county_modifier = rk_starving_population
					add_county_modifier = rk_starving_population
				}
			}				
		}			
	}
}


#City Watch Loyalty
##############################################################################################################################################################################


rk_crime.0001 = { #Loyal City Watch
	hidden = yes
	immediate = {
		send_interface_toast = {
			type = event_toast_effect_good
			title = rk_loyal_gk_title
			custom_tooltip = rk_loyal_gk_title_tt				
			left_icon = title:b_goldguard_heights.holder
			right_icon = cp:councillor_spymaster
			add_character_modifier = rk_loyal_cw_commander 
		}
		hidden_effect = {
			remove_character_modifier = rk_disloyal_cw_commander
		}
	}
}	


rk_crime.0002 = { #Disloyal City Watch
	hidden = yes
	immediate = {
		send_interface_toast = {
			type = event_toast_effect_bad
			title = rk_disloyal_gk_title
			custom_tooltip = rk_disloyal_gk_title_tt				
			left_icon = title:b_goldguard_heights.holder
			right_icon = cp:councillor_spymaster			
			add_character_modifier = rk_disloyal_cw_commander 
		}
		hidden_effect = {
			remove_character_modifier = rk_loyal_cw_commander
		}
	}
}

rk_crime.0003 = { #Neutral City Watch
	hidden = yes
	immediate = {
		send_interface_toast = {
			title = rk_neutral_gk_title
			custom_tooltip = rk_neutral_gk_title_tt				
			left_icon = title:b_goldguard_heights.holder
			right_icon = cp:councillor_spymaster	
		}
		hidden_effect = {
			remove_character_modifier = rk_disloyal_cw_commander
			remove_character_modifier = rk_loyal_cw_commander
		}
	}
}

rk_crime.0004 = { #Remove traits if lose King's Landing
	hidden = yes
	immediate = {
		hidden_effect = {
			remove_character_modifier = rk_disloyal_cw_commander
			remove_character_modifier = rk_loyal_cw_commander
		}
	}
}


##### Blessing Events 


rk_blessing.0001 = { #Defence of Kings Landing
	type = character_event
	title = rk_blessing.0001.t
	desc = {
		desc = rk_blessing.0001.desc
	}		

	theme = rk_red_keep
	override_background = {
		reference = temple_church
	}

	left_portrait = {
		character = root
		animation = prayer	
	}
	right_portrait = {
		character = scope:rk_high_septon
		animation = chaplain
	}	
	
	trigger = {
		is_imprisoned = no
		is_incapable = no
		is_ai = no
		has_title = title:c_kings_landing
	}
	immediate = {
	    title:k_the_most_devout.holder = {
		    save_scope_as = rk_high_septon 
		}	
		add_stress = -10
	}	

	option = {  #
		name = rk_blessing.0001.a
		custom_tooltip = rk_blessing.0001.a_tt
		flavor = rk_blessing.0001.f
		stress_impact = {	
			zealous = minor_stress_loss
            cynical = minor_stress_gain 				
		}
		add_character_modifier = {
			modifier = rk_septon_blessing_modifier
			years = 5
		}
		add_legitimacy = 25
	}		
}

##### Guild Events

rk_guild.0001 = { #The Guilds
	type = character_event
	title = rk_guild.0001.t
	desc = {
		desc = rk_guild.0001.desc
	}		

	theme = rk_red_keep
	override_background = {
		reference = agot_iron_throne
	}

	left_portrait = {
		character = root
		animation = idle	
	}
	right_portrait = {
		character = scope:rk_guildmaster_01
		animation = idle
	}	
	immediate = {	
		create_character = {
				location = root.capital_province
				template = merchant_template
				gender_female_chance = 0
				save_scope_as = rk_guildmaster_01
		}	
		scope:rk_guildmaster_01 = {
			add_character_flag = rk_rich_merchant_2
		}
	}

	option = {  #
		name = rk_guild.0001.a
		custom_tooltip = rk_guild.0001.a_tt
		flavor = rk_guild.0001.a_f
		trigger_event = rk_guild.0002
		trigger = {
			NOT = {
				root = {has_character_flag = rk_decided_obligations}
			}
			NOT = {
				title:c_kings_landing = {
					OR = {
						has_county_modifier = rk_guild_privileges
						has_county_modifier = rk_free_city	
					}
				}
			}
		}
	}	
	option = {  #
		name = rk_guild.0001.b
		custom_tooltip = rk_guild.0001.b_tt
		flavor = rk_guild.0001.b_f
		trigger_event = rk_guild.0003		
		trigger = {
			NOT = {
				title:c_kings_landing = {
					OR = {
						has_county_modifier = rk_guilds_obligations
						has_county_modifier = rk_guilds_obligations_ease	
					}
				}
			}
		}		
	}	
	option = {  #
		name = rk_guild.0001.c
		custom_tooltip = rk_guild.0001.c_tt
		trigger_event = rk_guild.0004		
		flavor = rk_guild.0001.c_f
		trigger = {
			NOT = {
				has_character_flag = rk_decided_patronage
			}
		}
	}			
	option = {  #
		name = rk_guild.0001.e
		custom_tooltip = rk_guild.0001.e_tt
		flavor = rk_guild.0001.e_f
	}		
}


rk_guild.0002 = { #The Guilds
	type = character_event
	title = rk_guild.0002.t
	desc = {
		desc = rk_guild.0002.desc
	}		

	theme = rk_red_keep
	override_background = {
		reference = agot_iron_throne
	}

	left_portrait = {
		character = root
		animation = idle	
	}
	right_portrait = {
		character = scope:rk_guildmaster_01
		animation = idle
	}	

	option = {  # Privileges
		name = rk_guild.0002.a
		custom_tooltip = rk_guild.0002.a_tt
		flavor = rk_guild.0002.a_f
		title:c_kings_landing = {
			add_county_modifier = {
				modifier = rk_guild_privileges
				years = 20
			}
		}
		trigger_event = rk_guild.0001
	}	
	option = {  # Free City
		name = rk_guild.0002.b
		custom_tooltip = rk_guild.0002.b_tt
		flavor = rk_guild.0002.b_f
		title:c_kings_landing = {
			add_county_modifier = {
				modifier = rk_free_city
				years = 20
			}
		}
		trigger_event = rk_guild.0001		
	}		
}

rk_guild.0003 = { #The Guilds
	type = character_event
	title = rk_guild.0003.t
	desc = {
		desc = rk_guild.0003.desc
	}		
	
	theme = rk_red_keep
	override_background = {
		reference = agot_iron_throne
	}

	left_portrait = {
		character = root
		animation = idle	
	}
	right_portrait = {
		character = scope:rk_guildmaster_01
		animation = idle
	}	
	immediate = {
		add_character_flag = rk_decided_obligations
	}
	option = {  # Privileges
		name = rk_guild.0003.a
		custom_tooltip = rk_guild.0003.a_tt
		flavor = rk_guild.0003.a_f
		title:c_kings_landing = {
			add_county_modifier = {
				modifier = rk_guilds_obligations
				years = 20
			}
		}
		trigger_event = rk_guild.0001
	}	
	option = {  # Free City
		name = rk_guild.0003.b
		custom_tooltip = rk_guild.0003.b_tt
		flavor = rk_guild.0003.b_f
		title:c_kings_landing = {
			add_county_modifier = {
				modifier = rk_guilds_obligations_ease
				years = 20
			}
		}
		trigger_event = rk_guild.0001		
	}		
}

rk_guild.0004 = { #The Guilds
	type = character_event
	title = rk_guild.0004.t
	desc = {
		desc = rk_guild.0004.desc
	}		

	theme = rk_red_keep
	override_background = {
		reference = agot_iron_throne
	}
	immediate = {
		add_character_flag = rk_decided_patronage
	}

	left_portrait = {
		character = root
		animation = idle	
	}
	right_portrait = {
		character = scope:rk_guildmaster_01
		animation = idle
	}	

	option = {  # 
		name = rk_guild.0004.a
		custom_tooltip = rk_guild.0004.a_tt
		flavor = rk_guild.0004.a_f
		remove_short_term_gold = 300
		add_character_modifier = {
			modifier = rk_guild_support
			years = 20
		}	
		trigger_event = rk_guild.0001
	}	
	option = {  # 
		name = rk_guild.0004.b
		custom_tooltip = rk_guild.0004.b_tt
		flavor = rk_guild.0004.b_f
		remove_short_term_gold = 300
		add_character_modifier = {
			modifier = rk_art_support
			years = 20
		}		
		trigger_event = rk_guild.0001		
	}		
}


#####################################################################
##### GOLDCLOACKS #####################################################################################################################################################################################################
#####################################################################

rk_gc.0001 = { #Summon the Lord Commander of the City Watch
	type = character_event
	title = rk_gc.0001.t
	desc = rk_gc.0001.desc
	theme = rk_red_keep
	override_background = { 
		reference = agot_iron_throne
	}
	right_portrait = {
		character = root
		animation = idle
	}
	left_portrait = {
		character = scope:rk_gk_commander
		animation = marshal
	}
	immediate = {
		title:b_goldguard_heights.holder = {
			save_scope_as = rk_gk_commander
		}
		scope:rk_gk_commander = {
			add_character_flag = rk_gc_commander_outfit
		}
	}
	option = { #Order a Crackdown
		name = rk_gc.0001.a
		custom_tooltip = rk_gc.0001.a_tt
		flavor = rk_gc.0001.a_f
		trigger = {
			title:c_kings_landing = {
				AND = {
					OR = {			
						has_county_modifier = rk_kidnappings
						has_county_modifier = rk_arson
						has_county_modifier = rk_smugglers_coup
						has_county_modifier = rk_black_market
						has_county_modifier = rk_counterfeit_coin
						has_county_modifier = rk_secret_syndicate
						has_county_modifier = rk_gang_wars
						has_county_modifier = rk_random_revolts
						has_county_modifier = rk_bribery_rampant
						has_county_modifier = rk_murder_spree
						has_county_modifier = rk_cult_activity
						has_county_modifier = rk_dock_strikes
						has_county_modifier = rk_tavern_brawls
						has_county_modifier = rk_sewer_corpses
						has_county_modifier = rk_silk_street_scandals
						has_county_modifier = rk_shakedowns
						has_county_modifier = rk_coin_clipping		
						has_county_modifier = rk_warehouse_fires	
						has_county_modifier = rk_food_riots						
					}	
					NOT = {
						has_county_modifier = rk_city_watch_neglected
						has_county_modifier = rk_city_watch_corrupt
						#has_county_modifier = rk_gc_crackdown                      ##########ENABLE !!! ** REVISE
					}
				}
			}
		}
		add_piety = -50
		hidden_effect = {
			send_interface_toast = {
				title = rk_gc.0001.a_toast
				left_icon = root
				add_dread = 5
				add_prestige = 50
				title:c_kings_landing = {
					add_county_modifier = {
						modifier = rk_gc_crackdown
						years = 1
					}
				}
				title:c_kings_landing = {
					if = {
						limit = {
							has_county_modifier = rk_kidnappings
						}
						remove_county_modifier = rk_kidnappings
					}
					else_if = {
						limit = {
							has_county_modifier = rk_arson
						}
						remove_county_modifier = rk_arson
					}
					else_if = {
						limit = {
							has_county_modifier = rk_smugglers_coup
						}
						remove_county_modifier = rk_smugglers_coup
					}
					else_if = {
						limit = {
							has_county_modifier = rk_black_market
						}
						remove_county_modifier = rk_black_market
					}
					else_if = {
						limit = {
							has_county_modifier = rk_counterfeit_coin
						}
						remove_county_modifier = rk_counterfeit_coin
					}
					else_if = {
						limit = {
							has_county_modifier = rk_secret_syndicate
						}
						remove_county_modifier = rk_secret_syndicate
					}
					else_if = {
						limit = {
							has_county_modifier = rk_gang_wars
						}
						remove_county_modifier = rk_gang_wars
					}
					else_if = {
						limit = {
							has_county_modifier = rk_bribery_rampant
						}
						remove_county_modifier = rk_bribery_rampant
					}
					else_if = {
						limit = {
							has_county_modifier = rk_murder_spree
						}
						remove_county_modifier = rk_murder_spree
					}
					else_if = {
						limit = {
							has_county_modifier = rk_cult_activity
						}
						remove_county_modifier = rk_cult_activity
					}
					else_if = {
						limit = {
							has_county_modifier = rk_dock_strikes
						}
						remove_county_modifier = rk_dock_strikes
					}					
					else_if = {
						limit = {
							has_county_modifier = rk_tavern_brawls
						}
						remove_county_modifier = rk_tavern_brawls
					}
					else_if = {
						limit = {
							has_county_modifier = rk_sewer_corpses
						}
						remove_county_modifier = rk_sewer_corpses
					}
					else_if = {
						limit = {
							has_county_modifier = rk_silk_street_scandals
						}
						remove_county_modifier = rk_silk_street_scandals
					}
					else_if = {
						limit = {
							has_county_modifier = rk_coin_clipping
						}
						remove_county_modifier = rk_coin_clipping
					}
					else_if = {
						limit = {
							has_county_modifier = rk_warehouse_fires
						}
						remove_county_modifier = rk_warehouse_fires
					}
					else_if = {
						limit = {
							has_county_modifier = rk_food_riots
						}
						remove_county_modifier = rk_food_riots
					}					
				}
			}					
		}		
	}
	option = { #Increase Funding
		name = rk_gc.0001.b
		custom_tooltip = rk_gc.0001.b_tt
		flavor = rk_gc.0001.b_f
		trigger = {
			NOT = {
				title:c_kings_landing = {
					OR = {
						has_county_modifier = rk_city_watch_well_funded
						has_county_modifier = rk_city_watch_corrupt
					}
				}
			}
		}
		send_interface_toast = {
			title = rk_gc.0001.b_toast
			left_icon = root
			remove_short_term_gold = 150				
			title:c_kings_landing = {
				if = {
					limit = {
						has_county_modifier = rk_city_watch_neglected
					}
					remove_county_modifier = rk_city_watch_neglected
					add_county_modifier = rk_city_watch_funded
				}
				else_if = {
					limit = {
						has_county_modifier = rk_city_watch_funded
					}
					
					remove_county_modifier = rk_city_watch_funded
					add_county_modifier = rk_city_watch_well_funded
				}					
			}
		}						
	}
	option = { #Decrease Funding
		name = rk_gc.0001.c
		custom_tooltip = rk_gc.0001.c_tt
		flavor = rk_gc.0001.c_f
		trigger = {
			NOT = {
				title:c_kings_landing = {
					OR = {
						has_county_modifier = rk_city_watch_neglected
						has_county_modifier = rk_city_watch_corrupt
					}
				}
			}
		}
		send_interface_toast = {
			title = rk_gc.0001.c_toast
			left_icon = root
			title:c_kings_landing = {
				if = {
					limit = {
						has_county_modifier = rk_city_watch_well_funded
					}
					remove_county_modifier = rk_city_watch_well_funded
					add_county_modifier = rk_city_watch_funded
				}
				else_if = {
					limit = {
						has_county_modifier = rk_city_watch_funded
					}
					
					remove_county_modifier = rk_city_watch_funded
					add_county_modifier = rk_city_watch_neglected
				}					
			}
		}							
	}
	option = { #Purge the City Watch
		name = rk_gc.0001.d
		custom_tooltip = rk_gc.0001.d_tt
		flavor = rk_gc.0001.d_f
		trigger = {
			title:c_kings_landing = {
				has_county_modifier = rk_city_watch_corrupt
			}
		}
		hidden_effect = {
			send_interface_toast = {
				title = rk_gc.0001.d_toast
				left_icon = root
				type = event_toast_effect_good	
				title:c_kings_landing = {
					if = {
						limit = {
							has_county_modifier = rk_city_watch_corrupt
						}
						remove_county_modifier = rk_city_watch_corrupt
						add_county_modifier = rk_city_watch_neglected
					}					
				}
			}					
		}		
	}
	option = { #Fire the City Watch Commander
		name = rk_gc.0001.e
		custom_tooltip = rk_gc.0001.e_tt
		flavor = rk_gc.0001.e_f
		send_interface_toast = {
			title = rk_gc.0001.e_toast
			left_icon = scope:rk_gk_commander
			title:b_goldguard_heights.holder = {
				add_opinion = {
					modifier = angry_opinion
					opinion = -50				
					target = root
				}			
			}				
			create_title_and_vassal_change = {
				type = granted
				save_scope_as = change
				add_claim_on_loss = no
			}		
			title:b_goldguard_heights = {
				change_title_holder = {
					holder = root
					change = scope:change
				}			
			}
			resolve_title_and_vassal_change = scope:change						
		}		
	}	
	option = { #Collect a special Tithe
		name = rk_gc.0001.f
		custom_tooltip = rk_gc.0001.f_tt
		flavor = rk_gc.0001.f_f
		trigger = {
			title:c_kings_landing = {
				NOT = {
					has_county_modifier = rk_gc_tithe
				}
			}
		}
		stress_impact = {
			greedy = minor_stress_loss
			generous = minor_stress_gain
			just = minor_stress_gain
		}
		send_interface_toast = {
			title = rk_gc.0001.f_toast
			left_icon = scope:rk_gk_commander	
			title:c_kings_landing = {
				add_county_modifier = {
					modifier = rk_gc_tithe
					years = 5
				}
			}	
			add_short_term_gold = 200
			add_dread = 2
			add_tyranny = 5
		}		
	}	
	option = { #Thank You 
		name = rk_gc.0001.g
		custom_tooltip = rk_gc.0001.g_tt
		flavor = rk_gc.0001.g_f		
	}	
}


rk_gc.0002 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = {
			save_scope_as = rk_gk_commander
		}
		send_interface_toast = {
			title = rk_kidnappings
			custom_tooltip = rk_kidnappings_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad	
			title:c_kings_landing = {
				add_county_modifier = {
					modifier = rk_kidnappings
					years = 5
				}
			}			
		}		
	}
}

rk_gc.0003 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = {
			save_scope_as = rk_gk_commander
		}
		send_interface_toast = {
			title = rk_arson
			custom_tooltip = rk_arson_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad	
			title:c_kings_landing = {
				add_county_modifier = {
					modifier = rk_arson
					years = 5
				}
			}			
		}		
	}
}

rk_gc.0004 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = {
			save_scope_as = rk_gk_commander
		}
		send_interface_toast = {
			title = rk_smugglers_coup
			custom_tooltip = rk_smugglers_coup_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad	
			title:c_kings_landing = {
				add_county_modifier = {
					modifier = rk_smugglers_coup
					years = 5
				}
			}			
		}		
	}
}

rk_gc.0005 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = {
			save_scope_as = rk_gk_commander
		}
		send_interface_toast = {
			title = rk_black_market
			custom_tooltip = rk_black_market_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad	
			title:c_kings_landing = {
				add_county_modifier = {
					modifier = rk_black_market
					years = 5
				}
			}			
		}		
	}
}

rk_gc.0006 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = {
			save_scope_as = rk_gk_commander
		}
		send_interface_toast = {
			title = rk_counterfeit_coin
			custom_tooltip = rk_counterfeit_coin_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad	
			title:c_kings_landing = {
				add_county_modifier = {
					modifier = rk_counterfeit_coin
					years = 5
				}
			}			
		}		
	}
}


rk_gc.0007 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = {
			save_scope_as = rk_gk_commander
		}
		send_interface_toast = {
			title = rk_secret_syndicate
			custom_tooltip = rk_secret_syndicate_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad	
			title:c_kings_landing = {
				add_county_modifier = {
					modifier = rk_secret_syndicate
					years = 5
				}
			}			
		}		
	}
}

rk_gc.0008 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = {
			save_scope_as = rk_gk_commander
		}
		send_interface_toast = {
			title = rk_gang_wars
			custom_tooltip = rk_gang_wars_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad	
			title:c_kings_landing = {
				add_county_modifier = {
					modifier = rk_gang_wars
					years = 5
				}
			}			
		}		
	}
}

rk_gc.0009 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = {
			save_scope_as = rk_gk_commander
		}
		send_interface_toast = {
			title = rk_random_revolts
			custom_tooltip = rk_random_revolts_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad	
			title:c_kings_landing = {
				add_county_modifier = {
					modifier = rk_random_revolts
					years = 5
				}
			}			
		}		
	}
}

rk_gc.0010 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = {
			save_scope_as = rk_gk_commander
		}
		send_interface_toast = {
			title = rk_bribery_rampant
			custom_tooltip = rk_bribery_rampant_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad	
			title:c_kings_landing = {
				add_county_modifier = {
					modifier = rk_bribery_rampant
					years = 5
				}
			}			
		}		
	}
}

rk_gc.0011 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = {
			save_scope_as = rk_gk_commander
		}
		send_interface_toast = {
			title = rk_murder_spree
			custom_tooltip = rk_murder_spree_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad	
			title:c_kings_landing = {
				add_county_modifier = {
					modifier = rk_murder_spree
					years = 5
				}
			}			
		}		
	}
}

rk_gc.0012 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = {
			save_scope_as = rk_gk_commander
		}
		send_interface_toast = {
			title = rk_cult_activity
			custom_tooltip = rk_cult_activity_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad	
			title:c_kings_landing = {
				add_county_modifier = {
					modifier = rk_cult_activity
					years = 5
				}
			}			
		}		
	}
}


rk_gc.0013 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = { save_scope_as = rk_gk_commander }
		send_interface_toast = {
			title = rk_food_riots
			custom_tooltip = rk_food_riots_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad
			title:c_kings_landing = {
				add_county_modifier = { modifier = rk_food_riots years = 5 }
			}
		}
	}
}

rk_gc.0014 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = { save_scope_as = rk_gk_commander }
		send_interface_toast = {
			title = rk_dock_strikes
			custom_tooltip = rk_dock_strikes_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad
			title:c_kings_landing = {
				add_county_modifier = { modifier = rk_dock_strikes years = 5 }
			}
		}
	}
}

rk_gc.0015 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = { save_scope_as = rk_gk_commander }
		send_interface_toast = {
			title = rk_tavern_brawls
			custom_tooltip = rk_tavern_brawls_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad
			title:c_kings_landing = {
				add_county_modifier = { modifier = rk_tavern_brawls years = 5 }
			}
		}
	}
}

rk_gc.0016 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = { save_scope_as = rk_gk_commander }
		send_interface_toast = {
			title = rk_sewer_corpses
			custom_tooltip = rk_sewer_corpses_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad
			title:c_kings_landing = {
				add_county_modifier = { modifier = rk_sewer_corpses years = 5 }
			}
		}
	}
}

rk_gc.0017 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = { save_scope_as = rk_gk_commander }
		send_interface_toast = {
			title = rk_silk_street_scandals
			custom_tooltip = rk_silk_street_scandals_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad
			title:c_kings_landing = {
				add_county_modifier = { modifier = rk_silk_street_scandals years = 5 }
			}
		}
	}
}

rk_gc.0018 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = { save_scope_as = rk_gk_commander }
		send_interface_toast = {
			title = rk_shakedowns
			custom_tooltip = rk_shakedowns_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad
			title:c_kings_landing = {
				add_county_modifier = { modifier = rk_shakedowns years = 5 }
			}
		}
	}
}

rk_gc.0019 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = { save_scope_as = rk_gk_commander }
		send_interface_toast = {
			title = rk_coin_clipping
			custom_tooltip = rk_coin_clipping_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad
			title:c_kings_landing = {
				add_county_modifier = { modifier = rk_coin_clipping years = 5 }
			}
		}
	}
}

rk_gc.0020 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = { save_scope_as = rk_gk_commander }
		send_interface_toast = {
			title = rk_warehouse_fires
			custom_tooltip = rk_warehouse_fires_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad
			title:c_kings_landing = {
				add_county_modifier = { modifier = rk_warehouse_fires years = 5 }
			}
		}
	}
}


##### City Watch Corruption Events

rk_gc.0021 = {
	hidden = yes
	immediate = {
		title:b_goldguard_heights.holder = { save_scope_as = rk_gk_commander }
		send_interface_toast = {
			title = rk_gc.0021.toast
			custom_tooltip = rk_gc.0021.toast_desc
			left_icon = scope:rk_gk_commander
			type = event_toast_effect_bad
				title:c_kings_landing = {
					if = {
						limit = {
							has_county_modifier = rk_city_watch_neglected
						}
						remove_county_modifier = rk_city_watch_neglected
						add_county_modifier = rk_city_watch_corrupt
					}
					else_if = {
						limit = {
							has_county_modifier = rk_city_watch_funded
						}
						
						remove_county_modifier = rk_city_watch_funded
						add_county_modifier = rk_city_watch_corrupt
					}
					else_if = {
						limit = {
							has_county_modifier = rk_city_watch_well_funded
						}
						
						remove_county_modifier = rk_city_watch_well_funded
						add_county_modifier = rk_city_watch_corrupt
					}					
				}
		}
	}
}





############################## SANITATION ################################


rk_sanitation.0001 = { #The City Stench
	type = character_event
	title = rk_sanitation.0001.t
	desc = rk_sanitation.0001.desc
	trigger = {
		has_title = title:c_kings_landing
	}	
	theme = rk_red_keep
	override_background = {
		reference = rk_hands_room
	}
	
	left_portrait = {
		character = root
		animation = disgust	
	}
	
	immediate = {
		add_stress = 5
		add_character_flag = rk_had_city_stench
	}	

	option = {  #
		name = rk_sanitation.0001.a
		custom_tooltip = rk_sanitation.0001.a_tt
		stress_impact = {
			diligent = minor_stress_loss
		}
		trigger_event = rk_sanitation.0002
	}	
	option = {  #
		name = rk_sanitation.0001.b
		custom_tooltip = rk_sanitation.0001.b_tt
		stress_impact = {
			lazy = minor_stress_gain
		}		
	}		
}

rk_sanitation.0002 = { #The City Stench
	type = character_event
	title = rk_sanitation.0002.t
	desc = rk_sanitation.0002.desc
	trigger = {
		has_title = title:c_kings_landing
	}	
	theme = rk_red_keep
	override_background = {
		reference = rk_hands_room
	}
	
	right_portrait = {
		character = root
		animation = disgust	
	}
	left_portrait = {
		character = scope:rk_hand
		animation = throne_room_conversation_1
	}		
	immediate = {	
		cp:councillor_castellan = {
			save_scope_as = rk_hand
		}
	}	

	option = {  #
		name = rk_sanitation.0002.a
		custom_tooltip = rk_sanitation.0002.a_tt
		remove_short_term_gold = 25
		stress_impact = {
			impatient = minor_stress_gain
			patient = minor_stress_loss
			diligent = minor_stress_loss
		}	
		trigger_event = {
			id = rk_sanitation.0004
			months = 3
		}
	}
	option = {  #
		name = rk_sanitation.0002.b
		custom_tooltip = rk_sanitation.0002.b_tt
		remove_short_term_gold = 100
		trigger_event = {
			id = rk_sanitation.0003
			months = 12
		}
		stress_impact = {
			impatient = minor_stress_loss
			patient = minor_stress_gain
		}
	}
	option = {  #
		name = rk_sanitation.0002.c
		custom_tooltip = rk_sanitation.0002.c_tt
	}	
}

rk_sanitation.0003 = { #The City Stench
	type = character_event
	title = rk_sanitation.0003.t
	desc = rk_sanitation.0003.desc
	trigger = {
		has_title = title:c_kings_landing
	}	
	theme = rk_red_keep
	override_background = {
		reference = rk_hands_room
	}
	
	left_portrait = {
		character = root
		animation = disgust	
	}
	
	immediate = {
		title:c_kings_landing = {
			add_county_modifier = {
				modifier = rk_sanitation_effort
				years = 5
			}
		}
	}	

	option = {  #
		name = rk_sanitation.0003.a
		custom_tooltip = rk_sanitation.0003.a_tt
		flavor = rk_sanitation.0003.f
	}	
}

rk_sanitation.0004 = { #The City Stench
	type = character_event
	title = rk_sanitation.0004.t
	desc = rk_sanitation.0004.desc
	trigger = {
		has_title = title:c_kings_landing
	}
	theme = rk_red_keep
	override_background = {
		reference = rk_hands_room
	}
	left_portrait = {
		character = scope:rk_hand
		animation = throne_room_conversation_1	
	}	
	right_portrait = {
		character = root
		animation = page_flipping	
	}
	
	immediate = {	
		cp:councillor_castellan = {
			save_scope_as = rk_hand
		}
	}

	option = {  #
		name = rk_sanitation.0004.a
		custom_tooltip = rk_sanitation.0004.a_tt
		title:c_kings_landing = {
			remove_county_modifier = rk_kl_stench_1
			add_county_modifier = rk_kl_stench_2
		}
		trigger_event = {
			id = rk_sanitation.0005
			months = 6
		}		
	}
	option = {  #
		name = rk_sanitation.0004.b
		custom_tooltip = rk_sanitation.0004.b_tt
		trigger_event = {
			id = rk_sanitation.0005
			months = 6
		}
	}	
}

rk_sanitation.0005 = { #The City Stench
	type = character_event
	title = rk_sanitation.0005.t
	desc = rk_sanitation.0005.desc
	trigger = {
		has_title = title:c_kings_landing
	}	
	theme = rk_red_keep
	override_background = {
		reference = rk_hands_room
	}
	left_portrait = {
		character = scope:rk_hand
		animation = throne_room_conversation_1	
	}	
	right_portrait = {
		character = root
		animation = page_flipping		
	}
	
	immediate = {	
		cp:councillor_castellan = {
			save_scope_as = rk_hand
		}
	}	

	option = {  #
		name = rk_sanitation.0005.a
		custom_tooltip = rk_sanitation.0005.a_tt
		remove_short_term_gold = 500
		title:c_kings_landing = {
			if = {
				limit = {
					has_county_modifier = rk_kl_stench_1
				}
				remove_county_modifier = rk_kl_stench_1
				add_county_modifier = rk_kl_stench_3
			}
			else_if = {
				limit = {
					has_county_modifier = rk_kl_stench_2
				}
				remove_county_modifier = rk_kl_stench_2
				add_county_modifier = rk_kl_stench_4
			}				
		}
		trigger_event = {
			id = rk_sanitation.0006
			months = 8
		}		
	}	
	option = {  #
		name = rk_sanitation.0005.b
		custom_tooltip = rk_sanitation.0005.b_tt
		remove_short_term_gold = 250	
		title:c_kings_landing = {
			if = {
				limit = {
					has_county_modifier = rk_kl_stench_1
				}
				remove_county_modifier = rk_kl_stench_1
				add_county_modifier = rk_kl_stench_2
			}
			else_if = {
				limit = {
					has_county_modifier = rk_kl_stench_2
				}
				remove_county_modifier = rk_kl_stench_2
				add_county_modifier = rk_kl_stench_3
			}				
		}
		trigger_event = {
			id = rk_sanitation.0006
			months = 8
		}		
	}
	option = {  #
		name = rk_sanitation.0005.c
		custom_tooltip = rk_sanitation.0005.c_tt
		trigger_event = {
			id = rk_sanitation.0006
			months = 8
		}	
	}	
}

rk_sanitation.0006 = { #Sanitation Event
	type = character_event
	title = rk_sanitation.0006.t
	desc = rk_sanitation.0006.desc
	trigger = {
		has_title = title:c_kings_landing
	}	
	theme = rk_red_keep
	override_background = {
		reference = rk_hands_room
	}
	
	left_portrait = {
		character = scope:rk_hand
		animation = throne_room_conversation_1	
	}	
	right_portrait = {
		character = root
		animation = page_flipping		
	}
	
	immediate = {	
		cp:councillor_castellan = {
			save_scope_as = rk_hand
		}
	}	

	option = {  #
		name = rk_sanitation.0006.a
		custom_tooltip = rk_sanitation.0006.a_tt
		remove_short_term_gold = 500
		trigger_event = {
			id = rk_sanitation.0007
			months = 8
		}
		title:c_kings_landing = {
			add_county_modifier = {
				modifier = rk_slum_destruction
				years = 5
			}
			change_development_level = -1
			if = {
				limit = {
					has_county_modifier = rk_kl_stench_1
				}
				remove_county_modifier = rk_kl_stench_1
				add_county_modifier = rk_kl_stench_2
			}
			else_if = {
				limit = {
					has_county_modifier = rk_kl_stench_2
				}
				remove_county_modifier = rk_kl_stench_2
				add_county_modifier = rk_kl_stench_3
			}	
			else_if = {
				limit = {
					has_county_modifier = rk_kl_stench_3
				}
				remove_county_modifier = rk_kl_stench_3
				add_county_modifier = rk_kl_stench_4
			}
			else_if = {
				limit = {
					has_county_modifier = rk_kl_stench_4
				}
				remove_county_modifier = rk_kl_stench_4
				add_county_modifier = rk_kl_stench_5
			}			
		}		
	}
	option = {  #
		name = rk_sanitation.0006.b
		custom_tooltip = rk_sanitation.0006.b_tt
		trigger_event = {
			id = rk_sanitation.0007
			months = 8
		}		
	}	
}

rk_sanitation.0007 = { #Sanitation Event
	type = character_event
	title = rk_sanitation.0007.t
	desc = rk_sanitation.0007.desc
	trigger = {
		has_title = title:c_kings_landing
	}	
	theme = rk_red_keep
	override_background = {
		reference = rk_hands_room
	}
	
	left_portrait = {
		character = scope:rk_hand
		animation = throne_room_conversation_1	
	}	
	right_portrait = {
		character = root
		animation = page_flipping		
	}
	
	immediate = {	
		cp:councillor_castellan = {
			save_scope_as = rk_hand
		}
	}	
	

	option = {  #
		name = rk_sanitation.0007.a
		custom_tooltip = rk_sanitation.0007.a_tt
		remove_short_term_gold = 500
		trigger_event = {
			id = rk_sanitation.0008
			months = 2
		}		
	}	
	option = {  #
		name = rk_sanitation.0007.b
		custom_tooltip = rk_sanitation.0007.b_tt
		remove_short_term_gold = 250		
		hidden_effect = {
			send_interface_toast = {
				title = rk_sanitation.0007.b_toast
				left_icon = scope:rk_hand
				type = event_toast_effect_good	
				title:c_kings_landing = {
					if = {
						limit = {
							has_county_modifier = rk_kl_stench_1
						}
						remove_county_modifier = rk_kl_stench_1
						add_county_modifier = rk_kl_stench_2
					}
					else_if = {
						limit = {
							has_county_modifier = rk_kl_stench_2
						}
						remove_county_modifier = rk_kl_stench_2
						add_county_modifier = rk_kl_stench_3
					}	
					else_if = {
						limit = {
							has_county_modifier = rk_kl_stench_3
						}
						remove_county_modifier = rk_kl_stench_3
						add_county_modifier = rk_kl_stench_4
					}
					else_if = {
						limit = {
							has_county_modifier = rk_kl_stench_4
						}
						remove_county_modifier = rk_kl_stench_4
						add_county_modifier = rk_kl_stench_5
					}
					else_if = {
						limit = {
							has_county_modifier = rk_kl_stench_4
						}
						remove_county_modifier = rk_kl_stench_5
						add_county_modifier = rk_kl_stench_6
					}				
				}			
			}					
		}
	}	
	option = {  #
		name = rk_sanitation.0007.c
		custom_tooltip = rk_sanitation.0007.c_tt		
	}		
}

rk_sanitation.0008 = { #Sanitation Event
	type = character_event
	title = rk_sanitation.0008.t
	desc = rk_sanitation.0008.desc
	trigger = {
		has_title = title:c_kings_landing
	}	
	theme = rk_red_keep
	override_background = {
		reference = agot_iron_throne
	}
	
	left_portrait = {
		character = scope:rk_braavosi_architect
		animation = idle	
	}	
	right_portrait = {
		character = root
		animation = idle		
	}
	
	immediate = {	
		cp:councillor_castellan = {
			save_scope_as = rk_hand
		}
		create_character = {
				location = root.capital_province
				template = rk_braavosi_architect
				gender_female_chance = 0
				save_scope_as = rk_braavosi_architect
		}	
		scope:rk_braavosi_architect = {
			add_character_flag = rk_bravo_outfit_1
		}
		hidden_effect = {
			add_courtier = scope:rk_braavosi_architect		
		}
	}

	option = {  #
		name = rk_sanitation.0008.a
		custom_tooltip = rk_sanitation.0008.a_tt
		add_character_modifier = {
			modifier = rk_braavosi_assistance
		}
		trigger_event = {
			id = rk_sanitation.0009
			months = 8
		}		
	}		
}

rk_sanitation.0009 = { #Sanitation Event
	type = character_event
	title = rk_sanitation.0009.t
	desc = rk_sanitation.0009.desc
	trigger = {
		has_title = title:c_kings_landing
	}	
	theme = rk_red_keep
	override_background = {
		reference = rk_hands_room
	}
	
	override_background = {
		reference = agot_iron_throne
	}
	
	left_portrait = {
		character = scope:rk_braavosi_architect
		animation = idle	
	}	
	right_portrait = {
		character = root
		animation = writing		
	}	

	option = {  #
		name = rk_sanitation.0009.a
		custom_tooltip = rk_sanitation.0009.a_tt
		remove_short_term_gold = 200
		trigger_event = {
			id = rk_sanitation.0010
			months = 12
		}		
	}	
	option = {  #
		name = rk_sanitation.0009.b
		custom_tooltip = rk_sanitation.0009.b_tt
		remove_short_term_gold = 100
		trigger_event = {
			id = rk_sanitation.0010
			months = 12
		}		
	}
	option = {  #
		name = rk_sanitation.0009.c
		custom_tooltip = rk_sanitation.0009.c_tt	
	}	
}

rk_sanitation.0010 = { #Sanitation Event
	type = character_event
	title = rk_sanitation.0010.t
	desc = rk_sanitation.0010.desc
	trigger = {
		has_title = title:c_kings_landing
	}	
	theme = rk_red_keep
	override_background = {
		reference = rk_hands_room
	}
	left_portrait = {
		character = scope:rk_hand
		animation = throne_room_conversation_1	
	}	
	right_portrait = {
		character = root
		animation = page_flipping		
	}
	
	immediate = {	
		cp:councillor_castellan = {
			save_scope_as = rk_hand
		}
		
	}	

	option = {  #
		name = rk_sanitation.0010.a
		custom_tooltip = rk_sanitation.0010.a_tt
		flavor = rk_sanitation.0010.f
		add_prestige = 150
		add_legitimacy = 10
		title:c_kings_landing = {
			if = {
				limit = {
					has_county_modifier = rk_kl_stench_1
				}
				remove_county_modifier = rk_kl_stench_1
				add_county_modifier = rk_kl_stench_2
			}
			else_if = {
				limit = {
					has_county_modifier = rk_kl_stench_2
				}
				remove_county_modifier = rk_kl_stench_2
				add_county_modifier = rk_kl_stench_3
			}	
			else_if = {
				limit = {
					has_county_modifier = rk_kl_stench_3
				}
				remove_county_modifier = rk_kl_stench_3
				add_county_modifier = rk_kl_stench_4
			}
			else_if = {
				limit = {
					has_county_modifier = rk_kl_stench_4
				}
				remove_county_modifier = rk_kl_stench_4
				add_county_modifier = rk_kl_stench_5
			}
			else_if = {
				limit = {
					has_county_modifier = rk_kl_stench_5
				}
				remove_county_modifier = rk_kl_stench_5
				add_county_modifier = rk_kl_stench_6
			}
			else_if = {
				limit = {
					has_county_modifier = rk_kl_stench_6
				}
				remove_county_modifier = rk_kl_stench_6
				add_county_modifier = rk_kl_stench_7
			}			
		}		
	}		
}


##################### ROYAL MINT EVENTS ######################

rk_royal_mint.0001 = { #Summon Master of Coin 
	type = character_event
	title = rk_royal_mint.0001.t
	desc = rk_royal_mint.0001.desc
	trigger = {
		has_title = title:c_kings_landing
	}	
	theme = rk_red_keep
	override_background = {
		reference = rk_hands_room
	}
	
	left_portrait = {
		character = root
		animation = idle	
	}
	right_portrait = {
		character = scope:rk_master_coin
		animation = writing	
	}	
	immediate = {	
		cp:councillor_steward = {
			save_scope_as = rk_master_coin
		}
	}

	option = {  #
		name = rk_royal_mint.0001.a
		custom_tooltip = rk_royal_mint.0001.a_tt
		remove_short_term_gold = 500
		add_prestige = 150
		add_tyranny = 5
		add_character_modifier = rk_seignorage_profits
		add_character_modifier = rk_common_coinage
		set_global_variable = rk_created_royal_mint
		trigger_event = {
			id = rk_royal_mint.0002 
			days = 45
		}		
	}	
	option = {  #
		name = rk_royal_mint.0001.b
		custom_tooltip = rk_royal_mint.0001.b_tt	
		scope:rk_master_coin = {
			add_opinion = {
				modifier = annoyed_opinion
				opinion = -5				
				target = root
			}				
		}
	}	
}


rk_royal_mint.0002 = { #Braavosi Envoy
	type = character_event
	title = rk_royal_mint.0002.t
	desc = rk_royal_mint.0002.desc
	trigger = {
		has_title = title:c_kings_landing
	}	
	theme = rk_red_keep
	override_background = {
		reference = agot_iron_throne
	}
	left_portrait = {
		character = root
		animation = idle	
	}
	right_portrait = {
		character = scope:rk_braavosi_banker_envoy
		animation = idle	
	}	
	immediate = {	
		create_character = {
				location = root.capital_province
				template = rk_braavosi_architect
				gender_female_chance = 0
				save_scope_as = rk_braavosi_banker_envoy
		}	
		scope:rk_braavosi_banker_envoy = {
			add_character_flag = rk_bravo_outfit_1
		}
	}
	option = {  #
		name = rk_royal_mint.0002.a
		custom_tooltip = rk_royal_mint.0002.a_tt
		set_global_variable = rk_has_royal_mint
		add_prestige = 150
	}		
}

rk_royal_mint.003 = { #Summon Master of Coin 
	type = character_event
	title = rk_royal_mint.003.t
	desc = rk_royal_mint.003.desc
	trigger = {
		has_title = title:c_kings_landing
	}	
	theme = rk_red_keep
	override_background = {
		reference = rk_hands_room
	}
	
	left_portrait = {
		character = root
		animation = idle	
	}
	right_portrait = {
		character = scope:rk_master_coin
		animation = writing	
	}	
	immediate = {	
		cp:councillor_steward = {
			save_scope_as = rk_master_coin
		}
	}

	option = {  #Discuss Coinage
		name = rk_royal_mint.003.a
		custom_tooltip = rk_royal_mint.003.a_tt	
		trigger_event = rk_royal_mint.004
		trigger = {
			NOT = {
				has_character_flag = rk_changed_monetary_policy
			}
		}
	}	
	option = {  #Discuss Trade Tariffs
		name = rk_royal_mint.003.b
		custom_tooltip = rk_royal_mint.003.b_tt
		trigger_event = rk_royal_mint.005
		trigger = {
			NOT = {
				has_character_flag = rk_changed_trade_tariffs
			}
		}		
	}
	option = {  #Secure a Loan
		name = rk_royal_mint.003.c
		custom_tooltip = rk_royal_mint.003.c_tt
		trigger = {
			NOT = {
				has_character_modifier = rk_has_loan
			}
		}	
		add_character_modifier = rk_has_loan
		trigger_event = rk_royal_mint.003
		add_short_term_gold = 300
	}	
	option = {  #Repay a Loan
		name = rk_royal_mint.003.d
		custom_tooltip = rk_royal_mint.003.d_tt
		trigger = {
			has_character_modifier = rk_has_loan
		}	
		remove_character_modifier = rk_has_loan
		remove_short_term_gold = 300
		trigger_event = rk_royal_mint.003
	}		
	option = {  #I Changed my mind
		name = rk_royal_mint.003.e
		custom_tooltip = rk_royal_mint.003.e_tt
		flavor = rk_royal_mint.003.e_f	
	}
}

rk_royal_mint.004 = { #Discuss Coinage
	type = character_event
	title = rk_royal_mint.004.t
	desc = rk_royal_mint.004.desc
	trigger = {
		has_title = title:c_kings_landing
	}	
	theme = rk_red_keep
	override_background = {
		reference = rk_hands_room
	}
	
	left_portrait = {
		character = root
		animation = idle	
	}
	right_portrait = {
		character = scope:rk_master_coin
		animation = writing	
	}	
	immediate = {	
		cp:councillor_steward = {
			save_scope_as = rk_master_coin
		}
	}

	option = {  #Debase Coinage
		name = rk_royal_mint.004.a
		custom_tooltip = rk_royal_mint.004.a_tt	
		trigger_event = rk_royal_mint.003
		trigger = {
			NOT = {
				has_character_modifier = rk_worthless_coinage 
			}
		}		
		add_short_term_gold = 1000
		add_character_flag = {
			flag = rk_changed_monetary_policy
			years = 5
		}
		if = {
			limit = {
				has_character_modifier = rk_pure_coinage
			}
			remove_character_modifier = rk_pure_coinage
			add_character_modifier = rk_strong_coinage
		}
		else_if = {
			limit = {
				has_character_modifier = rk_strong_coinage
			}
			remove_character_modifier = rk_strong_coinage
			add_character_modifier = rk_common_coinage
		}
		else_if = {
			limit = {
				has_character_modifier = rk_common_coinage
			}
			remove_character_modifier = rk_common_coinage
			add_character_modifier = rk_debased_coinage
		}	
		else_if = {
			limit = {
				has_character_modifier = rk_debased_coinage
			}
			remove_character_modifier = rk_debased_coinage
			add_character_modifier = rk_worthless_coinage
		}	
		title:c_kings_landing = {
			add_county_modifier = {
				modifier = rk_debased_county_modifier
				years = 5
			}
		}		
	}	
	option = {  #Recoin
		name = rk_royal_mint.004.b
		custom_tooltip = rk_royal_mint.004.b_tt	
		trigger_event = rk_royal_mint.003
		add_character_flag = {
			flag = rk_changed_monetary_policy
			years = 5
		}	
		trigger = {
			NOT = {
				has_character_modifier = rk_pure_coinage 
			}
		}
		remove_short_term_gold = 1000
		if = {
			limit = {
				has_character_modifier = rk_worthless_coinage
			}
			remove_character_modifier = rk_worthless_coinage
			add_character_modifier = rk_debased_coinage
		}
		else_if = {
			limit = {
				has_character_modifier = rk_debased_coinage
			}
			remove_character_modifier = rk_debased_coinage
			add_character_modifier = rk_common_coinage
		}
		else_if = {
			limit = {
				has_character_modifier = rk_common_coinage
			}
			remove_character_modifier = rk_common_coinage
			add_character_modifier = rk_strong_coinage
		}	
		else_if = {
			limit = {
				has_character_modifier = rk_strong_coinage
			}
			remove_character_modifier = rk_strong_coinage
			add_character_modifier = rk_pure_coinage
		}
		title:c_kings_landing = {
			add_county_modifier = {
				modifier = rk_recoined_county_modifier
				years = 5
			}
		}
	}	
	option = {  #Stamp Coinage with my Image
		name = rk_royal_mint.004.c
		custom_tooltip = rk_royal_mint.004.c_tt
		flavor = rk_royal_mint.004.c_f	
		trigger = {
			NOT = {
				has_character_flag = rk_stamped_image
			}
		}
		add_character_flag = rk_stamped_image
		add_legitimacy = 150
		remove_short_term_gold = 500
		trigger_event = rk_royal_mint.003
	}
	option = {  #I Changed my Mind
		name = rk_royal_mint.004.d
		custom_tooltip = rk_royal_mint.004.d_tt
		flavor = rk_royal_mint.004.d_f	
		trigger_event = rk_royal_mint.003
	}	
}



rk_royal_mint.005 = { #Trade Tariffs
	type = character_event
	title = rk_royal_mint.005.t
	desc = rk_royal_mint.005.desc
	trigger = {
		has_title = title:c_kings_landing
	}	
	theme = rk_red_keep
	override_background = {
		reference = rk_hands_room
	}
	
	left_portrait = {
		character = root
		animation = idle	
	}
	right_portrait = {
		character = scope:rk_master_coin
		animation = writing	
	}	
	immediate = {	
		cp:councillor_steward = {
			save_scope_as = rk_master_coin
		}
	}

	option = {  #Arbor Wine
		name = rk_royal_mint.005.a
		custom_tooltip = rk_royal_mint.005.a_tt	
		flavor = rk_royal_mint.005.a_f				
		trigger_event = rk_royal_mint.003
		add_character_flag = {
			flag = rk_changed_trade_tariffs
			years = 5
		}
		title:c_kings_landing = {
			add_county_modifier = {
				modifier = rk_tariff_arbor_wine
				years = 5
			}
		}
		title:k_the_arbor.holder = {
			add_character_modifier = {
				modifier = rk_tariffs_on_us
				years = 5
			}
			add_opinion = {
				modifier = angry_opinion
				opinion = -30
				target = root
			}			
		}	
		if = {
			limit = {
				title:k_the_arbor.holder = {
					is_vassal_of = title:e_the_reach.holder
				}			
			}
			title:e_the_reach.holder = {
				add_opinion = {
					modifier = angry_opinion
					opinion = -15
					target = root
				}			
			}				
		}
	}	
	option = {  #Iron & Salt
		name = rk_royal_mint.005.b
		custom_tooltip = rk_royal_mint.005.b_tt
		flavor = rk_royal_mint.005.b_f			
		trigger_event = rk_royal_mint.003	
		add_character_flag = {
			flag = rk_changed_trade_tariffs
			years = 5
		}	
		title:c_kings_landing = {
			add_county_modifier = {
				modifier = rk_tariff_iron_salt
				years = 5
			}
		}
		title:e_the_iron_islands.holder = {
			add_character_modifier = {
				modifier = rk_tariffs_on_us
				years = 5
			}		
			add_opinion = {
				modifier = angry_opinion
				opinion = -25
				target = root
			}			
		}	
		title:d_harlaw.holder = {		
			add_opinion = {
				modifier = angry_opinion
				opinion = -25
				target = root
			}			
		}			
	}
	option = {  #Westerlands Gold & Silver
		name = rk_royal_mint.005.c
		custom_tooltip = rk_royal_mint.005.c_tt
		flavor = rk_royal_mint.005.c_f			
		trigger_event = rk_royal_mint.003	
		add_character_flag = {
			flag = rk_changed_trade_tariffs
			years = 5
		}
		title:c_kings_landing = {
			add_county_modifier = {
				modifier = rk_tariff_silverware
				years = 5
			}
		}
		title:e_the_westerlands.holder = {
			add_character_modifier = {
				modifier = rk_tariffs_on_us
				years = 5
			}		
			add_opinion = {
				modifier = angry_opinion
				opinion = -25
				target = root
			}			
		}			
	}	
	option = {  #Dornish Wines & Citrus
		name = rk_royal_mint.005.d
		custom_tooltip = rk_royal_mint.005.d_tt
		flavor = rk_royal_mint.005.d_f			
		trigger_event = rk_royal_mint.003	
		add_character_flag = {
			flag = rk_changed_trade_tariffs
			years = 5
		}	
		title:c_kings_landing = {
			add_county_modifier = {
				modifier = rk_tariff_dornish_wine_citrus
				years = 5
			}
		}
		title:e_dorne.holder = {
			add_character_modifier = {
				modifier = rk_tariffs_on_us
				years = 5
			}		
			add_opinion = {
				modifier = angry_opinion
				opinion = -25
				target = root
			}			
		}		
	}	
	option = {  #Northern Timber & Furs
		name = rk_royal_mint.005.e
		custom_tooltip = rk_royal_mint.005.e_tt
		flavor = rk_royal_mint.005.e_f			
		trigger_event = rk_royal_mint.003	
		add_character_flag = {
			flag = rk_changed_trade_tariffs
			years = 5
		}		
		title:c_kings_landing = {
			add_county_modifier = {
				modifier = rk_tariff_timber_furs
				years = 5
			}
		}
		title:e_the_north.holder = {
			add_character_modifier = {
				modifier = rk_tariffs_on_us
				years = 5
			}		
			add_opinion = {
				modifier = angry_opinion
				opinion = -25
				target = root
			}			
		}		
	}
	option = {  #Essossi Trade
		name = rk_royal_mint.005.f
		custom_tooltip = rk_royal_mint.005.f_tt
		flavor = rk_royal_mint.005.f_f			
		trigger_event = rk_royal_mint.003	
		add_character_flag = {
			flag = rk_changed_trade_tariffs
			years = 5
		}
		title:c_kings_landing = {
			add_county_modifier = {
				modifier = rk_tariff_essos_imports
				years = 5
			}
		}		
		title:k_braavos.holder = {
			add_character_modifier = {
				modifier = rk_tariffs_on_us
				years = 5
			}		
			add_opinion = {
				modifier = angry_opinion
				opinion = -25
				target = root
			}			
		}	
		title:k_pentos.holder = {
			add_character_modifier = {
				modifier = rk_tariffs_on_us
				years = 5
			}		
			add_opinion = {
				modifier = angry_opinion
				opinion = -25
				target = root
			}			
		}	
		title:k_myr.holder = {
			add_character_modifier = {
				modifier = rk_tariffs_on_us
				years = 5
			}		
			add_opinion = {
				modifier = angry_opinion
				opinion = -25
				target = root
			}			
		}
		title:k_lys.holder = {
			add_character_modifier = {
				modifier = rk_tariffs_on_us
				years = 5
			}		
			add_opinion = {
				modifier = angry_opinion
				opinion = -25
				target = root
			}			
		}	
		title:k_tyrosh.holder = {
			add_character_modifier = {
				modifier = rk_tariffs_on_us
				years = 5
			}		
			add_opinion = {
				modifier = angry_opinion
				opinion = -25
				target = root
			}			
		}			
	}		
	option = {  #I Changed my Mind
		name = rk_royal_mint.005.g
		custom_tooltip = rk_royal_mint.005.g_tt
		flavor = rk_royal_mint.005.g_f	
		trigger_event = rk_royal_mint.003		
	}
}