Module mechanics

Source
Expand description

modules).

longer an engine to register modules against: the native script functions live in crate::behaviors and are exposed through the crate::BehaviorRegistry registry, while the content_lookups they read are built at BehaviorRegistry::new. This module therefore only declares the native sub-modules that the behaviors ports (and each other) depend on.

Modules§

ability_stones
Resolution of ability-stone modifiers: which stones are ACTIVE on an ability right now, and what numbers they change.
artifacts
Artifact combat runtime — the pure half.
balance
Functions and constants here mirror the original balance.yaml script, which contained the project’s fundamental combat and economic balance formulas. Content-dependent lookups (item rarity quality, ability rarity effectiveness, fixed-power items) are sourced from ContentLookups, which is populated at engine init time by reading the content_raw module’s data maps.
class_passives
The always-on rule of a class (BAL-033/BAL-034).
collection_power
Collection Power: the passive stat bonus paid for OWNING catalog content.
content
Native content script-module dispatchers plus the per-ability ability_info(level) composition for the content_raw-style ability map.
content_lookups
engine init. Holds fields that the Rust schemas don’t carry (q, eff, fixed_power, is_boss, is_dungeon, is_bossfight, attribute base_value, effect on_apply/on_change callbacks, …).
content_raw_extract
Builds ContentLookups from the typed GameConfig.
cores
Pure arithmetic and state machines for the twin cores, laws and bridges (OVT-2517, laws v0.2). No events, no IO — everything here is a function of CoresState + GameConfig, so every acceptance criterion in the plan is unit-testable without a fight or a database.
effect_cb
script ports (behaviors::cast_ability / cast_projectile).
fight
Native Rust fight logic.
fight_context
Native Rust fight_context module — now a no-op placeholder.
loop_tasks
Native Rust implementation of the loop-task pacing logic.
pet_facets
Pet Facets / Team Die v0 — the die, the bookkeeping keys and the arithmetic. The orchestration is crate::logic::pet_facets.
plinko
Серверная механика доски Plinko.
power_q
The dynamic half of displayed / matchmaking Power (BAL-030).
quest_board
Daily-board / weekly-set selection.
stones
Trigger/Effect Stone combat runtime — the arithmetic and the bookkeeping keys. The orchestration is crate::logic::stones.
support_shapes
Derived copies produced by shape supports (Split / Chain / Pierce), plus the Leech conversion, resolved at the ONE attack seam every ability damage path goes through.
util
(build_module / register_array_extensions) is gone — there is no engine to register into. What remains here are the pure, typed versions of the random helpers the util module used to expose to scripts: rand_round, get_random_element, rand_weight, and drain_random.