﻿namespace = bb_ai

##### AI Wound Recovery Event #####

bb_ai.0001 = {
	type = character_event
	# title = bb_ai.0001.t
	# desc = bb_ai.0001.desc

	hidden = yes
	# theme = medicine
	
	# left_portrait = {
	# 	character = root
	# 	animation = pain
	# }

	immediate = {

		### Heals light wounds
		if = {
			limit = {
				has_trait = wounded_1
			}
			remove_trait = wounded_1
			random_list = {
				80 = {
					# Showed bravery
					add_prestige = 25
				}
				20 = {
					add_trait = scarred
				}
			}
			add_character_modifier = {
				modifier = raw_wounds
				months = 10
			}
		}

		### Heals severe wounds
		if = {
			limit = {
				has_trait = wounded_2
			}
			# Showed bravery
			add_prestige = 25
			remove_trait = wounded_2
			add_character_modifier = {
				modifier = raw_wounds
				months = 20
			}
		}

		### Heals brutal wounds or character dies
		if = {
			limit = {
				has_trait = wounded_3
			}
			random_list = {
				65 = {
					# Showed bravery
					add_prestige = 25
					remove_trait = wounded_3
					add_character_modifier = {
						modifier = bleeding_wounds
						years = 2
					}
				}
				35 = {
					death = {
						death_reason = death_wounds
					}
				}
			}
		}
	}
}