﻿############################################
# Atium Smuggling Events
# Acquiring the rarest and most valuable metal
############################################

namespace = mistborn_atium

# ============================================================
# ATIUM SMUGGLING SUCCESS
# You successfully acquire a cache of smuggled atium
# ============================================================
mistborn_atium.0001 = {
	type = character_event
	title = mistborn_atium.0001.t
	desc = mistborn_atium.0001.desc
	theme = stewardship

	left_portrait = {
		character = root
		animation = happiness
	}

	immediate = {}

	# Option A: Use it to enhance your Mistborn agents
	option = {
		name = mistborn_atium.0001.a
		trigger = {
			OR = {
				has_trait = trait_mistborn
				any_courtier = {
					has_trait = trait_mistborn
				}
				any_courtier = {
					has_trait = trait_misting_oracle
				}
			}
		}
		add_prestige = 200
		# Temporary combat advantage
		add_character_flag = {
			flag = has_atium_reserve
			years = 5
		}
		ai_chance = {
			base = 50
		}
	}

	# Option B: Sell it on the black market for gold
	option = {
		name = mistborn_atium.0001.b
		add_gold = 400
		add_prestige = 50
		ai_chance = {
			base = 40
		}
	}

	# Option C: Use it as political leverage with other houses
	option = {
		name = mistborn_atium.0001.c
		add_prestige = 300
		add_diplomacy_lifestyle_xp = 100
		ai_chance = {
			base = 30
		}
	}
}

# ============================================================
# ATIUM SMUGGLING FAILURE
# You are caught by the Steel Ministry
# ============================================================
mistborn_atium.0002 = {
	type = character_event
	title = mistborn_atium.0002.t
	desc = mistborn_atium.0002.desc
	theme = intrigue

	left_portrait = {
		character = root
		animation = fear
	}

	immediate = {
		# Lord Ruler takes notice
		if = {
			limit = { has_variable = lord_ruler_attention }
			change_variable = {
				name = lord_ruler_attention
				add = 25
			}
		}
		else = {
			set_variable = {
				name = lord_ruler_attention
				value = 25
			}
		}
	}

	# Option A: Bribe the Obligator to look away
	option = {
		name = mistborn_atium.0002.a
		remove_short_term_gold = 300
		add_prestige = -100
		# Reduce the attention gained
		decrease_lord_ruler_attention_effect = yes
		ai_chance = {
			base = 50
		}
	}

	# Option B: Deny everything - brazen it out
	option = {
		name = mistborn_atium.0002.b
		trigger = {
			diplomacy >= 15
		}
		random_list = {
			40 = {
				# Convinced them
				custom_tooltip = mistborn_atium.0002.b.success
				add_prestige = -50
			}
			60 = {
				# They don't believe you
				custom_tooltip = mistborn_atium.0002.b.fail
				add_character_modifier = {
					modifier = steel_ministry_displeasure
					years = 5
				}
			}
		}
		ai_chance = {
			base = 30
		}
	}

	# Option C: Accept punishment
	option = {
		name = mistborn_atium.0002.c
		remove_short_term_gold = 500
		add_prestige = -200
		add_piety = 30
		# Full contrition reduces attention
		decrease_lord_ruler_attention_effect = yes
		ai_chance = {
			base = 20
		}
	}
}
