﻿
namespace = event_cure_brutally_mauled

@cost_of_standard_treatment_brutally_mauled = 100
@cost_of_standard_treatment_brutally_mauled_with_perk = 50
@cost_of_best_treatment_brutally_mauled = 200
@cost_of_best_treatment_brutally_mauled_with_perk = 100

event_cure_brutally_mauled.0001 = {
	type = character_event
	title = event_cure_brutally_mauled.0001.title
	desc = event_cure_brutally_mauled.0001.desc

	theme = medicine

	left_portrait = {
		character = var:court_physician
		animation = personality_rational
	}

	right_portrait = {
		character = scope:recipient
		animation = pain
	}

	trigger = {
		exists = capital_province
	}

	option = {
		name = event_cure_brutally_mauled.0001.a

		trigger = {
			scope:actor = { NOT = { has_perk = anatomical_studies_perk } }
			gold >= @cost_of_standard_treatment_brutally_mauled
		}

		show_as_unavailable = {
			scope:actor = { NOT = { has_perk = anatomical_studies_perk } }
			gold < @cost_of_standard_treatment_brutally_mauled
		}

		effect_start_standard_treatment_brutally_mauled = yes
	}

	option = {
		name = event_cure_brutally_mauled.0001.b

		trigger = {
			scope:actor = { has_perk = anatomical_studies_perk }
			gold >= @cost_of_standard_treatment_brutally_mauled_with_perk
		}

		show_as_unavailable = {
			scope:actor = { has_perk = anatomical_studies_perk }
			gold < @cost_of_standard_treatment_brutally_mauled_with_perk
		}

		effect_start_standard_treatment_brutally_mauled = yes
	}

	option = {
		name = event_cure_brutally_mauled.0001.c

		trigger = {
			scope:actor = { NOT = { has_perk = anatomical_studies_perk } }
			gold >= @cost_of_best_treatment_brutally_mauled
		}

		show_as_unavailable = {
			scope:actor = { NOT = { has_perk = anatomical_studies_perk } }
			gold < @cost_of_best_treatment_brutally_mauled
		}

		scope:recipient = {
			set_variable = {
				name = use_best_treatment
				value = yes
			}
		}

		effect_start_best_treatment_brutally_mauled = yes
	}

	option = {
		name = event_cure_brutally_mauled.0001.d

		trigger = {
			scope:actor = { has_perk = anatomical_studies_perk }
			gold >= @cost_of_best_treatment_brutally_mauled_with_perk
		}

		show_as_unavailable = {
			scope:actor = { has_perk = anatomical_studies_perk }
			gold < @cost_of_best_treatment_brutally_mauled_with_perk
		}

		scope:recipient = {
			set_variable = {
				name = use_best_treatment
				value = yes
			}
		}

		effect_start_best_treatment_brutally_mauled = yes
	}

	option = {
		name = event_cure_brutally_mauled.0001.e
	}
}

event_cure_brutally_mauled.0002 = {
	type = character_event
	title = event_cure_brutally_mauled.0002.title
	desc = event_cure_brutally_mauled.0002.desc

	theme = medicine

	left_portrait = {
		character = scope:court_physician
		animation = happiness
	}

	right_portrait = {
		character = scope:recipient
		animation = happiness
	}

	trigger = {
		exists = capital_province
	}

	option = {
		name = event_cure_brutally_mauled.0002.a

		scope:recipient = {
			remove_trait = wounded_3
			remove_trait = ucp_bedridden
			add_trait = scarred
			add_trait = wounded_1

			add_opinion = {
				target = scope:actor
				modifier = ucp_cured_wounds_3
			}
		}
	}
}

