pub struct ItemData {
pub name: String,
pub target: Option<ItemTarget>,
pub input: Option<ItemInput>,
pub special_data: SpecialItemData,
pub force_forme: Option<String>,
pub flags: HashSet<ItemFlag>,
pub effect: Value,
pub condition: Value,
}Expand description
Data about a particular item.
Items can be held by a Mon in battle to produce various side effects. Items can affect stat calculations, move calculations, move choice restrictions, and much more.
Fields§
§name: StringName of the item.
target: Option<ItemTarget>Target of the item if used by a player.
input: Option<ItemInput>Type of input received alongside the item.
special_data: SpecialItemDataData for special item effects associated with moves and effects.
force_forme: Option<String>The forme this item forces a Mon into.
flags: HashSet<ItemFlag>Item flags.
effect: ValueDynamic battle effects.
condition: ValueDynamic battle effects of the condition created by this item.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ItemData
impl<'de> Deserialize<'de> for ItemData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ItemData
impl RefUnwindSafe for ItemData
impl Send for ItemData
impl Sync for ItemData
impl Unpin for ItemData
impl UnsafeUnpin for ItemData
impl UnwindSafe for ItemData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more