|
@ -509,7 +509,7 @@ impl MagAttributeOrdering { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, PartialEq)]
|
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, PartialEq, Serialize)]
|
|
|
pub enum MagModifier {
|
|
|
pub enum MagModifier {
|
|
|
FeedMag{
|
|
|
FeedMag{
|
|
|
food: ItemEntityId,
|
|
|
food: ItemEntityId,
|
|
@ -568,6 +568,24 @@ impl Mag { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn wrapped_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(),
|
|
|
|
|
|
class: CharacterClass::HUmar,
|
|
|
|
|
|
id: SectionID::Viridia,
|
|
|
|
|
|
wrapping: WrappingPaper::from((skin % 10) as u8),
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
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());
|
|
@ -1117,7 +1135,7 @@ impl Mag { |
|
|
match modifier {
|
|
|
match modifier {
|
|
|
MagModifier::WrapPresent => {self.wrapping = WrappingPaper::from(self.color % 10)}, // prevents mag color from crashing wrapping papers
|
|
|
MagModifier::WrapPresent => {self.wrapping = WrappingPaper::from(self.color % 10)}, // prevents mag color from crashing wrapping papers
|
|
|
MagModifier::UnwrapPresent => {self.wrapping = None},
|
|
|
MagModifier::UnwrapPresent => {self.wrapping = None},
|
|
|
_ => {}, // TODO: do mags use any other modifiers?
|
|
|
|
|
|
|
|
|
_ => {}, // TODO: other modifiers are already handled elsewhere. do they need to be moved here?
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|