|
@ -24,6 +24,31 @@ pub enum Technique { |
|
|
Megid,
|
|
|
Megid,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
impl Technique {
|
|
|
|
|
|
pub fn as_value(&self) -> u8 {
|
|
|
|
|
|
match self {
|
|
|
|
|
|
Technique::Foie => 0,
|
|
|
|
|
|
Technique::Gifoie => 1,
|
|
|
|
|
|
Technique::Rafoie => 2,
|
|
|
|
|
|
Technique::Barta => 3,
|
|
|
|
|
|
Technique::Gibarta => 4,
|
|
|
|
|
|
Technique::Rabarta => 5,
|
|
|
|
|
|
Technique::Zonde => 6,
|
|
|
|
|
|
Technique::Gizonde => 7,
|
|
|
|
|
|
Technique::Razonde => 8,
|
|
|
|
|
|
Technique::Grants => 9,
|
|
|
|
|
|
Technique::Deband => 10,
|
|
|
|
|
|
Technique::Jellen => 11,
|
|
|
|
|
|
Technique::Zalure => 12,
|
|
|
|
|
|
Technique::Shifta => 13,
|
|
|
|
|
|
Technique::Ryuker => 14,
|
|
|
|
|
|
Technique::Resta => 15,
|
|
|
|
|
|
Technique::Anti => 16,
|
|
|
|
|
|
Technique::Reverser => 17,
|
|
|
|
|
|
Technique::Megid => 18,
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
|
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
|
|
pub struct TechniqueDisk {
|
|
|
pub struct TechniqueDisk {
|
|
@ -33,6 +58,11 @@ pub struct TechniqueDisk { |
|
|
|
|
|
|
|
|
impl TechniqueDisk {
|
|
|
impl TechniqueDisk {
|
|
|
pub fn as_bytes(&self) -> [u8; 16] {
|
|
|
pub fn as_bytes(&self) -> [u8; 16] {
|
|
|
[0; 16]
|
|
|
|
|
|
|
|
|
let mut result = [0; 16];
|
|
|
|
|
|
result[0] = 3;
|
|
|
|
|
|
result[1] = 2;
|
|
|
|
|
|
result[2] = self.level as u8 - 1;
|
|
|
|
|
|
result[4] = self.tech.as_value();
|
|
|
|
|
|
result
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|