pub struct StonesSettings {
pub global_trigger_cooldown_ticks: u64,
pub tier_coefficients: Vec<StoneTierCoefficient>,
pub rarity_weights: Vec<StoneRarityWeight>,
pub socket_unlocks: Vec<StoneSocketUnlock>,
pub upgrade_ladder: Vec<StoneUpgradeStep>,
pub max_stone_level: i64,
pub kill_drop: StoneKillDropSettings,
pub milestone_grants: Vec<StoneMilestoneGrant>,
}Expand description
All Trigger/Effect Stone tunables.
Fields§
§global_trigger_cooldown_ticks: u64One trigger cooldown for the whole build, not per slot. A Core event checks all five socketed triggers at once, every matching one fires, then this cooldown runs; a condition that comes true while it runs is lost and the sequence counter behind it restarts.
It is the only rate limit the mechanic has — it bounds a five-Legendary
build to 5 × 8 = 40 gauge per window.
tier_coefficients: Vec<StoneTierCoefficient>§rarity_weights: Vec<StoneRarityWeight>BAL-012: the rarity step of the kill-drop roll. One row per
[StoneTier], checked by GameConfig::validate_stones.
socket_unlocks: Vec<StoneSocketUnlock>§upgrade_ladder: Vec<StoneUpgradeStep>Cost of every level above the first, in raw copies. One rung per level
in 2..=max_stone_level, no gaps (GameConfig::validate_stones).
Triggers and effects read the same ladder but never share copies: a copy is a copy of one catalog entry, and the two catalogs share no ids.
max_stone_level: i64§kill_drop: StoneKillDropSettings§milestone_grants: Vec<StoneMilestoneGrant>BAL-024/BAL-025: guaranteed one-time packages at the equipment item
gates. Reaching chapter guarantees OWNERSHIP of every listed
template — a missing one is granted as a single copy, an already owned
one is left alone, so the check is idempotent and never inflates
recurring drops.
Implementations§
Source§impl StonesSettings
impl StonesSettings
Sourcepub fn is_socket_unlocked(
&self,
item_type: ItemType,
socket: StoneSocketSlot,
chapter_level: i64,
) -> bool
pub fn is_socket_unlocked( &self, item_type: ItemType, socket: StoneSocketSlot, chapter_level: i64, ) -> bool
Whether socket on item_type is open at chapter_level. An
unscheduled socket never opens — the config carries all 15 entries and
GameConfig::validate enforces that, so this is a safety net, not a
reachable state.
Sourcepub fn tier_coefficient(
&self,
trigger_tier: StoneTier,
effect_tier: StoneTier,
) -> f64
pub fn tier_coefficient( &self, trigger_tier: StoneTier, effect_tier: StoneTier, ) -> f64
Effect power multiplier for a (trigger, effect) tier pair. 1.0 when
the pair is missing, which is also the shipped value of every cell.
Sourcepub fn upgrade_copies_required(&self, target_level: i64) -> Option<i64>
pub fn upgrade_copies_required(&self, target_level: i64) -> Option<i64>
Raw copies needed to take a stone to target_level, not counting
the stone itself.
None means the ladder has no rung for that level — either the stone is
already at the cap or the config has a gap. GameConfig::validate_stones
rules the gap out at load time, so a live None is the cap.
Sourcepub fn dropped_kind(&self, roll: f64) -> StoneKind
pub fn dropped_kind(&self, roll: f64) -> StoneKind
Which collection the drop roll roll (in [0, 1)) produces.
Sourcepub fn dropped_tier(&self, roll: f64) -> StoneTier
pub fn dropped_tier(&self, roll: f64) -> StoneTier
Which rarity the drop roll roll (in [0, 1)) produces.
roll is a fraction of the weight SUM, so the rows stay relative and a
designer can retune one tier without rebalancing the rest to 100.
Negative weights are floored at zero; an all-zero table degenerates to
the first row rather than dropping nothing.
Trait Implementations§
Source§impl Clone for StonesSettings
impl Clone for StonesSettings
Source§fn clone(&self) -> StonesSettings
fn clone(&self) -> StonesSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StonesSettings
impl Debug for StonesSettings
Source§impl<'de> Deserialize<'de> for StonesSettings
impl<'de> Deserialize<'de> for StonesSettings
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>,
Source§impl From<StonesSettings> for JsValuewhere
StonesSettings: Serialize,
impl From<StonesSettings> for JsValuewhere
StonesSettings: Serialize,
Source§fn from(value: StonesSettings) -> Self
fn from(value: StonesSettings) -> Self
Source§impl FromWasmAbi for StonesSettingswhere
Self: DeserializeOwned,
impl FromWasmAbi for StonesSettingswhere
Self: DeserializeOwned,
Source§impl IntoWasmAbi for StonesSettingswhere
StonesSettings: Serialize,
impl IntoWasmAbi for StonesSettingswhere
StonesSettings: Serialize,
Source§impl JsonSchema for StonesSettings
impl JsonSchema for StonesSettings
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl OptionFromWasmAbi for StonesSettingswhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for StonesSettingswhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for StonesSettingswhere
StonesSettings: Serialize,
impl OptionIntoWasmAbi for StonesSettingswhere
StonesSettings: Serialize,
Source§impl RefFromWasmAbi for StonesSettingswhere
Self: DeserializeOwned,
impl RefFromWasmAbi for StonesSettingswhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
Self are recovered from.Source§type Anchor = SelfOwner<StonesSettings>
type Anchor = SelfOwner<StonesSettings>
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 StonesSettings
impl Serialize for StonesSettings
Source§impl Tsify for StonesSettings
impl Tsify for StonesSettings
const DECL: &'static str = "/**\n * All Trigger/Effect Stone tunables.\n */\nexport interface StonesSettings {\n /**\n * One trigger cooldown for the whole build, not per slot. A Core event\n * checks all five socketed triggers at once, every matching one fires,\n * then this cooldown runs; a condition that comes true while it runs is\n * lost and the sequence counter behind it restarts.\n *\n * It is the only rate limit the mechanic has \u{2014} it bounds a five-Legendary\n * build to `5 \u{d7} 8 = 40` gauge per window.\n */\n global_trigger_cooldown_ticks: number;\n tier_coefficients: StoneTierCoefficient[];\n /**\n * BAL-012: the rarity step of the kill-drop roll. One row per\n * [`StoneTier`], checked by `GameConfig::validate_stones`.\n */\n rarity_weights: StoneRarityWeight[];\n socket_unlocks: StoneSocketUnlock[];\n /**\n * Cost of every level above the first, in raw copies. One rung per level\n * in `2..=max_stone_level`, no gaps (`GameConfig::validate_stones`).\n *\n * Triggers and effects read the same ladder but never share copies: a\n * copy is a copy of one catalog entry, and the two catalogs share no ids.\n */\n upgrade_ladder: StoneUpgradeStep[];\n max_stone_level: number;\n kill_drop: StoneKillDropSettings;\n /**\n * BAL-024/BAL-025: guaranteed one-time packages at the equipment item\n * gates. Reaching `chapter` guarantees OWNERSHIP of every listed\n * template \u{2014} a missing one is granted as a single copy, an already owned\n * one is left alone, so the check is idempotent and never inflates\n * recurring drops.\n */\n milestone_grants: StoneMilestoneGrant[];\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 StonesSettingswhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for StonesSettingswhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for StonesSettingswhere
StonesSettings: Serialize,
impl VectorIntoWasmAbi for StonesSettingswhere
StonesSettings: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribeVector for StonesSettings
impl WasmDescribeVector for StonesSettings
Auto Trait Implementations§
impl Freeze for StonesSettings
impl RefUnwindSafe for StonesSettings
impl Send for StonesSettings
impl Sync for StonesSettings
impl Unpin for StonesSettings
impl UnwindSafe for StonesSettings
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
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
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.