Skip to main content

artifacts/models/
monster_type.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
5#[cfg_attr(feature = "specta", derive(specta::Type))]
6#[derive(Default)]
7pub enum MonsterType {
8    #[serde(rename = "normal")]
9    #[default]
10    Normal,
11    #[serde(rename = "elite")]
12    Elite,
13    #[serde(rename = "boss")]
14    Boss,
15}
16
17impl std::fmt::Display for MonsterType {
18    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
19        match self {
20            Self::Normal => write!(f, "normal"),
21            Self::Elite => write!(f, "elite"),
22            Self::Boss => write!(f, "boss"),
23        }
24    }
25}