pub struct EnemyStatInspection {
pub(super) identity: Result<ResolvedEnemyIdentity, EnemyStatError>,
pub(super) creature_tuning: Option<ResolvedCreatureTuning>,
pub(super) level: u16,
pub(super) max_health: Result<f64, EnemyStatError>,
pub(super) armor: Result<f64, EnemyStatError>,
pub(super) armor_constant: Result<f64, EnemyStatError>,
pub(super) auto_attack_dps: Result<f64, EnemyStatError>,
pub(super) spell_damage: Result<f64, EnemyStatError>,
pub(super) provenance: Vec<EnemyStatProvenanceStep>,
}Expand description
Typed partial resolution for inspection: each component is a value or its exact data error.
Fields§
§identity: Result<ResolvedEnemyIdentity, EnemyStatError>§creature_tuning: Option<ResolvedCreatureTuning>Present only when the creature has exactly one CreatureDifficulty variant.
level: u16Authored level (A4: no table maps an NPC ID to a level).
max_health: Result<f64, EnemyStatError>§armor: Result<f64, EnemyStatError>§armor_constant: Result<f64, EnemyStatError>§auto_attack_dps: Result<f64, EnemyStatError>§spell_damage: Result<f64, EnemyStatError>§provenance: Vec<EnemyStatProvenanceStep>Implementations§
Source§impl EnemyStatInspection
impl EnemyStatInspection
pub fn identity(&self) -> Result<&ResolvedEnemyIdentity, &EnemyStatError>
pub const fn creature_tuning(&self) -> Option<&ResolvedCreatureTuning>
pub const fn level(&self) -> u16
pub fn max_health(&self) -> Result<f64, &EnemyStatError>
pub fn armor(&self) -> Result<f64, &EnemyStatError>
pub fn armor_constant(&self) -> Result<f64, &EnemyStatError>
pub fn auto_attack_dps(&self) -> Result<f64, &EnemyStatError>
pub fn spell_damage(&self) -> Result<f64, &EnemyStatError>
pub fn provenance(&self) -> &[EnemyStatProvenanceStep]
Sourcepub fn into_resolved(
self,
) -> Result<ResolvedEnemyStats, EnemyStatResolutionError>
pub fn into_resolved( self, ) -> Result<ResolvedEnemyStats, EnemyStatResolutionError>
Requires identity, max health, and armor; optional budget/armor-constant metadata never blocks.
Trait Implementations§
Source§impl Clone for EnemyStatInspection
impl Clone for EnemyStatInspection
Source§fn clone(&self) -> EnemyStatInspection
fn clone(&self) -> EnemyStatInspection
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 EnemyStatInspection
impl Debug for EnemyStatInspection
Source§impl PartialEq for EnemyStatInspection
impl PartialEq for EnemyStatInspection
impl StructuralPartialEq for EnemyStatInspection
Auto Trait Implementations§
impl Freeze for EnemyStatInspection
impl RefUnwindSafe for EnemyStatInspection
impl Send for EnemyStatInspection
impl Sync for EnemyStatInspection
impl Unpin for EnemyStatInspection
impl UnsafeUnpin for EnemyStatInspection
impl UnwindSafe for EnemyStatInspection
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