﻿############################################
# Mistborn: The Final Empire - Inquisitor Character Interactions
# Available when an Inquisitor courtier is at your court
############################################

# Investigate Heresy — order an Inquisitor to investigate a courtier or vassal
investigate_heresy_interaction = {
	category = interaction_category_hostile

	desc = investigate_heresy_interaction_desc

	is_shown = {
		scope:actor = {
			has_character_flag = inquisitor_at_court
			faith = faith:steel_ministry
		}
		scope:recipient = {
			is_courtier_of = scope:actor
			NOT = { this = scope:actor }
		}
	}

	is_valid_showing_failures_only = {
		scope:actor = {
			is_available_adult = yes
			NOT = { has_character_flag = recently_investigated_heresy }
		}
	}

	cooldown_against_recipient = { years = 2 }

	on_accept = {
		scope:actor = {
			add_character_flag = {
				flag = recently_investigated_heresy
				years = 1
			}
			save_scope_as = investigator
		}
		scope:recipient = {
			save_scope_as = investigation_target
		}
		scope:actor = {
			trigger_event = mistborn_inquisitor.0020
		}
	}

	ai_accept = {
		base = 50
	}

	ai_targets = {
		ai_recipients = courtiers
	}

	ai_frequency = 36

	ai_will_do = {
		base = 20
		modifier = {
			factor = 3
			scope:recipient = {
				NOT = { faith = faith:steel_ministry }
			}
		}
		modifier = {
			factor = 2
			scope:recipient = {
				is_allomancer_trigger = yes
			}
		}
	}
}

# Hunt Allomancers — order an Inquisitor to search a province for hidden Allomancers
hunt_allomancers_interaction = {
	category = interaction_category_hostile

	desc = hunt_allomancers_interaction_desc

	is_shown = {
		scope:actor = {
			has_character_flag = inquisitor_at_court
			faith = faith:steel_ministry
			is_ruler = yes
		}
		scope:recipient = {
			is_vassal_of = scope:actor
		}
	}

	is_valid_showing_failures_only = {
		scope:actor = {
			is_available_adult = yes
			NOT = { has_character_flag = recently_hunted_allomancers }
		}
	}

	cooldown_against_recipient = { years = 3 }

	on_accept = {
		scope:actor = {
			add_character_flag = {
				flag = recently_hunted_allomancers
				years = 2
			}
		}
		scope:actor = {
			trigger_event = mistborn_inquisitor.0030
		}
	}

	ai_accept = {
		base = 50
	}

	ai_targets = {
		ai_recipients = vassals
	}

	ai_frequency = 48

	ai_will_do = {
		base = 15
		modifier = {
			factor = 2
			scope:recipient = {
				any_courtier = {
					is_allomancer_trigger = yes
				}
			}
		}
	}
}

# Interrogate Prisoner — order an Inquisitor to brutally interrogate a prisoner
interrogate_prisoner_interaction = {
	category = interaction_category_hostile

	desc = interrogate_prisoner_interaction_desc

	is_shown = {
		scope:actor = {
			has_character_flag = inquisitor_at_court
			faith = faith:steel_ministry
		}
		scope:recipient = {
			is_imprisoned_by = scope:actor
		}
	}

	is_valid_showing_failures_only = {
		scope:actor = {
			is_available_adult = yes
			NOT = { has_character_flag = recently_interrogated_prisoner }
		}
	}

	cooldown_against_recipient = { years = 5 }

	on_accept = {
		scope:actor = {
			add_character_flag = {
				flag = recently_interrogated_prisoner
				years = 1
			}
		}
		scope:actor = {
			trigger_event = mistborn_inquisitor.0040
		}
	}

	ai_accept = {
		base = 50
	}

	ai_targets = {
		ai_recipients = prisoners
	}

	ai_frequency = 24

	ai_will_do = {
		base = 40
		modifier = {
			factor = 2
			scope:recipient = {
				is_allomancer_trigger = yes
			}
		}
		modifier = {
			factor = 0.5
			scope:actor = {
				has_trait = compassionate
			}
		}
	}
}
