﻿### Various Tasks ###

food_taster_court_position_task_brew_poisons = {
	court_position_types = { food_taster_court_position master_assassin_court_position }

	is_shown = {
	}
	is_valid_showing_failures_only = {
	}

	cost = {
		round = no
		gold = {
			value = 0
			if = {
				limit = {
					scope:liege = {
						has_treasury = no
					}
				}
				add = {
					value = monthly_court_position_task_cost
					desc = COURT_POSITION_TASK_COST_BREAKDOWN_BASE
					format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE"
				}
			}
		}
		treasury = {
			value = 0
			if = {
				limit = {
					scope:liege = {
						has_treasury = yes
					}
				}
				add = {
					value = monthly_court_position_task_cost
					desc = COURT_POSITION_TASK_COST_BREAKDOWN_BASE
					format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE"
				}
			}
		}
	}
	
	scaling_employer_modifiers = {
		terrible = {
		 	owned_hostile_scheme_success_chance_max_add = 1
		 	owned_scheme_secrecy_add = 1
		}
		poor = {
		 	owned_hostile_scheme_success_chance_max_add = 3
		 	owned_scheme_secrecy_add = 3
		}
		average = {
		 	owned_hostile_scheme_success_chance_max_add = 5
		 	owned_scheme_secrecy_add = 5
		}
		good = {
		 	owned_hostile_scheme_success_chance_max_add = 10
		 	owned_scheme_secrecy_add = 10
		}
		excellent = {
		 	owned_hostile_scheme_success_chance_max_add = 20
		 	owned_scheme_secrecy_add = 20
		}
	}
	
	on_start = {
	}
	on_end = { }

	ai_will_do = {
		value = {
			add = ai_honor
			multiply = -1
		}
		if = {
			limit = {
				any_scheme = {
					is_hostile = yes
				}
			}
			add = 50
		}
	}
}

food_taster_court_position_task_ear_to_the_ground = {
	court_position_types = { food_taster_court_position chief_eunuch_court_position lady_in_waiting_court_position }

	is_shown = {
	}
	#is_valid_showing_failures_only = { #Unop: This task does not need any courtly vassal and seems to be a copy/paste issue from cupbearer (this is prevent the task to be taken if you have no courtly vassal)
	#	scope:liege = {
	#		custom_tooltip = {
	#			text = cupbearer_court_position_task_collect_tallage_tt
	#			any_vassal = {
	#				has_vassal_stance = courtly
	#			}
	#		}
	#	}
	#}

	cost = {
		round = no
		prestige = {
			add = {
				value = monthly_court_position_task_cost
				desc = COURT_POSITION_TASK_COST_BREAKDOWN_BASE
				format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE"
			}
		}
	}

	base_employer_modifier = {
	}
	
	scaling_employer_modifiers = {
		terrible = {
		 	enemy_scheme_secrecy_add = -1
		 	monthly_intrigue_lifestyle_xp_gain_mult = 0.01
		}
		poor = {
		 	enemy_scheme_secrecy_add = -3
		 	monthly_intrigue_lifestyle_xp_gain_mult = 0.03
		}
		average = {
		 	enemy_scheme_secrecy_add = -5
		 	monthly_intrigue_lifestyle_xp_gain_mult = 0.05
		}
		good = {
		 	enemy_scheme_secrecy_add = -7
		 	monthly_intrigue_lifestyle_xp_gain_mult = 0.07
		}
		excellent = {
		 	enemy_scheme_secrecy_add = -10
		 	monthly_intrigue_lifestyle_xp_gain_mult = 0.1
		}
	}
	
	on_start = {
	}
	on_end = { }

	ai_will_do = {
		value = {
			add = ai_vengefulness
		}
		if = {
			limit = {
				has_lifestyle = intrigue_lifestyle
			}
			add = 100
		}
	}
}
