pub struct LawRuleInstance {
pub rule: ArtifactStoneRule,
pub magnitude: f64,
pub secondary_magnitude: f64,
pub rule_param: i64,
pub target: Option<LawTemplateId>,
}Expand description
One socketed Law-column stone, flattened to the numbers its rule needs.
Flattened for the same reason as [crate::logic::artifacts::AspectRuleInstance]:
the callers read this before mutating the fight, and an owned Copy value
keeps the config borrow from outliving the read.
Fields§
§rule: ArtifactStoneRule§magnitude: f64The rule’s magnitude at the stone’s current level, in percent.
secondary_magnitude: f64The rule’s second percentage. Never scaled by level.
rule_param: i64The rule’s own parameter (extra bridges for BL-01). Never scaled.
target: Option<LawTemplateId>The law the player pointed this stone at. Always Some for a rule that
ArtifactStoneRule::needs_law_target — a stone with no choice is
dropped at read time, so no rule site has to check.
Trait Implementations§
Source§impl Clone for LawRuleInstance
impl Clone for LawRuleInstance
Source§fn clone(&self) -> LawRuleInstance
fn clone(&self) -> LawRuleInstance
Returns a copy 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 LawRuleInstance
impl Debug for LawRuleInstance
Source§impl PartialEq for LawRuleInstance
impl PartialEq for LawRuleInstance
impl Copy for LawRuleInstance
impl StructuralPartialEq for LawRuleInstance
Auto Trait Implementations§
impl Freeze for LawRuleInstance
impl RefUnwindSafe for LawRuleInstance
impl Send for LawRuleInstance
impl Sync for LawRuleInstance
impl Unpin for LawRuleInstance
impl UnwindSafe for LawRuleInstance
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