#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum ItemCategory {
Accessory(AccessoryType),
Armour(ArmourType),
Weapon(WeaponType),
Jewel(JewelType),
Flask,
Map,
Gem,
DivinationCard,
Prophecy,
Relic,
Currency, }
impl ItemCategory {
pub fn is_consumable(&self) -> bool {
match *self {
ItemCategory::Map |
ItemCategory::DivinationCard |
ItemCategory::Currency => true, _ => false,
}
}
pub fn is_equippable(&self) -> bool {
match *self {
ItemCategory::Accessory(..) |
ItemCategory::Armour(..) |
ItemCategory::Weapon(..) |
ItemCategory::Jewel(..) |
ItemCategory::Flask |
ItemCategory::Gem => true,
_ => false,
}
}
pub fn is_modifiable(&self) -> bool {
match *self {
ItemCategory::Accessory(..) |
ItemCategory::Armour(..) |
ItemCategory::Weapon(..) |
ItemCategory::Jewel(..) |
ItemCategory::Flask |
ItemCategory::Map |
ItemCategory::Gem => true,
_ => false,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AccessoryType {
Amulet,
Belt,
Ring,
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ArmourType {
Helmet,
Gloves,
Chest,
Boots,
Shield,
Quiver,
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum WeaponType {
Bow,
Claw,
Dagger,
OneHandedAxe,
OneHandedMace,
OneHandedSword,
Sceptre,
Staff,
TwoHandedAxe,
TwoHandedMace,
TwoHandedSword,
Wand,
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum JewelType {
Regular,
Abyss
}