|
@ -44,9 +44,9 @@ impl From<u8> for CharacterClass { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
impl Into<u8> for CharacterClass {
|
|
|
|
|
|
fn into(self) -> u8 {
|
|
|
|
|
|
match self {
|
|
|
|
|
|
|
|
|
impl From<CharacterClass> for u8 {
|
|
|
|
|
|
fn from(other: CharacterClass) -> u8 {
|
|
|
|
|
|
match other {
|
|
|
CharacterClass::HUmar => 0,
|
|
|
CharacterClass::HUmar => 0,
|
|
|
CharacterClass::HUnewearl => 1,
|
|
|
CharacterClass::HUnewearl => 1,
|
|
|
CharacterClass::HUcast => 2,
|
|
|
CharacterClass::HUcast => 2,
|
|
@ -65,29 +65,27 @@ impl Into<u8> for CharacterClass { |
|
|
|
|
|
|
|
|
impl CharacterClass {
|
|
|
impl CharacterClass {
|
|
|
pub fn is_human(&self) -> bool {
|
|
|
pub fn is_human(&self) -> bool {
|
|
|
match self {
|
|
|
|
|
|
|
|
|
matches!(self,
|
|
|
CharacterClass::HUmar |
|
|
|
CharacterClass::HUmar |
|
|
|
CharacterClass::RAmar | CharacterClass::RAmarl |
|
|
|
|
|
|
CharacterClass::FOmar | CharacterClass::FOmarl => true,
|
|
|
|
|
|
|
|
|
|
|
|
_ => false,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
CharacterClass::RAmar |
|
|
|
|
|
|
CharacterClass::RAmarl |
|
|
|
|
|
|
CharacterClass::FOmar |
|
|
|
|
|
|
CharacterClass::FOmarl)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
pub fn is_newman(&self) -> bool {
|
|
|
pub fn is_newman(&self) -> bool {
|
|
|
match self {
|
|
|
|
|
|
|
|
|
matches!(self,
|
|
|
CharacterClass::HUnewearl |
|
|
|
CharacterClass::HUnewearl |
|
|
|
CharacterClass::FOnewm | CharacterClass::FOnewearl => true,
|
|
|
|
|
|
_ => false,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
CharacterClass::FOnewm |
|
|
|
|
|
|
CharacterClass::FOnewearl)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
pub fn is_android(&self) -> bool {
|
|
|
pub fn is_android(&self) -> bool {
|
|
|
match self {
|
|
|
|
|
|
CharacterClass::HUcast | CharacterClass::HUcaseal |
|
|
|
|
|
|
CharacterClass::RAcast | CharacterClass::RAcaseal => true,
|
|
|
|
|
|
_ => false,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
matches!(self,
|
|
|
|
|
|
CharacterClass::HUcast |
|
|
|
|
|
|
CharacterClass::HUcaseal |
|
|
|
|
|
|
CharacterClass::RAcast |
|
|
|
|
|
|
CharacterClass::RAcaseal)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
@ -124,9 +122,9 @@ impl From<u8> for SectionID { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
impl Into<u8> for SectionID {
|
|
|
|
|
|
fn into(self) -> u8 {
|
|
|
|
|
|
match self {
|
|
|
|
|
|
|
|
|
impl From<SectionID> for u8 {
|
|
|
|
|
|
fn from(other: SectionID) -> u8 {
|
|
|
|
|
|
match other {
|
|
|
SectionID::Viridia => 0,
|
|
|
SectionID::Viridia => 0,
|
|
|
SectionID::Greenill => 1,
|
|
|
SectionID::Greenill => 1,
|
|
|
SectionID::Skyly => 2,
|
|
|
SectionID::Skyly => 2,
|
|
|