pub struct AbilityStoneSettings {
pub unlock_chapter: i64,
pub sockets: Vec<AbilityStoneSocketSettings>,
pub class_sockets: Vec<AbilityStoneSocketSettings>,
pub upgrade_copies: Vec<i64>,
pub chapter_reward_period: i64,
}Expand description
Ability-stone collection settings: socket layout, upgrade ladder and the stub faucet.
Fields§
§unlock_chapter: i64§sockets: Vec<AbilityStoneSocketSettings>Socket layout for regular abilities, in socket-index order (BAL-005: Real/Fantasy/Real/Fantasy opening at ability level 2/4/8/16).
class_sockets: Vec<AbilityStoneSocketSettings>Socket layout for class abilities. They are level-capped below regular abilities, so they get their own ladder (BAL-005/BAL-034: 2/4/6/7).
upgrade_copies: Vec<i64>Raw copies required for each upgrade step: entry i is the cost of
reaching level i + 2. Draft: 2 copies for level 2, 3 for level 3,
5 for level 4.
chapter_reward_period: i64STUB FAUCET: ability stones are granted as a chapter-clear reward, one
copy every chapter_reward_period cleared chapter levels. The stone is
picked deterministically from the catalog by the cleared chapter level,
so the drop is reproducible and testable. This rides an existing source
(chapter rewards) exactly as the plan asks; the real source mix (mob
drops, quests) is a later design pass.
Implementations§
Source§impl AbilityStoneSettings
impl AbilityStoneSettings
pub const fn is_unlocked(&self, chapter_level: i64) -> bool
Sourcepub fn copies_for_next_level(&self, level: i64) -> Option<i64>
pub fn copies_for_next_level(&self, level: i64) -> Option<i64>
Copies required to go from level to level + 1, or None when the
stone is already at max level.
Sourcepub fn sockets_for(
&self,
is_class_ability: bool,
) -> &[AbilityStoneSocketSettings]
pub fn sockets_for( &self, is_class_ability: bool, ) -> &[AbilityStoneSocketSettings]
The socket ladder that applies to an ability of the given kind.
pub fn socket( &self, is_class_ability: bool, socket_index: i64, ) -> Option<&AbilityStoneSocketSettings>
Trait Implementations§
Source§impl Clone for AbilityStoneSettings
impl Clone for AbilityStoneSettings
Source§fn clone(&self) -> AbilityStoneSettings
fn clone(&self) -> AbilityStoneSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AbilityStoneSettings
impl Debug for AbilityStoneSettings
Source§impl<'de> Deserialize<'de> for AbilityStoneSettings
impl<'de> Deserialize<'de> for AbilityStoneSettings
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 JsonSchema for AbilityStoneSettings
impl JsonSchema for AbilityStoneSettings
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 more