﻿deviant_hobby_streaking = {
	# Basic Setup
	skill = intrigue
	desc = "deviant_hobby_streaking_desc_general"
	success_desc = "DEVIANT_HOBBY_STREAKING_SUCCESS_DESC"
	discovery_desc = "DEVIANT_HOBBY_STREAKING_DISCOVERY_DESC"
	icon = icon_go_streaking_deviant
	illustration = "gfx/interface/illustrations/event_scenes/tavern.dds"
	target_type = character
	is_secret = no
	is_basic = no
	

	# 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
	#success_chance_growth_per_skill_point = t2_scgpsp_value

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

	valid = {
		scope:target = {
			is_alive = yes
			is_incapable = no
			is_imprisoned = no
			has_trait = deviants_mask
			any_character_artifact = {
				has_artifact_modifier = deviantsmask_artifact_modifier
			}
		}
	}

	# 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

	}
	# On Actions
	on_start = {
	}
	on_monthly = {
		scheme_owner = {
			trigger_event = {
				on_action = deviant_hobby_streaking_ongoing
			}
		}
	}
	on_phase_completed = {
		scheme_owner = {
			trigger_event = {
				on_action = deviant_hobby_streaking_ongoing
			}
		}
		suppress_scheme_follow_up_event_till_input_given_effect = yes
	}

	## 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 = deviant_hobby_streaking_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
				}
			}
		}
	}
}
