pub struct LawAttributeModifier {
pub attribute_id: AttributeId,
pub base_value: i64,
}Expand description
One attribute the law moves while its side is up. This is the law’s PASSIVE
half; the active half is LawTemplate::effect.
One number per modifier: the v0.1 enhanced_value twin is gone. Bridge
amplification is a percentage multiplier applied on top of this value, so a
law level and a bridge can never drift apart the way two authored numbers
could.
Values are in the attribute’s own native units — the same units
class_levels, talents and statue grades use (crit_chance and every
*.mod are permyriad: 1500 = +15%, 10000 = ×1.0).
Fields§
§attribute_id: AttributeId§base_value: i64Trait Implementations§
Source§impl Clone for LawAttributeModifier
impl Clone for LawAttributeModifier
Source§fn clone(&self) -> LawAttributeModifier
fn clone(&self) -> LawAttributeModifier
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 LawAttributeModifier
impl Debug for LawAttributeModifier
Source§impl<'de> Deserialize<'de> for LawAttributeModifier
impl<'de> Deserialize<'de> for LawAttributeModifier
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
Source§impl JsonSchema for LawAttributeModifier
impl JsonSchema for LawAttributeModifier
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for LawAttributeModifier
impl PartialEq for LawAttributeModifier
Source§impl Serialize for LawAttributeModifier
impl Serialize for LawAttributeModifier
Source§impl Tsify for LawAttributeModifier
impl Tsify for LawAttributeModifier
const DECL: &'static str = "/**\n * One attribute the law moves while its side is up. This is the law\\\'s PASSIVE\n * half; the active half is [`LawTemplate::effect`].\n *\n * One number per modifier: the v0.1 `enhanced_value` twin is gone. Bridge\n * amplification is a percentage multiplier applied on top of this value, so a\n * law level and a bridge can never drift apart the way two authored numbers\n * could.\n *\n * Values are in the attribute\\\'s own native units \u{2014} the same units\n * `class_levels`, talents and statue grades use (`crit_chance` and every\n * `*.mod` are permyriad: `1500` = +15%, `10000` = \u{d7}1.0).\n */\nexport interface LawAttributeModifier {\n attribute_id: AttributeId;\n base_value: number;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
impl Eq for LawAttributeModifier
impl StructuralPartialEq for LawAttributeModifier
Auto Trait Implementations§
impl Freeze for LawAttributeModifier
impl RefUnwindSafe for LawAttributeModifier
impl Send for LawAttributeModifier
impl Sync for LawAttributeModifier
impl Unpin for LawAttributeModifier
impl UnwindSafe for LawAttributeModifier
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