Struct CoresSettings

Source
pub struct CoresSettings {
Show 14 fields pub unlock_chapter: i64, pub max_core_level: i64, pub max_slots_per_core: i64, pub core_levels_per_slot: PositiveI64, pub upgrade_currency_id: CurrencyId, pub unlock_essence_grant: i64, pub kill_drop: CoreCurrencyKillDrop, pub essence_chapter_bands: Vec<CoreEssenceChapterBand>, pub law_drop_chance: f64, pub level_costs: NonEmptyVec<CoreLevelCost>, pub level_cost_growth: PositiveF64, pub multiplied_attribute_ids: Vec<AttributeId>, pub law_upgrade_ladder: NonEmptyVec<LawUpgradeStep>, pub bridge_charge: BridgeChargeConfig,
}
Expand description

Everything tunable about cores, laws and bridges.

Fields§

§unlock_chapter: i64§max_core_level: i64

The hard stop on core levels. Effectively unbounded since the acquisition pass: everything the level cap used to be coupled to now keys off Self::max_slot_level (max_slots_per_core × core_levels_per_slot) instead, so levels above that open no slot, allow no extra bridge and only grow the stat multiplier.

The history below explains why the SLOT ladder is what it is; it is no longer a statement about this field.

The old pair (cap 10, a slot every 2 levels) came from the pre-v0.2 rule “a law sits in two bridges”: possible bridges were 2 × slots, so the allowed count only caught up at level 11, and the every-two-levels ladder existed solely to stretch 5 slots over that cap. Laws v0.2 cut a law to ONE partner, halving the possible count — and the limit stopped binding from level 4, which made BL-01 Extra Span’s “+1 bridge” half dead content. With one slot per level and a cap of 5: slots = level, possible = slots, allowed = level − 1 — exactly one short at every level, so the limit binds again and BL-01 buys a bridge that has somewhere to go.

The cost ladder covers the slot-opening levels and is EXTENDED past them by level_cost_growth; the stat multiplier is the closed core_stat_multiplier formula (see cores_settings/_data.yaml).

§max_slots_per_core: i64

The slot cap, and — through CoresSettings::max_slot_level — the level at which slots, bridges and the deterministic law schedule all stop moving.

§core_levels_per_slot: PositiveI64§upgrade_currency_id: CurrencyId§unlock_essence_grant: i64§kill_drop: CoreCurrencyKillDrop

SUPERSEDED by Self::essence_chapter_bands (BAL-010) and no longer read by the runtime. Kept only as the rollback shape — editing it has no effect on the live faucet.

§essence_chapter_bands: Vec<CoreEssenceChapterBand>

BAL-010: the signed Core Essence faucet. Supersedes the flat kill_drop placeholder above, which stays only as the rollback shape.

Bands are checked in order and the LAST one whose from_chapter is at or below the reached chapter wins, so the final row is open-ended.

§law_drop_chance: f64

PLACEHOLDER ECONOMY (plan §4): the plan leaves the law drop source explicitly unassigned and asks for an existing one to be picked and marked as a stand-in. The mob-kill path is that pick — one random law template at this chance per enemy killed.

§level_costs: NonEmptyVec<CoreLevelCost>§level_cost_growth: PositiveF64

Geometric continuation of level_costs above its last tabled level: cost(L) = last_tabled_cost × growth^(L − last_tabled_level).

This is the whole of the unbounded sink. The tabled rows double (700 → 11 200), so anything at or below 2.0 continues the table’s own shape; a value at the low end of that range keeps the post-slot levels reachable instead of decorative.

§multiplied_attribute_ids: Vec<AttributeId>§law_upgrade_ladder: NonEmptyVec<LawUpgradeStep>§bridge_charge: BridgeChargeConfig

Implementations§

Source§

impl CoresSettings

Source

pub fn essence_band(&self, chapter: i64) -> Option<&CoreEssenceChapterBand>

The band governing chapter: the last row whose from_chapter is at or below it, so the final row stays open-ended. None only when no band is authored at all or the player is below the first one — before the ch21 gate no source hands out Essence, so that is a real state, not an error.

Source§

impl CoresSettings

Source

pub const fn is_unlocked(&self, chapter_level: i64) -> bool

Source

pub fn max_slot_level(&self) -> i64

The level at which the LAST law slot opens — and with it the last bridge, the last deterministic law grant, and the end of every rule that used to be pinned to max_core_level.

max_slots_per_core × core_levels_per_slot is exactly the argument that makes law_slots_for_level return max_slots_per_core, so the two can never drift apart.

Source

pub fn max_tabled_core_level(&self) -> i64

Highest level level_costs prices explicitly. Above it the ladder is continued by Self::level_cost_growth.

Source

pub fn core_level_cost(&self, level: i64) -> Option<i64>

Cost of raising a core to level, or None for level 0 and below or above max_core_level (which is how “above the cap” is refused).

Inside the table the authored row wins verbatim. Above it the cost grows geometrically from the last tabled row — the extension the unbounded level cap needs, kept here so the handler cannot disagree with it.

Saturating on purpose: growth^level overflows f64 to infinity long before level 9999, and f64 as i64 saturates at i64::MAX, which reads as “unaffordable” everywhere downstream rather than as a wrapped bargain.

Source

pub fn law_upgrade_cost(&self, level: i64) -> Option<i64>

Raw copies needed to raise a law to level, or None when the ladder stops there (that is the law level cap).

Source

pub fn max_law_level(&self) -> i64

Highest law level the ladder can reach.

Source

pub fn bridge_capacity(&self) -> i64

Charge one bridge direction can hold, in WHOLE units; everything above it burns. The runtime scales this by essences::cores::CHARGE_SCALE and by whatever the Bridge Law socket does to it.

Source

pub fn bridge_amplification_cap(&self) -> i64

Amplification a completely full bridge is worth, in permyriad.

Source

pub fn law_power_multiplier(&self, units: i64) -> f64

Law Power multiplier for a law that received units of charge at the last flip, at the shipped capacity and cap.

This is the ONLY place amplification is priced. It multiplies the numbers of a law’s effect (and of its passive modifiers) and nothing else — never a condition, never a Resonance — which is what stops a law from amplifying its own bridge (plan §3).

Trait Implementations§

Source§

impl Clone for CoresSettings

Source§

fn clone(&self) -> CoresSettings

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoresSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CoresSettings

Source§

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 CoresSettings

Source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
Source§

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

Generates a JSON Schema for this type. Read more
§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
Source§

impl Serialize for CoresSettings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Tsify for CoresSettings

Source§

const DECL: &'static str = "/**\n * Everything tunable about cores, laws and bridges.\n */\nexport interface CoresSettings {\n unlock_chapter: number;\n /**\n * The hard stop on core levels. **Effectively unbounded since the\n * acquisition pass**: everything the level cap used to be coupled to now\n * keys off [`Self::max_slot_level`] (`max_slots_per_core \u{d7}\n * core_levels_per_slot`) instead, so levels above that open no slot, allow\n * no extra bridge and only grow the stat multiplier.\n *\n * The history below explains why the SLOT ladder is what it is; it is no\n * longer a statement about this field.\n *\n * The old pair (cap 10, a slot every 2 levels) came from the pre-v0.2 rule\n * \\\"a law sits in two bridges\\\": possible bridges were `2 \u{d7} slots`, so the\n * allowed count only caught up at level 11, and the every-two-levels\n * ladder existed solely to stretch 5 slots over that cap. Laws v0.2 cut a\n * law to ONE partner, halving the possible count \u{2014} and the limit stopped\n * binding from level 4, which made `BL-01 Extra Span`\\\'s \\\"+1 bridge\\\" half\n * dead content. With one slot per level and a cap of 5: slots = level,\n * possible = slots, allowed = level \u{2212} 1 \u{2014} exactly one short at every level,\n * so the limit binds again and `BL-01` buys a bridge that has somewhere to\n * go.\n *\n * The cost ladder covers the slot-opening levels and is EXTENDED past\n * them by `level_cost_growth`; the stat multiplier is the closed\n * [`core_stat_multiplier`] formula (see `cores_settings/_data.yaml`).\n */\n max_core_level: number;\n /**\n * The slot cap, and \u{2014} through [`CoresSettings::max_slot_level`] \u{2014} the\n * level at which slots, bridges and the deterministic law schedule all\n * stop moving.\n */\n max_slots_per_core: number;\n core_levels_per_slot: PositiveI64;\n upgrade_currency_id: CurrencyId;\n unlock_essence_grant: number;\n /**\n * SUPERSEDED by [`Self::essence_chapter_bands`] (BAL-010) and no longer\n * read by the runtime. Kept only as the rollback shape \u{2014} editing it has no\n * effect on the live faucet.\n */\n kill_drop: CoreCurrencyKillDrop;\n /**\n * BAL-010: the signed Core Essence faucet. Supersedes the flat\n * `kill_drop` placeholder above, which stays only as the rollback shape.\n *\n * Bands are checked in order and the LAST one whose `from_chapter` is at or\n * below the reached chapter wins, so the final row is open-ended.\n */\n essence_chapter_bands: CoreEssenceChapterBand[];\n /**\n * PLACEHOLDER ECONOMY (plan \u{a7}4): the plan leaves the law drop source\n * explicitly unassigned and asks for an existing one to be picked and\n * marked as a stand-in. The mob-kill path is that pick \u{2014} one random law\n * template at this chance per enemy killed.\n */\n law_drop_chance: number;\n level_costs: NonEmptyVec<CoreLevelCost>;\n /**\n * Geometric continuation of `level_costs` above its last tabled level:\n * `cost(L) = last_tabled_cost \u{d7} growth^(L \u{2212} last_tabled_level)`.\n *\n * This is the whole of the unbounded sink. The tabled rows double\n * (700 \u{2192} 11 200), so anything at or below 2.0 continues the table\\\'s own\n * shape; a value at the low end of that range keeps the post-slot levels\n * reachable instead of decorative.\n */\n level_cost_growth: PositiveF64;\n multiplied_attribute_ids: AttributeId[];\n law_upgrade_ladder: NonEmptyVec<LawUpgradeStep>;\n bridge_charge: BridgeChargeConfig;\n}"

Source§

const SERIALIZATION_CONFIG: SerializationConfig

Source§

type JsType = JsType

§

fn into_js(&self) -> Result<Self::JsType, Error>
where Self: Serialize,

§

fn from_js<T>(js: T) -> Result<Self, Error>
where T: Into<JsValue>, Self: DeserializeOwned,

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,