namespace = blacksmith

character_event = {
	id = blacksmith.100
	desc = BLCKSMTHEVNT100_desc
	picture = GFX_evt_weaponsmith 
	
	is_triggered_only = yes
	
	option = {
		name = "BLCKSMTHEVNT100_opt"
		save_event_target_as = blacksmith_4vc
		set_character_flag = crafting
		if = {
			limit = {
				NOT = {
					has_character_flag = blacksmith_experience_set
				}
			}
			character_event = { id = blacksmith.999 days = 1 }
		}
		liege = {
			character_event = { id = blacksmith.101 days = 1 }
		}
		set_variable = {
			which = smith_ability
			value = 1
		}
		hidden_tooltip = {
			if = {
				limit = {
					martial = 10
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 15
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 20
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 30
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 40
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 50
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 60
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 70
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 80
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 90
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 100
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 10
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 13
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 16
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 20
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 30
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 40
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 50
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 60
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 70
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 80
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 90
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 100
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					stewardship = 15
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					stewardship = 30
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					stewardship = 45
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					stewardship = 60
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					stewardship = 75
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					stewardship = 90
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					check_variable = { which = blacksmith_experience value = 3 }
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					check_variable = { which = blacksmith_experience value = 8 }
				}
				change_variable = {
					which = smith_ability
					value = 3
				}
			}
			if = {
				limit = {
					check_variable = { which = blacksmith_experience value = 24 }
				}
				change_variable = {
					which = smith_ability
					value = 6
				}
			}
		}
	}
}

character_event = {
	id = blacksmith.101
	desc = BLCKSMTHEVNT101_desc
	picture = GFX_evt_weaponsmith 
	
	is_triggered_only = yes
	
	option = {
		name = "BLCKSMTHEVNT101_optSword"
		trigger = {
			NOT = {
				religion_group = muslim
			}
		}
		set_character_flag = sword_requested
		ROOT = {
			character_event = { id = blacksmith.105 }
		}
	}
	
	option = {
		name = "BLCKSMTHEVNT101_optScim"
		trigger = {
			religion_group = muslim
		}
		set_character_flag = scim_requested
		ROOT = {
			character_event = { id = blacksmith.105 }
		}
	}
	
	option = {
		name = "BLCKSMTHEVNT101_optMace"
		set_character_flag = mace_requested
		ROOT = {
			character_event = { id = blacksmith.105 }
		}
	}
	
	option = {
		name = "BLCKSMTHEVNT101_optAxe"
		set_character_flag = axe_requested
		ROOT = {
			character_event = { id = blacksmith.105 }
		}
	}
	
	option = {
		name = "BLCKSMTHEVNT101_optOther"
		ROOT = {
			character_event = { id = blacksmith.102 }
		}
	}	
}

character_event = {
	id = blacksmith.102
	desc = BLCKSMTHEVNT101_desc
	picture = GFX_evt_weaponsmith 
	
	is_triggered_only = yes
	
	option = {
		name = "BLCKSMTHEVNT102_optLance"
		set_character_flag = lance_requested
		ROOT = {
			character_event = { id = blacksmith.105 }
		}
	}
	
	option = {
		name = "BLCKSMTHEVNT102_optBow"
		set_character_flag = bow_requested
		ROOT = {
			character_event = { id = blacksmith.105 }
		}
	}
	
	option = {
		name = "BLCKSMTHEVNT101_optOther"
		ROOT = {
			character_event = { id = blacksmith.101 }
		}
	}	
}

character_event = {
	id = blacksmith.105
	desc = BLCKSMTHEVNT105_desc
	picture = GFX_evt_weaponsmith 
	
	is_triggered_only = yes
	
	option = {
		name = "BLCKSMTHEVNT105_optTier1"
		set_character_flag = low_tier_weapon
		scaled_wealth = { value = -1.9 min = -75 max = -150 }
		event_target:blacksmith_4vc = {
			character_event = { id = blacksmith.110 }
		}
	}
	
	option = {
		name = "BLCKSMTHEVNT105_optTier2"
		set_character_flag = mid_tier_weapon
		scaled_wealth = { value = -3.75 min = -270 max = -750 }
		event_target:blacksmith_4vc = {
			character_event = { id = blacksmith.110 }
		}
	}
	
	option = {
		name = "BLCKSMTHEVNT105_optTier3"
		set_character_flag = high_tier_weapon
		scaled_wealth = { value = -5.25 min = -600 max = -3000 }
		event_target:blacksmith_4vc = {
			character_event = { id = blacksmith.110 }
		}
	}
	
	option = {
		name = "BLCKSMTHEVNT105_optTier4"
		set_character_flag = reinforced_weapon
		scaled_wealth = { value = -13.25 min = -2500 max = -7500 }
		event_target:blacksmith_4vc = {
			character_event = { id = blacksmith.110 }
		}
	}
}

character_event = {
	id = blacksmith.110
	desc = BLCKSMTHEVNT110_desc
	picture = GFX_evt_weaponsmith 
	
	is_triggered_only = yes
	
	option = {
		name = "BLCKSMTHEVNT110_opt"
		if = {
			limit = {
				check_variable = { which = smith_ability value = 25 }
			}
			FROM = {
				character_event = { id = blacksmith.111 days = 20 random = 40 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 23 }
			}
			FROM = {
				character_event = { id = blacksmith.111 days = 25 random = 50 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 21 }
			}
			FROM = {
				character_event = { id = blacksmith.111 days = 30 random = 60 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 19 }
			}
			FROM = {
				character_event = { id = blacksmith.111 days = 35 random = 70 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 17 }
			}
			FROM = {
				character_event = { id = blacksmith.111 days = 40 random = 80 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 15 }
			}
			FROM = {
				character_event = { id = blacksmith.111 days = 45 random = 90 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 13 }
			}
			FROM = {
				character_event = { id = blacksmith.111 days = 50 random = 100 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 11 }
			}
			FROM = {
				character_event = { id = blacksmith.111 days = 55 random = 110 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 9 }
			}
			FROM = {
				character_event = { id = blacksmith.111 days = 65 random = 130 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 7 }
			}
			FROM = {
				character_event = { id = blacksmith.111 days = 75 random = 150 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 5 }
			}
			FROM = {
				character_event = { id = blacksmith.111 days = 100 random = 200 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 3 }
			}
			FROM = {
				character_event = { id = blacksmith.111 days = 125 random = 250 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 1 }
			}
			FROM = {
				character_event = { id = blacksmith.111 days = 150 random = 300 }
			}
			break = yes
		}
	}
}

character_event = {
	id = blacksmith.111
	desc = BLCKSMTHEVNT111_desc
	picture = GFX_evt_weaponsmith 
	
	is_triggered_only = yes
	
	option = {
		name = "BLCKSMTHEVNT111_opt"
		event_target:blacksmith_4vc = {
			clr_character_flag = crafting
			change_variable = {
				which = blacksmith_experience
				value = 1
			}
			if = {
				limit = {
					liege = {
						has_character_flag = high_tier_weapon
					}
				}
				random_list = {
					50 = {}
					50 = {
						change_variable = {
							which = blacksmith_experience
							value = 1
						}
					}
				}
			}
			if = {
				limit = {
					liege = {
						has_character_flag = reinforced_weapon
					}
				}
				change_variable = {
					which = blacksmith_experience
					value = 1
				}
			}
			if = {
				limit = {
					NOT = {
						has_character_modifier = 4vc_renowned_blacksmith
					}
					check_variable = { which = blacksmith_experience value = 24 }
				}
				add_character_modifier = { name = 4vc_renowned_blacksmith duration = -1 }
			}
		}
		clear_event_target = blacksmith_4vc
		if = {
			limit = {
				AND = {
					has_character_flag = low_tier_weapon
					has_character_flag = sword_requested
				}
			}
			add_artifact = sword_tier_1_new
			clr_character_flag = low_tier_weapon
			clr_character_flag = sword_requested
		}
		if = {
			limit = {
				AND = {
					has_character_flag = mid_tier_weapon
					has_character_flag = sword_requested
				}
			}
			add_artifact = sword_tier_2_new
			clr_character_flag = mid_tier_weapon
			clr_character_flag = sword_requested
		}
		if = {
			limit = {
				AND = {
					has_character_flag = high_tier_weapon
					has_character_flag = sword_requested
				}
			}
			character_event = { id = blacksmith.112 }
		}
		if = {
			limit = {
				AND = {
					has_character_flag = reinforced_weapon
					has_character_flag = sword_requested
				}
			}
			character_event = { id = blacksmith.112 }
		}
		if = {
			limit = {
				AND = {
					has_character_flag = low_tier_weapon
					has_character_flag = scim_requested
				}
			}
			add_artifact = scimitar_tier_1_new
			clr_character_flag = low_tier_weapon
			clr_character_flag = scim_requested
		}
		if = {
			limit = {
				AND = {
					has_character_flag = mid_tier_weapon
					has_character_flag = scim_requested
				}
			}
			add_artifact = scimitar_tier_2_new
			clr_character_flag = mid_tier_weapon
			clr_character_flag = scim_requested
		}
		if = {
			limit = {
				AND = {
					has_character_flag = high_tier_weapon
					has_character_flag = scim_requested
				}
			}
			character_event = { id = blacksmith.112 }
		}
		if = {
			limit = {
				AND = {
					has_character_flag = reinforced_weapon
					has_character_flag = scim_requested
				}
			}
			character_event = { id = blacksmith.112 }
		}
		if = {
			limit = {
				AND = {
					has_character_flag = low_tier_weapon
					has_character_flag = lance_requested
				}
			}
			add_artifact = lance_tier_1_new
			clr_character_flag = low_tier_weapon
			clr_character_flag = lance_requested
		}
		if = {
			limit = {
				AND = {
					has_character_flag = mid_tier_weapon
					has_character_flag = lance_requested
				}
			}
			add_artifact = lance_tier_2_new
			clr_character_flag = mid_tier_weapon
			clr_character_flag = lance_requested
		}
		if = {
			limit = {
				AND = {
					has_character_flag = high_tier_weapon
					has_character_flag = lance_requested
				}
			}
			character_event = { id = blacksmith.112 }
		}
		if = {
			limit = {
				AND = {
					has_character_flag = reinforced_weapon
					has_character_flag = lance_requested
				}
			}
			character_event = { id = blacksmith.112 }
		}
		if = {
			limit = {
				AND = {
					has_character_flag = low_tier_weapon
					has_character_flag = mace_requested
				}
			}
			add_artifact = mace_tier_1_new
			clr_character_flag = low_tier_weapon
			clr_character_flag = mace_requested
		}
		if = {
			limit = {
				AND = {
					has_character_flag = mid_tier_weapon
					has_character_flag = mace_requested
				}
			}
			add_artifact = mace_tier_2_new
			clr_character_flag = mid_tier_weapon
			clr_character_flag = mace_requested
		}
		if = {
			limit = {
				AND = {
					has_character_flag = high_tier_weapon
					has_character_flag = mace_requested
				}
			}
			character_event = { id = blacksmith.112 }
		}
		if = {
			limit = {
				AND = {
					has_character_flag = reinforced_weapon
					has_character_flag = mace_requested
				}
			}
			character_event = { id = blacksmith.112 }
		}
		if = {
			limit = {
				AND = {
					has_character_flag = low_tier_weapon
					has_character_flag = axe_requested
				}
			}
			add_artifact = axe_tier_1_new
			clr_character_flag = low_tier_weapon
			clr_character_flag = axe_requested
		}
		if = {
			limit = {
				AND = {
					has_character_flag = mid_tier_weapon
					has_character_flag = axe_requested
				}
			}
			add_artifact = axe_tier_2_new
			clr_character_flag = mid_tier_weapon
			clr_character_flag = axe_requested
		}
		if = {
			limit = {
				AND = {
					has_character_flag = high_tier_weapon
					has_character_flag = axe_requested
				}
			}
			character_event = { id = blacksmith.112 }
		}
		if = {
			limit = {
				AND = {
					has_character_flag = reinforced_weapon
					has_character_flag = axe_requested
				}
			}
			character_event = { id = blacksmith.112 }
		}
		if = {
			limit = {
				AND = {
					has_character_flag = low_tier_weapon
					has_character_flag = bow_requested
				}
			}
			add_artifact = bow_tier_1_new
			clr_character_flag = low_tier_weapon
			clr_character_flag = bow_requested
		}
		if = {
			limit = {
				AND = {
					has_character_flag = mid_tier_weapon
					has_character_flag = bow_requested
				}
			}
			add_artifact = bow_tier_2_new
			clr_character_flag = mid_tier_weapon
			clr_character_flag = bow_requested
		}
		if = {
			limit = {
				AND = {
					has_character_flag = high_tier_weapon
					has_character_flag = bow_requested
				}
			}
			character_event = { id = blacksmith.112 }
		}
		if = {
			limit = {
				AND = {
					has_character_flag = reinforced_weapon
					has_character_flag = bow_requested
				}
			}
			character_event = { id = blacksmith.112 }
		}
	}
}

character_event = {
	id = blacksmith.112
	desc = BLCKSMTHEVNT112_desc
	picture = GFX_evt_weaponsmith 
	
	is_triggered_only = yes
	
	option = {
        name = {
            text = EVTOPTA_MNM_9122_SWORD
            trigger = { has_character_flag = sword_requested }
        } 
        name = {
            text = EVTOPTA_MNM_9122_SCIMITAR
            trigger = { has_character_flag = scim_requested }
        } 
        name = {
            text = EVTOPTA_MNM_9122_LANCE
            trigger = { has_character_flag = lance_requested }
        } 
        name = {
            text = EVTOPTA_MNM_9122_AXE
            trigger = { has_character_flag = axe_requested }
        } 
        name = {
            text = EVTOPTA_MNM_9122_MACE
            trigger = { has_character_flag = mace_requested }
        } 
        name = {
            text = EVTOPTA_MNM_9122_BOW
            trigger = { has_character_flag = bow_requested }
        } 
		
		clear_event_target = blacksmith_4vc
		if = {
			limit = {
				has_character_flag = sword_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = sword_tier_3_heartseeker
			clr_character_flag = high_tier_weapon
			clr_character_flag = sword_requested
		}
		if = {
			limit = {
				has_character_flag = sword_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = sword_tier_4_heartseeker
			clr_character_flag = reinforced_weapon
			clr_character_flag = sword_requested
		}
		if = {
			limit = {
				has_character_flag = scim_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = scimitar_tier_3_golden
			clr_character_flag = high_tier_weapon
			clr_character_flag = scim_requested
		}
		if = {
			limit = {
				has_character_flag = scim_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = scimitar_tier_4_golden
			clr_character_flag = reinforced_weapon
			clr_character_flag = scim_requested
		}
		if = {
			limit = {
				has_character_flag = lance_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = lance_tier_3_impaler
			clr_character_flag = high_tier_weapon
			clr_character_flag = lance_requested
		}
		if = {
			limit = {
				has_character_flag = lance_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = lance_tier_4_impaler
			clr_character_flag = reinforced_weapon
			clr_character_flag = lance_requested
		}
		if = {
			limit = {
				has_character_flag = axe_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = axe_tier_3_cleaver
			clr_character_flag = high_tier_weapon
			clr_character_flag = axe_requested
		}
		if = {
			limit = {
				has_character_flag = mace_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = mace_tier_3_foe_hammer
			clr_character_flag = high_tier_weapon
			clr_character_flag = mace_requested
		}
		if = {
			limit = {
				has_character_flag = bow_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = bow_tier_3_silent_wind
			clr_character_flag = high_tier_weapon
			clr_character_flag = bow_requested
		}
		if = {
			limit = {
				has_character_flag = axe_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = axe_tier_4_cleaver
			clr_character_flag = reinforced_weapon
			clr_character_flag = axe_requested
		}
		if = {
			limit = {
				has_character_flag = mace_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = mace_tier_4_foe_hammer
			clr_character_flag = reinforced_weapon
			clr_character_flag = mace_requested
		}
		if = {
			limit = {
				has_character_flag = bow_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = bow_tier_4_silent_wind
			clr_character_flag = reinforced_weapon
			clr_character_flag = bow_requested
		}
	}
	option = {
        name = {
            text = EVTOPTB_MNM_9122_SWORD
            trigger = { has_character_flag = sword_requested }
        } 
        name = {
            text = EVTOPTB_MNM_9122_SCIMITAR
            trigger = { has_character_flag = scim_requested }
        } 
        name = {
            text = EVTOPTB_MNM_9122_LANCE
            trigger = { has_character_flag = lance_requested }
        } 
        name = {
            text = EVTOPTB_MNM_9122_AXE
            trigger = { has_character_flag = axe_requested }
        } 
        name = {
            text = EVTOPTB_MNM_9122_MACE
            trigger = { has_character_flag = mace_requested }
        } 
        name = {
            text = EVTOPTB_MNM_9122_BOW
            trigger = { has_character_flag = bow_requested }
        } 
		
		clear_event_target = blacksmith_4vc
		if = {
			limit = {
				has_character_flag = sword_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = sword_tier_3_vengeance
			clr_character_flag = high_tier_weapon
			clr_character_flag = sword_requested
		}
		if = {
			limit = {
				has_character_flag = sword_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = sword_tier_4_vengeance
			clr_character_flag = reinforced_weapon
			clr_character_flag = sword_requested
		}
		if = {
			limit = {
				has_character_flag = scim_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = scimitar_tier_3_fortune
			clr_character_flag = high_tier_weapon
			clr_character_flag = scim_requested
		}
		if = {
			limit = {
				has_character_flag = scim_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = scimitar_tier_4_fortune
			clr_character_flag = reinforced_weapon
			clr_character_flag = scim_requested
		}
		if = {
			limit = {
				has_character_flag = lance_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = lance_tier_3_trident
			clr_character_flag = high_tier_weapon
			clr_character_flag = lance_requested
		}
		if = {
			limit = {
				has_character_flag = lance_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = lance_tier_4_trident
			clr_character_flag = reinforced_weapon
			clr_character_flag = lance_requested
		}
		if = {
			limit = {
				has_character_flag = axe_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = axe_tier_3_ravager
			clr_character_flag = high_tier_weapon
			clr_character_flag = axe_requested
		}
		if = {
			limit = {
				has_character_flag = mace_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = mace_tier_3_bone_breaker
			clr_character_flag = high_tier_weapon
			clr_character_flag = mace_requested
		}
		if = {
			limit = {
				has_character_flag = bow_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = bow_tier_3_lightning
			clr_character_flag = high_tier_weapon
			clr_character_flag = bow_requested
		}
		if = {
			limit = {
				has_character_flag = axe_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = axe_tier_4_ravager
			clr_character_flag = reinforced_weapon
			clr_character_flag = axe_requested
		}
		if = {
			limit = {
				has_character_flag = mace_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = mace_tier_4_bone_breaker
			clr_character_flag = reinforced_weapon
			clr_character_flag = mace_requested
		}
		if = {
			limit = {
				has_character_flag = bow_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = bow_tier_4_lightning
			clr_character_flag = reinforced_weapon
			clr_character_flag = bow_requested
		}
	}
	option = {
        name = {
            text = EVTOPTC_MNM_9122_SWORD
            trigger = { has_character_flag = sword_requested }
        } 
        name = {
            text = EVTOPTC_MNM_9122_SCIMITAR
            trigger = { has_character_flag = scim_requested }
        } 
        name = {
            text = EVTOPTC_MNM_9122_LANCE
            trigger = { has_character_flag = lance_requested }
        } 
        name = {
            text = EVTOPTC_MNM_9122_AXE
            trigger = { has_character_flag = axe_requested }
        } 
        name = {
            text = EVTOPTC_MNM_9122_MACE
            trigger = { has_character_flag = mace_requested }
        } 
        name = {
            text = EVTOPTC_MNM_9122_BOW
            trigger = { has_character_flag = bow_requested }
        } 
		
		clear_event_target = blacksmith_4vc
		if = {
			limit = {
				has_character_flag = sword_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = sword_tier_3_fury
			clr_character_flag = high_tier_weapon
			clr_character_flag = sword_requested
		}
		if = {
			limit = {
				has_character_flag = sword_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = sword_tier_4_fury
			clr_character_flag = reinforced_weapon
			clr_character_flag = sword_requested
		}
		if = {
			limit = {
				has_character_flag = scim_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = scimitar_tier_3_conquest
			clr_character_flag = high_tier_weapon
			clr_character_flag = scim_requested
		}
		if = {
			limit = {
				has_character_flag = scim_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = scimitar_tier_4_conquest
			clr_character_flag = reinforced_weapon
			clr_character_flag = scim_requested
		}
		if = {
			limit = {
				has_character_flag = lance_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = lance_tier_3_piercer
			clr_character_flag = high_tier_weapon
			clr_character_flag = lance_requested
		}
		if = {
			limit = {
				has_character_flag = lance_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = lance_tier_4_piercer
			clr_character_flag = reinforced_weapon
			clr_character_flag = lance_requested
		}
		if = {
			limit = {
				has_character_flag = axe_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = axe_tier_3_marauder
			clr_character_flag = high_tier_weapon
			clr_character_flag = axe_requested
		}
		if = {
			limit = {
				has_character_flag = mace_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = mace_tier_3_shatterer
			clr_character_flag = high_tier_weapon
			clr_character_flag = mace_requested
		}
		if = {
			limit = {
				has_character_flag = bow_requested
				has_character_flag = high_tier_weapon
			}
			add_artifact = bow_tier_3_eagle
			clr_character_flag = high_tier_weapon
			clr_character_flag = bow_requested
		}
		if = {
			limit = {
				has_character_flag = axe_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = axe_tier_4_marauder
			clr_character_flag = reinforced_weapon
			clr_character_flag = axe_requested
		}
		if = {
			limit = {
				has_character_flag = mace_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = mace_tier_4_shatterer
			clr_character_flag = reinforced_weapon
			clr_character_flag = mace_requested
		}
		if = {
			limit = {
				has_character_flag = bow_requested
				has_character_flag = reinforced_weapon
			}
			add_artifact = bow_tier_4_eagle
			clr_character_flag = reinforced_weapon
			clr_character_flag = bow_requested
		}
	}
}

character_event = {
	id = blacksmith.200
	desc = BLCKSMTHEVNT200_desc
	picture = GFX_evt_weaponsmith 
	
	is_triggered_only = yes
	
	option = {
		name = "BLCKSMTHEVNT200_opt"
		save_event_target_as = armorsmith_4vc
		set_character_flag = crafting
		if = {
			limit = {
				NOT = {
					has_character_flag = blacksmith_experience_set
				}
			}
			character_event = { id = blacksmith.999 days = 1 }
		}
		liege = {
			character_event = { id = blacksmith.205 days = 1 }
		}
		set_variable = {
			which = smith_ability
			value = 1
		}
		hidden_tooltip = {
			if = {
				limit = {
					martial = 10
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 15
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 20
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 30
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 40
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 50
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 60
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 70
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 80
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 90
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					martial = 100
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 10
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 13
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 16
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 20
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 30
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 40
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 50
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 60
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 70
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 80
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 90
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					learning = 100
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					stewardship = 15
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					stewardship = 30
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					stewardship = 45
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					stewardship = 60
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					stewardship = 75
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					stewardship = 90
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					check_variable = { which = blacksmith_experience value = 3 }
				}
				change_variable = {
					which = smith_ability
					value = 1
				}
			}
			if = {
				limit = {
					check_variable = { which = blacksmith_experience value = 8 }
				}
				change_variable = {
					which = smith_ability
					value = 3
				}
			}
			if = {
				limit = {
					check_variable = { which = blacksmith_experience value = 24 }
				}
				change_variable = {
					which = smith_ability
					value = 6
				}
			}
		}
	}
}

character_event = {
	id = blacksmith.205
	desc = BLCKSMTHEVNT205_desc
	picture = GFX_evt_weaponsmith 
	
	is_triggered_only = yes
	
	option = {
		name = "BLCKSMTHEVNT205_optTier1"
		set_character_flag = bronze_armor
		scaled_wealth = { value = -1.9 min = -75 max = -150 }
		event_target:armorsmith_4vc = {
			character_event = { id = blacksmith.210 }
		}
	}
	
	option = {
		name = "BLCKSMTHEVNT205_optTier2"
		set_character_flag = iron_armor
		scaled_wealth = { value = -3.75 min = -270 max = -750 }
		event_target:armorsmith_4vc = {
			character_event = { id = blacksmith.210 }
		}
	}
	
	option = {
		name = "BLCKSMTHEVNT205_optTier3"
		set_character_flag = steel_armor
		scaled_wealth = { value = -5.25 min = -600 max = -3000 }
		event_target:armorsmith_4vc = {
			character_event = { id = blacksmith.210 }
		}
	}
	
	option = {
		name = "BLCKSMTHEVNT205_optTier4"
		set_character_flag = reinforced_armor
		scaled_wealth = { value = -13.25 min = -2500 max = -7500 }
		event_target:armorsmith_4vc = {
			character_event = { id = blacksmith.210 }
		}
	}
}

character_event = {
	id = blacksmith.210
	desc = BLCKSMTHEVNT210_desc
	picture = GFX_evt_weaponsmith 
	
	is_triggered_only = yes
	
	option = {
		name = "BLCKSMTHEVNT210_opt"
		if = {
			limit = {
				check_variable = { which = smith_ability value = 25 }
			}
			FROM = {
				character_event = { id = blacksmith.211 days = 20 random = 40 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 23 }
			}
			FROM = {
				character_event = { id = blacksmith.211 days = 25 random = 50 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 21 }
			}
			FROM = {
				character_event = { id = blacksmith.211 days = 30 random = 60 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 19 }
			}
			FROM = {
				character_event = { id = blacksmith.211 days = 35 random = 70 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 17 }
			}
			FROM = {
				character_event = { id = blacksmith.211 days = 40 random = 80 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 15 }
			}
			FROM = {
				character_event = { id = blacksmith.211 days = 45 random = 90 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 13 }
			}
			FROM = {
				character_event = { id = blacksmith.211 days = 50 random = 100 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 11 }
			}
			FROM = {
				character_event = { id = blacksmith.211 days = 55 random = 110 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 9 }
			}
			FROM = {
				character_event = { id = blacksmith.211 days = 65 random = 130 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 7 }
			}
			FROM = {
				character_event = { id = blacksmith.211 days = 75 random = 150 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 5 }
			}
			FROM = {
				character_event = { id = blacksmith.211 days = 100 random = 200 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 3 }
			}
			FROM = {
				character_event = { id = blacksmith.211 days = 125 random = 250 }
			}
			break = yes
		}
		if = {
			limit = {
				check_variable = { which = smith_ability value = 1 }
			}
			FROM = {
				character_event = { id = blacksmith.211 days = 150 random = 300 }
			}
			break = yes
		}
	}
}

character_event = {
	id = blacksmith.211
	desc = BLCKSMTHEVNT211_desc
	picture = GFX_evt_weaponsmith 
	
	is_triggered_only = yes
	
	option = {
		name = "BLCKSMTHEVNT211_opt"
		event_target:armorsmith_4vc = {
			clr_character_flag = crafting
			change_variable = {
				which = blacksmith_experience
				value = 1
			}
			if = {
				limit = {
					liege = {
						has_character_flag = steel_armor
					}
				}
				random_list = {
					50 = {}
					50 = {
						change_variable = {
							which = blacksmith_experience
							value = 1
						}
					}
				}
			}
			if = {
				limit = {
					liege = {
						has_character_flag = reinforced_armor
					}
				}
				change_variable = {
					which = blacksmith_experience
					value = 1
				}
			}
			if = {
				limit = {
					NOT = {
						has_character_modifier = 4vc_renowned_blacksmith
					}
					check_variable = { which = blacksmith_experience value = 24 }
				}
				add_character_modifier = { name = 4vc_renowned_blacksmith duration = -1 }
			}
		}
		clear_event_target = armorsmith_4vc
		if = {
			limit = {
				AND = {
					has_character_flag = bronze_armor
				}
			}
			add_artifact = armor_tier_1
			clr_character_flag = bronze_armor
		}
		if = {
			limit = {
				AND = {
					has_character_flag = iron_armor
				}
			}
			add_artifact = armor_tier_2
			clr_character_flag = iron_armor
		}
		if = {
			limit = {
				AND = {
					has_character_flag = steel_armor
				}
			}
			character_event = { id = blacksmith.212 }
			#clr_character_flag = steel_armor
		}
		if = {
			limit = {
				AND = {
					has_character_flag = reinforced_armor
				}
			}
			character_event = { id = blacksmith.212 }
			#clr_character_flag = reinforced_armor
		}
	}
}

character_event = {
	id = blacksmith.212
	desc = BLCKSMTHEVNT212_desc
	picture = GFX_evt_weaponsmith 
	
	is_triggered_only = yes
	
	option = {
        name = {
            text = EVTOPTA_MNM_9122_ARMOR
        }
		if = {
			limit = {
				has_character_flag = steel_armor
			}
			add_artifact = armor_tier_3_guardian
			clr_character_flag = steel_armor
		}
		if = {
			limit = {
				has_character_flag = reinforced_armor
			}
			add_artifact = armor_tier_4_guardian
			clr_character_flag = reinforced_armor
		}		
	}
	option = {
        name = {
            text = EVTOPTB_MNM_9122_ARMOR
        }
		if = {
			limit = {
				has_character_flag = steel_armor
			}
			add_artifact = armor_tier_3_champion
			clr_character_flag = steel_armor
		}
		if = {
			limit = {
				has_character_flag = reinforced_armor
			}
			add_artifact = armor_tier_4_champion
			clr_character_flag = reinforced_armor
		}		
	}
	option = {
        name = {
            text = EVTOPTC_MNM_9122_ARMOR
        }
		if = {
			limit = {
				has_character_flag = steel_armor
			}
			add_artifact = armor_tier_3_warden
			clr_character_flag = steel_armor
		}
		if = {
			limit = {
				has_character_flag = reinforced_armor
			}
			add_artifact = armor_tier_4_warden
			clr_character_flag = reinforced_armor
		}		
	}
	
}

character_event = {
	id = blacksmith.999
	hide_window = yes
	
	is_triggered_only = yes
	
	immediate = {
		set_character_flag = blacksmith_experience_set
		set_variable = {
			which = blacksmith_experience
			value = 0
		}
	}
}
