pub struct EnemyDefinition {Show 19 fields
pub id: String,
pub name: String,
pub glyph: String,
pub health: i32,
pub attack: i32,
pub defense: i32,
pub speed: i32,
pub xp_value: i32,
pub gold_value: i32,
pub level: u32,
pub abilities: Vec<String>,
pub loot_table: String,
pub behavior: String,
pub description: String,
pub max_mana: i32,
pub innate_ability: Option<String>,
pub ai_brain: String,
pub personality: Option<Value>,
pub properties: HashMap<String, Value>,
}Expand description
A single enemy definition within an enemies file.
Fields§
§id: String§name: String§glyph: String§health: i32§attack: i32§defense: i32§speed: i32§xp_value: i32§gold_value: i32§level: u32§abilities: Vec<String>§loot_table: String§behavior: String§description: String§max_mana: i32§innate_ability: Option<String>§ai_brain: String§personality: Option<Value>§properties: HashMap<String, Value>Trait Implementations§
Source§impl Clone for EnemyDefinition
impl Clone for EnemyDefinition
Source§fn clone(&self) -> EnemyDefinition
fn clone(&self) -> EnemyDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EnemyDefinition
impl Debug for EnemyDefinition
Source§impl<'de> Deserialize<'de> for EnemyDefinition
impl<'de> Deserialize<'de> for EnemyDefinition
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 EnemyDefinition
impl RefUnwindSafe for EnemyDefinition
impl Send for EnemyDefinition
impl Sync for EnemyDefinition
impl Unpin for EnemyDefinition
impl UnsafeUnpin for EnemyDefinition
impl UnwindSafe for EnemyDefinition
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