pub struct ArtifactStoneTemplate {Show 14 fields
pub power_q_first_rank: f64,
pub power_q_max_rank: f64,
pub id: ArtifactStoneTemplateId,
pub name: I18nString,
pub description: I18nString,
pub socket: ArtifactSocketSlot,
pub rule: ArtifactStoneRule,
pub magnitude: f64,
pub magnitude_per_level: f64,
pub secondary_magnitude: f64,
pub rule_param: i64,
pub tier_magnitudes: Vec<ArtifactTierMagnitude>,
pub active: bool,
pub icon_path: String,
}Expand description
One entry of the artifact-stone catalog.
The first copy carries the whole rule; magnitude_per_level is the only
thing an upgrade moves (design §3), which is why the rule and rule_param
are level-independent.
Fields§
§power_q_first_rank: f64§power_q_max_rank: f64§id: ArtifactStoneTemplateId§name: I18nString§description: I18nString§socket: ArtifactSocketSlot§rule: ArtifactStoneRule§magnitude: f64§magnitude_per_level: f64§secondary_magnitude: f64§rule_param: i64§tier_magnitudes: Vec<ArtifactTierMagnitude>§active: bool§icon_path: StringImplementations§
Source§impl ArtifactStoneTemplate
impl ArtifactStoneTemplate
Sourcepub fn magnitude_at_level(&self, level: i64) -> f64
pub fn magnitude_at_level(&self, level: i64) -> f64
The rule’s magnitude on a stone of upgrade level level, in percent.
Same shape as configs::stones::StoneStat::value_at_level, so both
systems scale with a level identically.
Sourcepub fn tier_magnitude(&self, tier: StoneTier) -> f64
pub fn tier_magnitude(&self, tier: StoneTier) -> f64
VA-05 Small Gears only: the share effects run at when the trigger that
fired them had tier. An unlisted tier reads as plain strength rather
than as zero, so a half-filled table can never silence a build.
Trait Implementations§
Source§impl Clone for ArtifactStoneTemplate
impl Clone for ArtifactStoneTemplate
Source§fn clone(&self) -> ArtifactStoneTemplate
fn clone(&self) -> ArtifactStoneTemplate
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 ArtifactStoneTemplate
impl Debug for ArtifactStoneTemplate
Source§impl<'de> Deserialize<'de> for ArtifactStoneTemplate
impl<'de> Deserialize<'de> for ArtifactStoneTemplate
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 From<ArtifactStoneTemplate> for JsValuewhere
ArtifactStoneTemplate: Serialize,
impl From<ArtifactStoneTemplate> for JsValuewhere
ArtifactStoneTemplate: Serialize,
Source§fn from(value: ArtifactStoneTemplate) -> Self
fn from(value: ArtifactStoneTemplate) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for ArtifactStoneTemplatewhere
Self: DeserializeOwned,
impl FromWasmAbi for ArtifactStoneTemplatewhere
Self: DeserializeOwned,
Source§impl IntoWasmAbi for ArtifactStoneTemplatewhere
ArtifactStoneTemplate: Serialize,
impl IntoWasmAbi for ArtifactStoneTemplatewhere
ArtifactStoneTemplate: Serialize,
Source§impl JsonSchema for ArtifactStoneTemplate
impl JsonSchema for ArtifactStoneTemplate
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 OptionFromWasmAbi for ArtifactStoneTemplatewhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for ArtifactStoneTemplatewhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for ArtifactStoneTemplatewhere
ArtifactStoneTemplate: Serialize,
impl OptionIntoWasmAbi for ArtifactStoneTemplatewhere
ArtifactStoneTemplate: Serialize,
Source§impl RefFromWasmAbi for ArtifactStoneTemplatewhere
Self: DeserializeOwned,
impl RefFromWasmAbi for ArtifactStoneTemplatewhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = SelfOwner<ArtifactStoneTemplate>
type Anchor = SelfOwner<ArtifactStoneTemplate>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl Serialize for ArtifactStoneTemplate
impl Serialize for ArtifactStoneTemplate
Source§impl Tsify for ArtifactStoneTemplate
impl Tsify for ArtifactStoneTemplate
const DECL: &'static str = "/**\n * One entry of the artifact-stone catalog.\n *\n * The first copy carries the whole rule; `magnitude_per_level` is the only\n * thing an upgrade moves (design \u{a7}3), which is why the rule and `rule_param`\n * are level-independent.\n */\nexport interface ArtifactStoneTemplate {\n power_q_first_rank: number;\n power_q_max_rank: number;\n id: ArtifactStoneTemplateId;\n name: I18nString;\n description: I18nString;\n socket: ArtifactSocketSlot;\n rule: ArtifactStoneRule;\n magnitude: number;\n magnitude_per_level: number;\n secondary_magnitude: number;\n rule_param: number;\n tier_magnitudes: ArtifactTierMagnitude[];\n active: boolean;\n icon_path: string;\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>
Source§impl VectorFromWasmAbi for ArtifactStoneTemplatewhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for ArtifactStoneTemplatewhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for ArtifactStoneTemplatewhere
ArtifactStoneTemplate: Serialize,
impl VectorIntoWasmAbi for ArtifactStoneTemplatewhere
ArtifactStoneTemplate: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribeVector for ArtifactStoneTemplate
impl WasmDescribeVector for ArtifactStoneTemplate
Auto Trait Implementations§
impl Freeze for ArtifactStoneTemplate
impl RefUnwindSafe for ArtifactStoneTemplate
impl Send for ArtifactStoneTemplate
impl Sync for ArtifactStoneTemplate
impl Unpin for ArtifactStoneTemplate
impl UnwindSafe for ArtifactStoneTemplate
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> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.