﻿namespace = holy_stuff_eat_the_holy_prepuce_event

holy_stuff_eat_the_holy_prepuce_event.0001 = {
	type = character_event
	title = holy_stuff_eat_the_holy_prepuce_event.0001.t
	desc = holy_stuff_eat_the_holy_prepuce_event.0001.desc
	theme = mental_health
	left_portrait = {
		character = root
		animation = personality_greedy
	}

	artifact = { 
	    target = scope:holy_prepuce
	    position = lower_left_portrait
	}

	trigger = {
		is_ai = no
		eat_the_holy_prepuce_event_trigger = yes
	}

	immediate = {
		play_music_cue = "mx_cue_stress"

		random_character_artifact = {
			limit = {
				has_variable = holy_prepuce
			}
			save_scope_as = holy_prepuce
		}
	}

	option = {
		name = holy_stuff_eat_the_holy_prepuce_event.0001.a

		stress_impact = {
			cannibal = minor_stress_impact_loss
			zealous = minor_stress_impact_gain
		}

		root = {
			save_scope_as = hungry_ruler
		}

		holy_stuff_eat_the_holy_prepuce_scripted_effect = yes

		every_player = {
			limit = {
				NOT = { this = root }
                                relic_hunter_is_valid_trigger = yes
                                has_RelationToMe_relation = { CHARACTER = scope:hungry_ruler }
			}
			trigger_event = {
				id = holy_stuff_eat_the_holy_prepuce_event.0002
			}
		}
	}


	option = {
		name = holy_stuff_eat_the_holy_prepuce_event.0001.b

		trigger = {
			has_trait = cannibal
		}
		
		stress_impact = {
			cannibal = minor_stress_impact_loss
			zealous = minor_stress_impact_gain
		}

		root = {
			save_scope_as = hungry_ruler
		}

		holy_stuff_eat_the_holy_prepuce_scripted_effect = yes

		every_player = {
			limit = {
				NOT = { this = root }
                        relic_hunter_is_valid_trigger = yes
                        has_RelationToMe_relation = { CHARACTER = scope:hungry_ruler }
			}
			trigger_event = {
				id = holy_stuff_eat_the_holy_prepuce_event.0002
			}
		}
	}

	option = {
		name = holy_stuff_eat_the_holy_prepuce_event.0001.c

		stress_impact = {
			cannibal = minor_stress_impact_gain
		}
	}
}


holy_stuff_eat_the_holy_prepuce_event.0002 = {
	type = character_event
	title = holy_stuff_eat_the_holy_prepuce_event.0002.t
	desc = holy_stuff_eat_the_holy_prepuce_event.0002.desc
	theme = realm
	left_portrait = {
		character = scope:hungry_ruler
		animation = personality_greedy
	}

	option = {
		name = holy_stuff_eat_the_holy_prepuce_event.0002.a

		stress_impact = {
			zealous = minor_stress_impact_gain
		}
	}

	option = {
		name = holy_stuff_eat_the_holy_prepuce_event.0002.b

		trigger = {
			has_trait = cannibal
		}
	}
}

