|
@ -326,19 +326,34 @@ pub enum PhotonBlast { |
|
|
#[derive(Debug, Clone, PartialEq)]
|
|
|
#[derive(Debug, Clone, PartialEq)]
|
|
|
pub struct Mag {
|
|
|
pub struct Mag {
|
|
|
pub mag: MagType,
|
|
|
pub mag: MagType,
|
|
|
pub def: u16,
|
|
|
|
|
|
pub pow: u16,
|
|
|
|
|
|
pub dex: u16,
|
|
|
|
|
|
pub mnd: u16,
|
|
|
|
|
|
|
|
|
def: u16,
|
|
|
|
|
|
pow: u16,
|
|
|
|
|
|
dex: u16,
|
|
|
|
|
|
mnd: u16,
|
|
|
pub synchro: u8,
|
|
|
pub synchro: u8,
|
|
|
pub iq: u8,
|
|
|
|
|
|
pub photon_blast: [Option<PhotonBlast>; 3],
|
|
|
|
|
|
|
|
|
iq: u8,
|
|
|
|
|
|
photon_blast: [Option<PhotonBlast>; 3],
|
|
|
pub color: u8,
|
|
|
pub color: u8,
|
|
|
pub modifiers: Vec<MagModifier>,
|
|
|
|
|
|
|
|
|
modifiers: Vec<MagModifier>,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
impl Mag {
|
|
|
impl Mag {
|
|
|
|
|
|
pub fn baby_mag(skin: u16) -> Mag {
|
|
|
|
|
|
Mag {
|
|
|
|
|
|
mag: MagType::Mag,
|
|
|
|
|
|
def: 500,
|
|
|
|
|
|
pow: 0,
|
|
|
|
|
|
dex: 0,
|
|
|
|
|
|
mnd: 0,
|
|
|
|
|
|
synchro: 20,
|
|
|
|
|
|
iq: 0,
|
|
|
|
|
|
photon_blast: [None; 3],
|
|
|
|
|
|
color: (skin % 18) as u8,
|
|
|
|
|
|
modifiers: Vec::new(),
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
pub fn as_bytes(&self) -> [u8; 16] {
|
|
|
pub fn as_bytes(&self) -> [u8; 16] {
|
|
|
let mut result = [0; 16];
|
|
|
let mut result = [0; 16];
|
|
|
result[0..3].copy_from_slice(&self.mag.value());
|
|
|
result[0..3].copy_from_slice(&self.mag.value());
|
|
|