﻿basic_courtesan_wanted = {
	group = laamp_contracts_deviant_courtesan_group
	icon = "gfx/interface/icons/scheme_types/icon_deviant_merchant_slut.dds"

	travel = yes
	use_diplomatic_range = no

	weight = {
		value = task_contract_weight_default_value
		scope:employer = {
			add = {
				if = {
					limit = { has_trait = lustful }
					add = task_contract_weight_massive_bonus_value
				}
				if = {
					limit = { has_trait = sadistic }
					add = task_contract_weight_massive_bonus_value
				}
				if = {
					limit = { has_trait = profligate }
					add = task_contract_weight_massive_bonus_value
				}
				if = {
					limit = { has_trait = rakish }
					add = task_contract_weight_slight_bonus_value
				}
				if = {
					limit = { has_trait = rakish stress_level = 1 }
					add = task_contract_weight_slight_bonus_value
				}
				if = {
					limit = { has_trait = rakish stress_level = 2 }
					add = task_contract_weight_standard_bonus_value
				}
				if = {
					limit = { has_trait = rakish stress_level = 3 }
					add = task_contract_weight_massive_bonus_value
				}
				min = task_contract_weight_employer_associated_traits_min_value
				max = task_contract_weight_employer_associated_traits_max_value
			}
			multiply = task_contract_weight_by_tier_value
			add = task_contract_weight_employer_contact_list_value
		}
	}

	valid_to_create = {
		valid_laamp_basic_trigger = {
			EMPLOYER = scope:employer
			LAAMP = root
		}
		scope:employer = {
			is_adult = yes
			age >= 18
		}
		has_trait = deviants_hiredcampslut
		valid_laamp_sensible_start_trigger = yes
		rule_out_dramatic_laamp_employers_trigger = yes
	}
	valid_to_accept = {
		valid_laamp_basic_accept_only_trigger = yes
		valid_laamp_basic_trigger = { EMPLOYER = scope:employer LAAMP = root }
		scope:employer = { is_landed = yes }
	}
	valid_to_continue = {
		valid_laamp_basic_trigger = {
			EMPLOYER = root.task_contract_employer
			LAAMP = root.task_contract_taker
		}
		task_contract_employer = { is_landed = yes }
	}
	valid_to_keep = {
		valid_laamp_basic_trigger = {
			EMPLOYER = root.task_contract_employer
			LAAMP = root.task_contract_taker
		}
		task_contract_employer = { is_landed = yes }
	}

	on_accepted = {
		task_contract_taker = { play_sound_effect = "event:/DLC/EP3/SFX/UI/Contracts/ep3_ui_contracts_accept_contract" }
		save_scope_as = task_contract
		task_contract_employer = { save_scope_as = employer }
		task_contract_taker = {
			trigger_event = deviant_contract_events.0010
		}
	}
	on_create = {
		scope:contract = {
			grab_gold_fuzz_number_effect = yes
			save_scope_as = task_contract
			set_variable = {
				name = gold_success_standard
				value = task_contract_taker.task_contract_success_gold_gain_full_value
			}
			save_scope_value_as = { name = gold_safety_margin value = flag:yes }
			set_variable = {
				name = gold_success_critical
				value = task_contract_taker.task_contract_success_gold_gain_full_value
			}
		}
	}

	task_contract_reward = {
		success_standard = {
			should_print_on_complete = yes
			effect = {
				task_contract_taker = { play_sound_effect = "event:/DLC/EP3/SFX/UI/Contracts/ep3_ui_contracts_success_on_contract" }
				if = {
					limit = { task_contract_taker.domicile ?= { has_domicile_parameter = camp_pleasure_tent_recruitment_events } }
					save_scope_value_as = { name = extra_reward value = flag:yes }
				}
				else = {
					save_scope_value_as = { name = extra_reward value = flag:no }
				}
				laamp_rewards_disburse_ordinary_currency_effect = {
					GOLD = 0
					PRESTIGE = 0
					PIETY = 0
					PROVISIONS = 0
					OPINION = task_contract_opinion_standard_reward_value
					OPINION_TYPE = succeeded_task_contract_opinion
					CONTACT = yes
					CONTACT_HOOK = no
					EXTRA_REWARD = scope:extra_reward
				}
			}
		}
		success_critical = {
			should_print_on_complete = yes
			effect = {
				task_contract_taker = { play_sound_effect = "event:/DLC/EP3/SFX/UI/Contracts/ep3_ui_contracts_success_on_contract" }
				if = {
					limit = { task_contract_taker.domicile ?= { has_domicile_parameter = camp_pleasure_tent_recruitment_events } }
					save_scope_value_as = { name = extra_reward value = flag:yes }
				}
				else = {
					save_scope_value_as = { name = extra_reward value = flag:no }
				}
				laamp_rewards_disburse_ordinary_currency_effect = {
					GOLD = 0
					PRESTIGE = 0
					PIETY = 0
					PROVISIONS = 0
					OPINION = task_contract_opinion_excelled_reward_value
					OPINION_TYPE = critically_succeeded_task_contract_opinion
					CONTACT = yes
					CONTACT_HOOK = no
					EXTRA_REWARD = scope:extra_reward
				}
			}
		}
		failure_standard = {
			positive = no
			should_print_on_complete = yes
			effect = {
				task_contract_taker = { play_sound_effect = "event:/DLC/EP3/SFX/UI/Contracts/ep3_ui_contracts_failure_on_contract" }
				save_scope_value_as = { name = extra_reward value = flag:no }
				laamp_rewards_disburse_ordinary_currency_effect = {
					GOLD = 0
					PRESTIGE = 0
					PIETY = 0
					PROVISIONS = 0
					OPINION = task_contract_opinion_standard_failure_value
					OPINION_TYPE = failed_task_contract_opinion
					CONTACT = no
					CONTACT_HOOK = no
					EXTRA_REWARD = scope:extra_reward
				}
			}
		}
	}
}


#OR just have him list 3 if you have 3 dwarfs...
#wants lustful specifically
#wants sadistic

#higher value, will vanish the char
#wants beautiful 1-3
#wants strong
#wants giant
#wants dwarf
#wants genious


ambitious_woman_wanted_forinncompetitionsbysponsor = {
	group = laamp_contracts_deviant_courtesan_group
	icon = "gfx/interface/icons/scheme_types/icon_deviant_merchant_slut.dds"

	travel = yes
	use_diplomatic_range = yes

	weight = {
		value = task_contract_weight_default_value
		scope:employer = {
			add = {
				if = {
					limit = { has_trait = lustful }
					add = task_contract_weight_massive_bonus_value
				}
				if = {
					limit = { has_trait = sadistic }
					add = task_contract_weight_massive_bonus_value
				}
				if = {
					limit = { has_trait = profligate }
					add = task_contract_weight_massive_bonus_value
				}
				if = {
					limit = { has_trait = rakish }
					add = task_contract_weight_slight_bonus_value
				}
				if = {
					limit = { has_trait = rakish stress_level = 1 }
					add = task_contract_weight_slight_bonus_value
				}
				if = {
					limit = { has_trait = rakish stress_level = 2 }
					add = task_contract_weight_standard_bonus_value
				}
				if = {
					limit = { has_trait = rakish stress_level = 3 }
					add = task_contract_weight_massive_bonus_value
				}
				if = {
					limit = { has_trait = ambitious }
					add = task_contract_weight_massive_bonus_value
				}
				if = {
					limit = { has_trait = greedy }
					add = task_contract_weight_massive_bonus_value
				}
				if = {
					limit = { has_trait = special_courtesan_client }
					add = task_contract_weight_massive_bonus_value
				}
				if = {
					limit = { has_trait = deviant_patron_of_inns }
					add = task_contract_weight_massive_bonus_value
				}
				min = task_contract_weight_employer_associated_traits_min_value
				max = task_contract_weight_employer_associated_traits_max_value
			}
			multiply = task_contract_weight_by_tier_value
			add = task_contract_weight_employer_contact_list_value
		}
	}

	valid_to_create = {
		valid_laamp_basic_trigger = {
			EMPLOYER = scope:employer
			LAAMP = root
		}
		scope:employer = {
			is_adult = yes
			age >= 18
			OR = {	is_female = no	has_trait = futanari_genetic }
		}
		is_female = yes
		NOT = { has_trait = pregnant }
		has_trait = deviant_courtesan_slut
		valid_laamp_sensible_start_trigger = yes
		rule_out_dramatic_laamp_employers_trigger = yes
	}
	valid_to_accept = {
		valid_laamp_basic_accept_only_trigger = yes
		valid_laamp_basic_trigger = { EMPLOYER = scope:employer LAAMP = root }
		scope:employer = { is_landed = yes }
		NOT = { has_trait = pregnant }
	}
	valid_to_continue = {
		valid_laamp_basic_trigger = {
			EMPLOYER = root.task_contract_employer
			LAAMP = root.task_contract_taker
		}
		task_contract_employer = { is_landed = yes }
	}
	valid_to_keep = {
		valid_laamp_basic_trigger = {
			EMPLOYER = root.task_contract_employer
			LAAMP = root.task_contract_taker
		}
		task_contract_employer = { is_landed = yes }
	}

	on_accepted = {
		task_contract_taker = { play_sound_effect = "event:/DLC/EP3/SFX/UI/Contracts/ep3_ui_contracts_accept_contract" }
		save_scope_as = task_contract
		task_contract_employer = { save_scope_as = employer }
					task_contract_taker = { play_sound_effect = "event:/DLC/EP3/SFX/UI/Contracts/ep3_ui_contracts_accept_contract" }
		# For the intro event.
		# Then we start the scheme.
		task_contract_taker = {
			start_scheme = {
				type = ambitious_woman_wanted
				contract = root
				target_character = root.task_contract_employer
			}
			# Make a note of what the scheme even is; we'll need this for the event too.
			scope:task_contract.scheme = { save_scope_as = scheme }
			trigger_event = deviant_contract_events.1000
		}
	}
	on_create = {
		scope:contract = {
			grab_gold_fuzz_number_effect = yes
			save_scope_as = task_contract
			set_variable = {
				name = gold_success_standard
				value = task_contract_taker.task_contract_success_gold_gain_full_value
			}
			save_scope_value_as = { name = gold_safety_margin value = flag:yes }
			set_variable = {
				name = gold_success_critical
				value = task_contract_taker.task_contract_success_gold_gain_full_value
			}
		}
	}

	task_contract_reward = {
		success_standard = {
			should_print_on_complete = yes
			effect = {
				task_contract_taker = { play_sound_effect = "event:/DLC/EP3/SFX/UI/Contracts/ep3_ui_contracts_success_on_contract" }
				if = {
					limit = { task_contract_taker.domicile ?= { has_domicile_parameter = camp_pleasure_tent_recruitment_events } }
					save_scope_value_as = { name = extra_reward value = flag:yes }
				}
				else = {
					save_scope_value_as = { name = extra_reward value = flag:no }
				}
				laamp_rewards_disburse_ordinary_currency_effect = {
					GOLD = 0
					PRESTIGE = 0
					PIETY = 0
					PROVISIONS = 0
					OPINION = task_contract_opinion_standard_reward_value
					OPINION_TYPE = succeeded_task_contract_opinion
					CONTACT = yes
					CONTACT_HOOK = no
					EXTRA_REWARD = scope:extra_reward
				}
			}
		}
		success_critical = {
			should_print_on_complete = yes
			effect = {
				task_contract_taker = { play_sound_effect = "event:/DLC/EP3/SFX/UI/Contracts/ep3_ui_contracts_success_on_contract" }
				if = {
					limit = { task_contract_taker.domicile ?= { has_domicile_parameter = camp_pleasure_tent_recruitment_events } }
					save_scope_value_as = { name = extra_reward value = flag:yes }
				}
				else = {
					save_scope_value_as = { name = extra_reward value = flag:no }
				}
				laamp_rewards_disburse_ordinary_currency_effect = {
					GOLD = 0
					PRESTIGE = 0
					PIETY = 0
					PROVISIONS = 0
					OPINION = task_contract_opinion_excelled_reward_value
					OPINION_TYPE = critically_succeeded_task_contract_opinion
					CONTACT = yes
					CONTACT_HOOK = no
					EXTRA_REWARD = scope:extra_reward
				}
			}
		}
		failure_standard = {
			positive = no
			should_print_on_complete = yes
			effect = {
				task_contract_taker = { play_sound_effect = "event:/DLC/EP3/SFX/UI/Contracts/ep3_ui_contracts_failure_on_contract" }
				save_scope_value_as = { name = extra_reward value = flag:no }
				laamp_rewards_disburse_ordinary_currency_effect = {
					GOLD = 0
					PRESTIGE = 0
					PIETY = 0
					PROVISIONS = 0
					OPINION = task_contract_opinion_standard_failure_value
					OPINION_TYPE = failed_task_contract_opinion
					CONTACT = no
					CONTACT_HOOK = no
					EXTRA_REWARD = scope:extra_reward
				}
			}
		}
	}
}