﻿ambitious_woman_wanted = {
	# Basic Setup
	skill = intrigue
	desc = "ambitious_woman_wanted_desc_general"
	success_desc = "AMBITIOUS_WOMAN_WANTED_SUCCESS_DESC"
	discovery_desc = "AMBITIOUS_WOMAN_WANTED_DISCOVERY_DESC"
	icon = icon_deviant_courtesan_sluts
	illustration = "gfx/interface/illustrations/event_scenes/corridor.dds"
	target_type = character
	category = contract
	maximum_breaches = 5
	is_secret = yes
	

	# Parameters
	speed_per_skill_point = t2_spsp_owner_value
	speed_per_target_skill_point = t2_spsp_target_value
	base_progress_goal = 200
	maximum_secrecy = 95
	base_maximum_success = t2_base_max_success_value
	phases_per_agent_charge = 1
	success_chance_growth_per_skill_point = t2_scgpsp_value

	# Core Triggers
	allow = {
		is_adult = yes
		is_imprisoned = no
	}

	valid = {
		scope:target = {
			is_alive = yes
			in_diplomatic_range = scope:owner
		}
	}

	# Base Chances
	base_success_chance = {
		base = 0
		hostile_scheme_base_chance_modifier = yes

		# Countermeasures.
		apply_calculated_scheme_success_chance_adjustments_modifier = yes
		
		# Skill
		scheme_type_skill_success_chance_modifier = { SKILL = INTRIGUE }

		# Diarchs are better at schemes within their liege's realm
		diarch_scheming_within_realm_bonus_modifier = yes


		# House Personal Scheme Success Chance on Cultural Parameter
		modifier = {
			add = 5
			desc = YOU_SPEAK_THE_LANGUAGE
			scope:owner = { knows_language_of_culture = scope:target.culture }
		}
		
		modifier = { # Smooth Operator perk bonus
			desc = SEDUCE_PERK_BONUS
			scope:owner = { has_perk = smooth_operator_perk }
			always = yes
			add = smooth_operator_perk_bonus
		}
		
		modifier = { # Legacy bonus
			desc = LEGACY_PERK_BONUS
			scope:owner = {
				exists = dynasty
				dynasty = {
					has_dynasty_perk = fp1_adventure_legacy_2
				}
			}
			always = yes
			add = fp1_adventure_legacy_2_success_chance_seduction
		}

		modifier = {
			desc = "SCHEME_SCHEMER_TRAIT"
			scope:owner = { has_trait = seducer }
			add = 25
		}
		
	}

	# On Actions
	on_start = {
	}
	on_monthly = {
		save_scope_as = scheme
		ambitiouswoman_scheme_monthly_issue_chance_effect = yes
		scheme_owner = {
			trigger_event = {
				on_action = ambitious_deviantwoman_ongoing
			}
		}
	}
	on_phase_completed = {
		scheme_owner = {
			trigger_event = {
				on_action = ambitious_deviantwoman_ongoing
			}
		}
		suppress_scheme_follow_up_event_till_input_given_effect = yes
		deviant_cap_schemes_and_fire_reminders_effect = yes
	}
	on_hud_click  = { ambitiouswomaninn_scheme_prep_effect= yes }
	base_secrecy = {
		add = countermeasure_apply_secrecy_maluses_value
	}

	## Invalidation
	on_invalidated = {
		scheme_target_character = {
			save_scope_as = target
		}
		scheme_owner = {
			save_scope_as = owner
		}
		# Invalidation due to death
		scope:owner = {
			send_interface_toast = {
				type = event_toast_effect_neutral
				title = ambitious_woman_wanted_invalidated_title
				left_icon = scope:target
				if = {
					limit = {
						scope:target = { is_alive = no }
						NOT = { block_death_event_trigger = { DEAD = scope:target } }
						scope:owner = { is_alive = yes }
					}
					custom_tooltip = scheme_target_died
				}
				else_if = {
					limit = {
						scope:target = { 
							NOT = { in_diplomatic_range = scope:owner } 
						}
					}
					custom_tooltip = scheme_target_not_in_diplomatic_range
				}
			}
		}
	}
}
