namespace = market
########################
# GO TO THE MARKET
########################
character_event = {
	id = "market.0"
	desc = "EVTDESCmarket.0"
	picture = GFX_evt_fan_market
	border = GFX_event_normal_frame_economy
	is_triggered_only = yes
		option = {
		name = EVTOPTAmarket.0
                hidden_tooltip = {
                    character_event = {
							id = market.1
                    }
				}		
	}
		option = {
		name = EVTOPTBmarket.0
                hidden_tooltip = {
                    character_event = {
							id = market.2
                    }
				}		
	}
		option = {
		name = EVTOPTCmarket.0
		trigger = {
			has_character_flag = can_smith
		}
                hidden_tooltip = {
                    character_event = {
							id = market.3
                    }
				}		
	}
		option = {
		name = EVTOPTDmarket.0		
	}
}
character_event = {
	id = "market.1"
	desc = "EVTDESCmarket.1"
	picture = GFX_evt_fan_market
	border = GFX_event_normal_frame_economy
	is_triggered_only = yes
		option = {
		name = EVTOPTAmarket.1
                hidden_tooltip = {
                    character_event = {
							id = market.4
                    }
				}		
	}
		option = {
		name = EVTOPTBmarket.1
                hidden_tooltip = {
                    character_event = {
							id = market.5
                    }
				}		
	}
		option = {
		name = EVTOPTCmarket.1
                hidden_tooltip = {
                    character_event = {
							id = market.6
                    }
				}		
	}
		option = {
		name = EVTOPTDmarket.1
                hidden_tooltip = {
                    character_event = {
							id = market.0
                    }
				}		
	}
}
character_event = {
	id = "market.2"
	desc = "EVTDESCmarket.2"
	picture = GFX_evt_fan_market
	border = GFX_event_normal_frame_economy
	is_triggered_only = yes
		option = {
		name = EVTOPTAmarket.2
                hidden_tooltip = {
                    character_event = {
							id = market.7
                    }
				}		
	}
		option = {
		name = EVTOPTBmarket.2
                hidden_tooltip = {
                    character_event = {
							id = market.8
                    }
				}		
	}
		option = {
		name = EVTOPTCmarket.2
                hidden_tooltip = {
                    character_event = {
							id = market.9
                    }
				}		
	}
		option = {
		name = EVTOPTDmarket.2
                hidden_tooltip = {
                    character_event = {
							id = market.0
                    }
				}		
	}
}
character_event = {
	id = "market.3"
	desc = "EVTDESCmarket.3"
	picture = GFX_evt_fan_market
	border = GFX_event_normal_frame_economy
	is_triggered_only = yes
		option = {
		name = EVTOPTAmarket.3
                hidden_tooltip = {
                    character_event = {
							id = market.10
                    }
				}		
	}
		option = {
		name = EVTOPTBmarket.3
                hidden_tooltip = {
                    character_event = {
							id = market.11
                    }
				}		
	}
		option = {
		name = EVTOPTCmarket.3
                hidden_tooltip = {
                    character_event = {
							id = market.12
                    }
				}		
	}
		option = {
		name = EVTOPTDmarket.3
                hidden_tooltip = {
                    character_event = {
							id = market.0
                    }
				}		
	}
}
character_event = {
	id = "market.4"
	desc = "EVTDESCmarket.4"
	picture = GFX_evt_fan_market
	border = GFX_event_normal_frame_economy
	is_triggered_only = yes
		option = {
		name = EVTOPTAmarket.4
		trigger = {
			wealth = 50
			NOT = { trait = Bronze_Sword }
		}
		if = {
			limit = {
				wealth = 50 
				NOT = { trait = Bronze_Sword }
			}
		}
		if = {
			limit = {
				trait = No_Sword
			}
			remove_trait = No_Sword
		}		
		add_trait = Bronze_Sword
		wealth = -50
		hidden_tooltip = {
                    character_event = {
							id = market.4
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.4
		trigger = {
			wealth = 100
			NOT = { trait = Bronze_Set }
		}
		if = {
			limit = {
				wealth = 100
				NOT = { trait = Bronze_Set }
			}
		}
		if = {
			limit = {
				trait = No_Set
			}
			remove_trait = No_Set
		}			
		add_trait = Bronze_Set
		wealth = -100
		hidden_tooltip = {
                    character_event = {
							id = market.4
                    }
				}	
	}
		option = {
		name = EVTOPTCmarket.4
                hidden_tooltip = {
                    character_event = {
							id = market.1
                    }
				}		
	}
}
character_event = {
	id = "market.5"
	desc = "EVTDESCmarket.5"
	picture = GFX_evt_fan_market
	border = GFX_event_normal_frame_economy
	is_triggered_only = yes
		option = {
		name = EVTOPTAmarket.5
		trigger = {
			wealth = 88
			NOT = { trait = Iron_Sword }
		}
		if = {
			limit = {
				wealth = 88
				NOT = { trait = Iron_Sword }
			}
		}
		if = {
			limit = {
				trait = No_Sword
			}
			remove_trait = No_Sword
		}		
		add_trait = Iron_Sword
		wealth = -88
		hidden_tooltip = {
                    character_event = {
							id = market.5
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.5
		trigger = {
			wealth = 175
			NOT = { trait = Iron_Set }
		}
		if = {
			limit = {
				wealth = 175
				NOT = { trait = Iron_Set }
			}
		}
		if = {
			limit = {
				trait = No_Set
			}
			remove_trait = No_Set
		}			
		add_trait = Iron_Set
		wealth = -175
		hidden_tooltip = {
                    character_event = {
							id = market.5
                    }
				}	
	}
		option = {
		name = EVTOPTCmarket.5
                hidden_tooltip = {
                    character_event = {
							id = market.1
                    }
				}		
	}
}
character_event = {
	id = "market.6"
	desc = "EVTDESCmarket.6"
	picture = GFX_evt_fan_market
	border = GFX_event_normal_frame_economy
	is_triggered_only = yes
		option = {
		name = EVTOPTAmarket.6
		trigger = {
			wealth = 154
			NOT = { trait = Steel_Sword }
		}
		if = {
			limit = {
				wealth = 154
				NOT = { trait = Steel_Sword }
			}
		}
		if = {
			limit = {
				trait = No_Sword
			}
			remove_trait = No_Sword
		}		
		add_trait = Steel_Sword
		wealth = -154
		hidden_tooltip = {
                    character_event = {
							id = market.6
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.6
		trigger = {
			wealth = 306
			NOT = { trait = Steel_Set }
		}
		if = {
			limit = {
				wealth = 306
				NOT = { trait = Steel_Set }
			}
		}
		if = {
			limit = {
				trait = No_Set
			}
			remove_trait = No_Set
		}			
		add_trait = Steel_Set
		wealth = -306
		hidden_tooltip = {
                    character_event = {
							id = market.6
                    }
				}	
	}
		option = {
		name = EVTOPTCmarket.6
                hidden_tooltip = {
                    character_event = {
							id = market.1
                    }
				}		
	}
}
character_event = {
	id = "market.7"
	desc = "EVTDESCmarket.7"
	picture = GFX_evt_fan_market
	border = GFX_event_normal_frame_economy
	is_triggered_only = yes
		option = {
		name = EVTOPTAmarket.7
		trigger = {
			wealth = 100
			NOT = {
				trait = Off_Potion
				trait = Def_Potion
				trait = Morale_Potion
				trait = Heal_Potion
				trait = Mana_Potion
				trait = Wealth_Potion
				trait = Opinion_Potion
				trait = Strength_Potion
				trait = Construction_Potion
			}
		}
		add_trait = Off_Potion
		wealth = -100
		hidden_tooltip = {
                    character_event = {
							id = market.7
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.7
		trigger = {
			wealth = 100
			NOT = {
				trait = Off_Potion
				trait = Def_Potion
				trait = Morale_Potion
				trait = Heal_Potion
				trait = Mana_Potion
				trait = Wealth_Potion
				trait = Opinion_Potion
				trait = Strength_Potion
				trait = Construction_Potion
			}
		}
		add_trait = Def_Potion
		wealth = -100
		hidden_tooltip = {
                    character_event = {
							id = market.7
                    }
				}
	}
		option = {
		name = EVTOPTCmarket.7
		trigger = {
			wealth = 100
			NOT = {
				trait = Off_Potion
				trait = Def_Potion
				trait = Morale_Potion
				trait = Heal_Potion
				trait = Mana_Potion
				trait = Wealth_Potion
				trait = Opinion_Potion
				trait = Strength_Potion
				trait = Construction_Potion
			}
		}
		add_trait = Morale_Potion
		wealth = -100
		hidden_tooltip = {
                    character_event = {
							id = market.7
                    }
				}	
	}
		option = {
		name = EVTOPTDmarket.7
                hidden_tooltip = {
                    character_event = {
							id = market.2
                    }
				}		
	}
}
character_event = {
	id = "market.8"
	desc = "EVTDESCmarket.8"
	picture = GFX_evt_fan_market
	border = GFX_event_normal_frame_economy
	is_triggered_only = yes
		option = {
		name = EVTOPTAmarket.8
		trigger = {
			wealth = 100
			NOT = {
				trait = Off_Potion
				trait = Def_Potion
				trait = Morale_Potion
				trait = Heal_Potion
				trait = Mana_Potion
				trait = Wealth_Potion
				trait = Opinion_Potion
				trait = Strength_Potion
				trait = Construction_Potion
			}
		}
		add_trait = Heal_Potion
		wealth = -100
		hidden_tooltip = {
                    character_event = {
							id = market.8
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.8
		trigger = {
			wealth = 100
			NOT = {
				trait = Off_Potion
				trait = Def_Potion
				trait = Morale_Potion
				trait = Heal_Potion
				trait = Mana_Potion
				trait = Wealth_Potion
				trait = Opinion_Potion
				trait = Strength_Potion
				trait = Construction_Potion
			}
		}
		add_trait = Mana_Potion
		wealth = -200
		hidden_tooltip = {
                    character_event = {
							id = market.8
                    }
				}
	}
		option = {
		name = EVTOPTCmarket.8
		trigger = {
			piety = 200
			NOT = {
				trait = Off_Potion
				trait = Def_Potion
				trait = Morale_Potion
				trait = Heal_Potion
				trait = Mana_Potion
				trait = Wealth_Potion
				trait = Opinion_Potion
				trait = Strength_Potion
				trait = Construction_Potion
			}
		}
		add_trait = Wealth_Potion
		piety = -200
		hidden_tooltip = {
                    character_event = {
							id = market.8
                    }
				}	
	}
		option = {
		name = EVTOPTDmarket.8
                hidden_tooltip = {
                    character_event = {
							id = market.2
                    }
				}		
	}
}
character_event = {
	id = "market.9"
	desc = "EVTDESCmarket.9"
	picture = GFX_evt_fan_market
	border = GFX_event_normal_frame_economy
	is_triggered_only = yes
		option = {
		name = EVTOPTAmarket.9
		trigger = {
			wealth = 100
			NOT = {
				trait = Off_Potion
				trait = Def_Potion
				trait = Morale_Potion
				trait = Heal_Potion
				trait = Mana_Potion
				trait = Wealth_Potion
				trait = Opinion_Potion
				trait = Strength_Potion
				trait = Construction_Potion
			}
		}
		add_trait = Opinion_Potion
		wealth = -100
		hidden_tooltip = {
                    character_event = {
							id = market.9
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.9
		trigger = {
			wealth = 100
			NOT = {
				trait = Off_Potion
				trait = Def_Potion
				trait = Morale_Potion
				trait = Heal_Potion
				trait = Mana_Potion
				trait = Wealth_Potion
				trait = Opinion_Potion
				trait = Strength_Potion
				trait = Construction_Potion
			}
		}
		add_trait = Strength_Potion
		wealth = -100
		hidden_tooltip = {
                    character_event = {
							id = market.9
                    }
				}
	}
		option = {
		name = EVTOPTCmarket.9
		trigger = {
			wealth = 100
			NOT = {
				trait = Off_Potion
				trait = Def_Potion
				trait = Morale_Potion
				trait = Heal_Potion
				trait = Mana_Potion
				trait = Wealth_Potion
				trait = Opinion_Potion
				trait = Strength_Potion
				trait = Construction_Potion
			}
		}
		add_trait = Construction_Potion
		wealth = -100
		hidden_tooltip = {
                    character_event = {
							id = market.9
                    }
				}	
	}
		option = {
		name = EVTOPTDmarket.9
                hidden_tooltip = {
                    character_event = {
							id = market.2
                    }
				}		
	}
}
character_event = {
	id = "market.10"
	desc = "EVTDESCmarket.10"
	picture = GFX_evt_fan_market
	border = GFX_event_normal_frame_economy
	is_triggered_only = yes
		option = {
		name = EVTOPTAmarket.10
		trigger = {
			trait = No_Inventory
			wealth = 16
		}
		if = {
			limit = {
				trait = No_Inventory
				wealth = 16
			}
		}
		remove_trait = No_Inventory
		add_trait = Leather_1
		wealth = -16
		hidden_tooltip = {
                    character_event = {
							id = market.10
                    }
				}	
	}
		option = {
		name = EVTOPTAmarket.10
		trigger = {
			trait = Leather_1
			wealth = 16
		}
		if = {
			limit = {
				trait = Leather_1
				wealth = 16
			}
		}
		remove_trait = Leather_1
		add_trait = Leather_2
		wealth = -16
		hidden_tooltip = {
                    character_event = {
							id = market.10
                    }
				}
	}
		option = {
		name = EVTOPTAmarket.10
		trigger = {
			trait = Leather_2
			wealth = 16
		}
		if = {
			limit = {
				trait = Leather_2
				wealth = 16
			}
		}
		remove_trait = Leather_2
		add_trait = Leather_3
		wealth = -16
		hidden_tooltip = {
                    character_event = {
							id = market.10
                    }
				}	
	}
		option = {
		name = EVTOPTAmarket.10
		trigger = {
			trait = Leather_3
			wealth = 16
		}
		if = {
			limit = {
				trait = Leather_3
				wealth = 16
			}
		}
		remove_trait = Leather_3
		add_trait = Leather_4
		wealth = -16
		hidden_tooltip = {
                    character_event = {
							id = market.10
                    }
				}
	}
		option = {
		name = EVTOPTAmarket.10
		trigger = {
			trait = Leather_4
			wealth = 16
		}
		if = {
			limit = {
				trait = Leather_4
				wealth = 16
			}
		}
		remove_trait = Leather_4
		add_trait = Leather_5
		wealth = -16
		hidden_tooltip = {
                    character_event = {
							id = market.10
                    }
				}
	}
		option = {
		name = EVTOPTBmarket.10
		trigger = {
			trait = Leather_5
		}
		if = {
			limit = {
				trait = Leather_5
			}
		}
		remove_trait = Leather_5
		add_trait = Leather_4
		wealth = 13
		hidden_tooltip = {
                    character_event = {
							id = market.10
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.10
		trigger = {
			trait = Leather_4
		}
		if = {
			limit = {
				trait = Leather_4
			}
		}
		remove_trait = Leather_4
		add_trait = Leather_3
		wealth = 13
		hidden_tooltip = {
                    character_event = {
							id = market.10
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.10
		trigger = {
			trait = Leather_3
		}
		if = {
			limit = {
				trait = Leather_3
			}
		}
		remove_trait = Leather_3
		add_trait = Leather_2
		wealth = 13
		hidden_tooltip = {
                    character_event = {
							id = market.10
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.10
		trigger = {
			trait = Leather_2
		}
		if = {
			limit = {
				trait = Leather_2
			}
		}
		remove_trait = Leather_2
		add_trait = Leather_1
		wealth = 13
		hidden_tooltip = {
                    character_event = {
							id = market.10
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.10
		trigger = {
			trait = Leather_1
		}
		if = {
			limit = {
				trait = Leather_1
			}
		}
		remove_trait = Leather_1
		add_trait = No_Inventory
		wealth = 13
		hidden_tooltip = {
                    character_event = {
							id = market.10
                    }
				}	
	}
		option = {
		name = EVTOPTCmarket.10
                hidden_tooltip = {
                    character_event = {
							id = market.3
                    }
				}		
	}
}
character_event = {
	id = "market.11"
	desc = "EVTDESCmarket.11"
	picture = GFX_evt_fan_market
	border = GFX_event_normal_frame_economy
	is_triggered_only = yes
		option = {
		name = EVTOPTAmarket.11
		trigger = {
			trait = No_Inventory
			wealth = 32
		}
		if = {
			limit = {
				trait = No_Inventory
				wealth = 32
			}
		}
		remove_trait = No_Inventory
		add_trait = Iron_1
		wealth = -32
		hidden_tooltip = {
                    character_event = {
							id = market.11
                    }
				}	
	}
		option = {
		name = EVTOPTAmarket.11
		trigger = {
			trait = Iron_1
			wealth = 32
		}
		if = {
			limit = {
				trait = Iron_1
				wealth = 32
			}
		}
		remove_trait = Iron_1
		add_trait = Iron_2
		wealth = -32
		hidden_tooltip = {
                    character_event = {
							id = market.11
                    }
				}
	}
		option = {
		name = EVTOPTAmarket.11
		trigger = {
			trait = Iron_2
			wealth = 32
		}
		if = {
			limit = {
				trait = Iron_2
				wealth = 32
			}
		}
		remove_trait = Iron_2
		add_trait = Iron_3
		wealth = -32
		hidden_tooltip = {
                    character_event = {
							id = market.11
                    }
				}	
	}
		option = {
		name = EVTOPTAmarket.11
		trigger = {
			trait = Iron_3
			wealth = 32
		}
		if = {
			limit = {
				trait = Iron_3
				wealth = 32
			}
		}
		remove_trait = Iron_3
		add_trait = Iron_4
		wealth = -32
		hidden_tooltip = {
                    character_event = {
							id = market.11
                    }
				}
	}
		option = {
		name = EVTOPTAmarket.11
		trigger = {
			trait = Iron_4
			wealth = 32
		}
		if = {
			limit = {
				trait = Iron_4
				wealth = 32
			}
		}
		remove_trait = Iron_4
		add_trait = Iron_5
		wealth = -32
		hidden_tooltip = {
                    character_event = {
							id = market.11
                    }
				}
	}
		option = {
		name = EVTOPTBmarket.11
		trigger = {
			trait = Iron_5
		}
		if = {
			limit = {
				trait = Iron_5
			}
		}
		remove_trait = Iron_5
		add_trait = Iron_4
		wealth = 26
		hidden_tooltip = {
                    character_event = {
							id = market.11
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.11
		trigger = {
			trait = Iron_4
		}
		if = {
			limit = {
				trait = Iron_4
			}
		}
		remove_trait = Iron_4
		add_trait = Iron_3
		wealth = 26
		hidden_tooltip = {
                    character_event = {
							id = market.11
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.11
		trigger = {
			trait = Iron_3
		}
		if = {
			limit = {
				trait = Iron_3
			}
		}
		remove_trait = Iron_3
		add_trait = Iron_2
		wealth = 26
		hidden_tooltip = {
                    character_event = {
							id = market.11
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.11
		trigger = {
			trait = Iron_2
		}
		if = {
			limit = {
				trait = Iron_2
			}
		}
		remove_trait = Iron_2
		add_trait = Iron_1
		wealth = 26
		hidden_tooltip = {
                    character_event = {
							id = market.11
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.11
		trigger = {
			trait = Iron_1
		}
		if = {
			limit = {
				trait = Iron_1
			}
		}
		remove_trait = Iron_1
		add_trait = No_Inventory
		wealth = 26
		hidden_tooltip = {
                    character_event = {
							id = market.11
                    }
				}	
	}
		option = {
		name = EVTOPTCmarket.11
                hidden_tooltip = {
                    character_event = {
							id = market.3
                    }
				}		
	}
}
character_event = {
	id = "market.12"
	desc = "EVTDESCmarket.12"
	picture = GFX_evt_fan_market
	border = GFX_event_normal_frame_economy
	is_triggered_only = yes
		option = {
		name = EVTOPTAmarket.12
		trigger = {
			trait = No_Inventory
			wealth = 64
		}
		if = {
			limit = {
				trait = No_Inventory
				wealth = 64
			}
		}
		remove_trait = No_Inventory
		add_trait = Steel_1
		wealth = -64
		hidden_tooltip = {
                    character_event = {
							id = market.12
                    }
				}	
	}
		option = {
		name = EVTOPTAmarket.12
		trigger = {
			trait = Steel_1
			wealth = 64
		}
		if = {
			limit = {
				trait = Steel_1
				wealth = 64
			}
		}
		remove_trait = Steel_1
		add_trait = Steel_2
		wealth = -64
		hidden_tooltip = {
                    character_event = {
							id = market.12
                    }
				}
	}
		option = {
		name = EVTOPTAmarket.12
		trigger = {
			trait = Steel_2
			wealth = 64
		}
		if = {
			limit = {
				trait = Steel_2
				wealth = 64
			}
		}
		remove_trait = Steel_2
		add_trait = Steel_3
		wealth = -64
		hidden_tooltip = {
                    character_event = {
							id = market.12
                    }
				}	
	}
		option = {
		name = EVTOPTAmarket.12
		trigger = {
			trait = Steel_3
			wealth = 64
		}
		if = {
			limit = {
				trait = Steel_3
				wealth = 64
			}
		}
		remove_trait = Steel_3
		add_trait = Steel_4
		wealth = -64
		hidden_tooltip = {
                    character_event = {
							id = market.12
                    }
				}
	}
		option = {
		name = EVTOPTAmarket.12
		trigger = {
			trait = Steel_4
			wealth = 64
		}
		if = {
			limit = {
				trait = Steel_4
				wealth = 64
			}
		}
		remove_trait = Steel_4
		add_trait = Steel_5
		wealth = -64
		hidden_tooltip = {
                    character_event = {
							id = market.12
                    }
				}
	}
		option = {
		name = EVTOPTBmarket.12
		trigger = {
			trait = Steel_5
		}
		if = {
			limit = {
				trait = Steel_5
			}
		}
		remove_trait = Steel_5
		add_trait = Steel_4
		wealth = 51
		hidden_tooltip = {
                    character_event = {
							id = market.12
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.12
		trigger = {
			trait = Steel_4
		}
		if = {
			limit = {
				trait = Steel_4
			}
		}
		remove_trait = Steel_4
		add_trait = Steel_3
		wealth = 51
		hidden_tooltip = {
                    character_event = {
							id = market.12
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.12
		trigger = {
			trait = Steel_3
		}
		if = {
			limit = {
				trait = Steel_3
			}
		}
		remove_trait = Steel_3
		add_trait = Steel_2
		wealth = 51
		hidden_tooltip = {
                    character_event = {
							id = market.12
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.12
		trigger = {
			trait = Steel_2
		}
		if = {
			limit = {
				trait = Steel_2
			}
		}
		remove_trait = Steel_2
		add_trait = Steel_1
		wealth = 51
		hidden_tooltip = {
                    character_event = {
							id = market.12
                    }
				}	
	}
		option = {
		name = EVTOPTBmarket.12
		trigger = {
			trait = Steel_1
		}
		if = {
			limit = {
				trait = Steel_1
			}
		}
		remove_trait = Steel_1
		add_trait = No_Inventory
		wealth = 51
		hidden_tooltip = {
                    character_event = {
							id = market.12
                    }
				}	
	}
		option = {
		name = EVTOPTCmarket.12
                hidden_tooltip = {
                    character_event = {
							id = market.3
                    }
				}		
	}
}