﻿mi_castrate_prisoner = {
	
	on_other_nation = no
	on_own_nation = yes
	
	sound = "event:/SFX/UI/Character/sfx_ui_character_execute"
	
	potential_trigger = {
		hidden:scope:actor = {
			is_ai = no
		}
		hidden:scope:target = {
			char_can_be_castrated_mi_trigger = yes
		}
	}
	
	allowed_trigger = {
		scope:actor = {
			can_pay_price_castrate_trigger = yes
		}
		scope:actor.current_ruler = {
			char_can_castrate_mi_trigger = yes
		}
		custom_tooltip = {
			text = mi_castrate_prisoner_once_a_month
			scope:actor.current_ruler = {
				NOT = {
					has_variable = mi_castrate_prisoner_one
				}
			}
		}
	}
	
	effect = {
		scope:actor.current_ruler = {
			set_variable = {
				name = mi_castrate_prisoner_one
				days = 30
			}
		}
		custom_tooltip = mi_current_ruler_castrate_prisoner
		scope:actor = {
			mi_cost_modifier_castrate_effect = yes
			add_tyranny = tyranny_mi_castrate_prisoner
			trigger_event = {
				on_action = custom_on_action_mi_castrate
				days = { 2 5 }
			}
		}
	}
	
}	

