﻿namespace = necro_char

#assign undead trait to those of said culture and clear out persistent diseases. Infections and wounds are fine, though.
necro_char.1 = {
	type = country_event
	hidden = yes
	title = "necro_char.1.t"
	desc = "necro_char.1.d"
	#placeholder image
	picture = crucifixion
	
	trigger = {
		always = yes
	}
	option = {
		name = "necro_char.1.a"
		every_character = {
			limit = {
				has_culture = undead
				NOT = { has_trait = undead_char_def }
			}
			add_trait = undead_char_def
			if = {
				limit = { has_trait = hemorrhagic_fever }
				remove_trait = hemorrhagic_fever
			}
			if = {
				limit = { has_trait = cancer }
				remove_trait = cancer
			}
			if = {
				limit = { has_trait = diphtheria }
				remove_trait = diphtheria
			}
			if = {
				limit = { has_trait = dysentery }
				remove_trait = dysentery
			}
			if = {
				limit = { has_trait = gangrene }
				remove_trait = gangrene
			}
			if = {
				limit = { has_trait = gout }
				remove_trait = gout
			}
			if = {
				limit = { has_trait = infection }
				remove_trait = infection
			}
			if = {
				limit = { has_trait = leper }
				remove_trait = leper
			}
			if = {
				limit = { has_trait = plague }
				remove_trait = plague
			}
			if = {
				limit = { has_trait = pneumonia }
				remove_trait = pneumonia
			}
			if = {
				limit = { has_trait = pox }
				remove_trait = pox
			}
			if = {
				limit = { has_trait = lichking }
				if = {
					limit = { has_trait = arthritis }
					remove_trait = arthritis
				}
				if = {
					limit = { has_trait = blind }
					remove_trait = blind
				}
				if = {
					limit = { has_trait = brain_damaged }
					remove_trait = brain_damaged
				}
				if = {
					limit = { has_trait = dementia }
					remove_trait = dementia
				}
				if = {
					limit = { has_trait = epileptic }
					remove_trait = epileptic
				}
				if = {
					limit = { has_trait = frail }
					remove_trait = frail
				}
				if = {
					limit = { has_trait = hunchback }
					remove_trait = hunchback
				}
				if = {
					limit = { has_trait = inbred }
					remove_trait = inbred
				}
				if = {
					limit = { has_trait = invalid }
					remove_trait = invalid
				}
				if = {
					limit = { has_trait = infection }
					remove_trait = infection
				}
				if = {
					limit = { has_trait = limp }
					remove_trait = limp
				}
				if = {
					limit = { has_trait = lunatic }
					remove_trait = lunatic
				}
				if = {
					limit = { has_trait = maimed }
					remove_trait = maimed
				}
				if = {
					limit = { has_trait = mentagra }
					remove_trait = mentagra
				}
				if = {
					limit = { has_trait = one_eyed }
					remove_trait = one_eyed
				}
				if = {
					limit = { has_trait = paralysis }
					remove_trait = paralysis
				}
				if = {
					limit = { has_trait = wounded }
					remove_trait = wounded
				}
			}
		}
	}
}