﻿### Inn Connection Tasks ###

dinn_connection_pimpliege_task = {
	court_position_types = { dinn_connection_court_position }

	# Monthly cost for the task
	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"
			}
		}
	}

	employee_modifier = {
		monthly_intrigue_lifestyle_xp_gain_mult = 0.25
	}

	employee_modifier = {
		monthly_prestige = 0.2
		intrigue = 3
		diplomacy = 2
	}

	on_start = {
		custom_tooltip = dinn_connection_pimpliege_fallback_tt
	}

	scaling_employer_modifiers = {
		terrible = {
			monthly_prestige = -0.13
		}
		poor = {
			monthly_prestige = -0.16
		}
		average = {
			monthly_prestige = -0.2
		}
		good = {
			monthly_prestige = -0.35
		}
		excellent = {
			monthly_prestige = -0.6
		}
	}
	on_monthly = {
		random = {
			chance = {
				value = 1
				add = {
					value = "aptitude(dinn_connection_court_position)"
					multiply = 0.8
				}
			}
			hidden_effect = {
				add_trait_xp = {
					trait = deviant_patron_of_inns
					track = deviant_inn_patron_connections
					value = { 0 4 }
				}
			}
			scope:liege = {
				send_interface_toast = {
					type = event_innslut_deviantgo_text
					title = dinn_connection_pimpliege_title
					desc = dinn_connection_pimpliege_notification_desc
					left_icon = root
					right_icon = scope:liege

					scope:liege = { 
						add_gold = { 1 40 }
						random_list = {
							80 = {
								trigger = {
									has_trait = deviants_strange_dildo
								}
								add_trait_xp = {
									trait = deviants_strange_dildo
									track = strange_dildo_addiction
									value = { 1 5 }
								}
							}
							30 = {
								trigger = {
									has_trait = deviants_demonanalslut
								}
								add_trait_xp = {
									trait = deviants_demonanalslut
									track = demonsubmissionslut
									value = { 1 5 }
								}
							}
							20 = {
								trigger = {
									has_trait = deviants_strange_dildo
								}
								add_character_modifier = {
									modifier = deviant_canonlythinkdildo_modifier
									days = { 10 100 }
								}
							}	
							50 = {
								trigger = {
									has_trait = lustful_inn_slut
									NOT = {
										has_trait_xp = {
											trait = lustful_inn_slut
											track = lustful_inn_slut_experince
											value = 100
										}
									}
								}
								add_trait_xp = {
									trait = lustful_inn_slut
									track = lustful_inn_slut_experince
									value = { 1 5 }
								}
							}
							50 = {
								trigger = {
									has_trait = lustful_inn_slut
									has_character_flag = given_deviant_innslut_snake_bracelet
									any_character_artifact = {
										has_artifact_modifier = deviant_innslut_snake_bracelet_modifier
									}
									NOT = {
										has_trait_xp = {
											trait = lustful_inn_slut
											track = lustful_inn_slut_daring
											value = 100
										}
									}
								}
								add_trait_xp = {
									trait = lustful_inn_slut
									track = lustful_inn_slut_daring
									value = { 1 5 }
								}
							}
						}
					}
				}
			}
		}
	}			
	ai_will_do = {
		value = 0 # Ai won't do
	}
}

dinn_connection_train_liege = {
	court_position_types = { dinn_connection_court_position }

	# Monthly cost for the task
	cost = {
		round = no
		gold = {
			add = {
				value = monthly_court_position_task_cost
				multiply = 2
				desc = COURT_POSITION_TASK_COST_BREAKDOWN_BASE
				format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE"
			}
		}
	}

	employee_modifier = {
		monthly_intrigue_lifestyle_xp_gain_mult = 0.15
	}

	base_employer_modifier = {
		stress_gain_mult = 0.25
	}

	is_valid_showing_failures_only = {
		intrigue >= scope:liege.intrigue
		scope:liege = {
			is_incapable = no
		}
	}

	on_start = {
		custom_tooltip = dinn_connection_train_liege_fallback_tt
	}

	on_monthly = {
		random = {
			chance = {
				value = 1
				add = {
					value = "aptitude(dinn_connection_court_position)"
					multiply = 0.8
				}
			}
			hidden_effect = {
				add_trait_xp = {
					trait = deviant_patron_of_inns
					track = deviant_inn_patron_connections
					value = { 0 4 }
				}
			}
			scope:liege = {
				send_interface_toast = {
					type = event_innslut_deviantgo_text
					title = dinn_connection_train_liege_title
					desc = dinn_connection_train_liege_notification_desc
					left_icon = root
					right_icon = scope:liege

					scope:liege = { 
						add_intrigue_skill = 1 
						random_list = {
							80 = {
								trigger = {
									has_trait = deviants_strange_dildo
								}
								add_trait_xp = {
									trait = deviants_strange_dildo
									track = strange_dildo_addiction
									value = { 1 5 }
								}
							}
							30 = {
								trigger = {
									has_trait = deviants_demonanalslut
								}
								add_trait_xp = {
									trait = deviants_demonanalslut
									track = demonsubmissionslut
									value = { 1 5 }
								}
							}
							20 = {
								trigger = {
									has_trait = deviants_strange_dildo
								}
								add_character_modifier = {
									modifier = deviant_canonlythinkdildo_modifier
									days = { 10 100 }
								}
							}	
							50 = {
								trigger = {
									has_trait = lustful_inn_slut
									NOT = {
										has_trait_xp = {
											trait = lustful_inn_slut
											track = lustful_inn_slut_experince
											value = 100
										}
									}
								}
								add_trait_xp = {
									trait = lustful_inn_slut
									track = lustful_inn_slut_experince
									value = { 1 5 }
								}
							}
							50 = {
								trigger = {
									has_trait = lustful_inn_slut
									has_character_flag = given_deviant_innslut_snake_bracelet
									any_character_artifact = {
										has_artifact_modifier = deviant_innslut_snake_bracelet_modifier
									}
									NOT = {
										has_trait_xp = {
											trait = lustful_inn_slut
											track = lustful_inn_slut_daring
											value = 100
										}
									}
								}
								add_trait_xp = {
									trait = lustful_inn_slut
									track = lustful_inn_slut_daring
									value = { 1 5 }
								}
							}
						}
					}
				}
			}
		}
	}

	ai_will_do = {
		value = ai_boldness
	}
}

dinn_connection_sell_innflowers = {
	court_position_types = { dinn_connection_court_position }

	# Monthly cost for the task
	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"
			}
		}
	}

	employee_modifier = {
		monthly_intrigue_lifestyle_xp_gain_mult = 0.25
	}

	on_start = {
		custom_tooltip = dinn_connection_sell_innflowers_fallback_tt
	}

	employee_modifier = {
		monthly_prestige = 0.1
		intrigue = 2
		diplomacy = 1
	}

	scaling_employer_modifiers = {
		terrible = {
			monthly_prestige = -0.03
		}
		poor = {
			monthly_prestige = -0.06
		}
		average = {
			monthly_prestige = -0.2
		}
		good = {
			monthly_prestige = -0.30
		}
		excellent = {
			monthly_prestige = -0.4
		}
	}

	on_monthly = {
		random = {
			chance = {
				value = 1
				add = {
					value = "aptitude(dinn_connection_court_position)"
					multiply = 0.8
				}
			}
			hidden_effect = {
				add_trait_xp = {
					trait = deviant_patron_of_inns
					track = deviant_inn_patron_connections
					value = { 0 4 }
				}
			}
			scope:liege = {
				send_interface_toast = {
					type = event_innslut_deviantgo_text
					title = dinn_connection_sell_innflowers_title
					desc = dinn_connection_sell_innflowers_notification_desc
					left_icon = root
					right_icon = scope:liege

					scope:liege = { 
						add_gold = { 1 20 }
					}
				}
			}
		}
	}

	ai_will_do = {
		value = ai_boldness
	}
}
