pub struct EnemyActorDefinition {Show 22 fields
id: EnemyIdx,
display_name: String,
npc_id: Option<u32>,
classification: Option<i32>,
creature_type: Option<i32>,
level: u16,
armor: f64,
armor_constant: f64,
auto_attack_dps: Option<f64>,
auto_attack_damage: Option<f64>,
auto_attack_swing_ms: Option<u32>,
spell_damage: Option<f64>,
creature_aoe_avoidance_pct: f64,
attack_table: EnemyAttackTable,
health_model: HealthModel,
initial_transform: SpatialTransform,
group_id: GroupId,
enemy_tags: Vec<Box<str>>,
group_tags: Vec<Box<str>>,
role: EnemyRole,
spawn_at_s: f64,
starts_active: bool,
}Expand description
Immutable, data-resolved definition for one encounter enemy.
Fields§
§id: EnemyIdx§display_name: String§npc_id: Option<u32>§classification: Option<i32>§creature_type: Option<i32>§level: u16§armor: f64§armor_constant: f64§auto_attack_dps: Option<f64>§auto_attack_damage: Option<f64>§auto_attack_swing_ms: Option<u32>§spell_damage: Option<f64>§creature_aoe_avoidance_pct: f64§attack_table: EnemyAttackTable§health_model: HealthModel§initial_transform: SpatialTransform§group_id: GroupId§role: EnemyRole§spawn_at_s: f64§starts_active: boolImplementations§
Source§impl EnemyActorDefinition
impl EnemyActorDefinition
const DEFAULT_AUTO_ATTACK_SWING_MS: u32 = 1_500
pub fn new(input: EnemyActorDefinitionInput) -> Self
pub const fn id(&self) -> EnemyIdx
pub fn display_name(&self) -> &str
pub const fn npc_id(&self) -> Option<u32>
pub const fn classification(&self) -> Option<i32>
pub const fn creature_type(&self) -> Option<i32>
pub const fn level(&self) -> u16
pub const fn armor(&self) -> f64
pub const fn armor_constant(&self) -> f64
pub const fn auto_attack_dps(&self) -> Option<f64>
pub const fn auto_attack_damage(&self) -> Option<f64>
pub const fn auto_attack_swing_ms(&self) -> Option<u32>
pub const fn spell_damage(&self) -> Option<f64>
pub const fn creature_aoe_avoidance_pct(&self) -> f64
pub const fn attack_table(&self) -> EnemyAttackTable
pub const fn health_model(&self) -> HealthModel
pub const fn initial_transform(&self) -> SpatialTransform
pub const fn group_id(&self) -> GroupId
pub const fn role(&self) -> EnemyRole
pub const fn spawn_at_s(&self) -> f64
pub const fn starts_active(&self) -> bool
Trait Implementations§
Source§impl Clone for EnemyActorDefinition
impl Clone for EnemyActorDefinition
Source§fn clone(&self) -> EnemyActorDefinition
fn clone(&self) -> EnemyActorDefinition
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 EnemyActorDefinition
impl Debug for EnemyActorDefinition
Source§impl PartialEq for EnemyActorDefinition
impl PartialEq for EnemyActorDefinition
impl StructuralPartialEq for EnemyActorDefinition
Auto Trait Implementations§
impl Freeze for EnemyActorDefinition
impl RefUnwindSafe for EnemyActorDefinition
impl Send for EnemyActorDefinition
impl Sync for EnemyActorDefinition
impl Unpin for EnemyActorDefinition
impl UnsafeUnpin for EnemyActorDefinition
impl UnwindSafe for EnemyActorDefinition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more