﻿namespace = pillage

pillage.1 = {
	title = pillage.1.t
	desc = pillage.1.desc
    type = character_event
    theme = battle
	override_background = { reference = burning_building }
	right_portrait = {
		character = scope:siege_winner
		animation = aggressive_sword
	}
	left_portrait = {
		character = scope:barony.holder
		animation = fear
	}
	immediate = {
		save_scope_as = siege_winner
		scope:barony = {
			save_scope_as = siege_barony
			holder = {
				save_scope_as = rival_scope
			}
		}
	}
	#Sack
	option = {
		name = pillage.1.a
		add_gold = scope:barony.county.development_level
		scope:barony = {
			change_development_progress_with_overflow = -250
			change_county_control = -30
			title_province = {
				hidden_effect = {
					destroy_random_building_variable_effect = yes
					destroy_random_building_effect = yes
					destroy_random_building_variable_effect = yes
					destroy_random_building_effect = yes
				}
			}
		}
		scope:rival_scope = {
			add_dread = -10
			add_legitimacy = -10
		}
		add_stress = minor_stress_loss
		if = {
			limit = { 
				has_trait_benevolent_trigger = yes
			}
			add_stress = medium_stress_gain
		}
		hidden_effect = {
			scope:rival_scope = {
				trigger_event = pillage.2
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
			}
		}
	}
	#Don't
	option = {
		name = pillage.1.b
		scope:rival_scope = {
			add_dread = -10
			add_legitimacy = -10
		}
		add_stress = minor_stress_loss

		ai_chance = {
			base = 0
			ai_value_modifier = {
				ai_compassion = 1
			}
		}
	}
}

pillage.2 = {
	title = pillage.2.t
	desc = pillage.2.desc
    type = character_event
    theme = battle
	override_background = { reference = burning_building }
	right_portrait = {
		character = scope:siege_winner
		animation = aggressive_sword
	}
	left_portrait = {
		character = scope:barony.holder
		animation = fear
	}
	immediate = {
		show_as_tooltip = {
			scope:barony = {
				change_development_progress_with_overflow = -250
				change_county_control = -30
				title_province = {
					hidden_effect = {
						destroy_random_building_variable_effect = yes
						destroy_random_building_effect = yes
						destroy_random_building_variable_effect = yes
						destroy_random_building_effect = yes
					}
				}
			}
			scope:rival_scope = {
				add_dread = -10
				add_legitimacy = -10
			}
		}
	}

	option = {
		name = pillage.2.a
		add_stress = minor_stress_gain
	}
}