Expand description
Twin cores, laws and bridges (OVT-2517), v0.2.
Two cores — one per WorldSide — carry a level each. The level product
drives a stat multiplier (see configs::cores::CoresSettings) and each
core’s own level drives how many law slots it offers.
A law in v0.2 is condition (Core event) → effect + Resonance into the bridge:
- the condition is an existing Core combat occurrence or an already computed property of a cast (“every 5th Basic Attack”, “Core Dodge”, “original Skill touched ≥3 targets”);
- the effect is ONE action — AoE damage, a cooldown cut, turning the
next attack into an AoE, a derived skill repeat, a timed stat buff. It
carries exactly one number (
LawTemplate::effect_value); the oldenhanced_valuetwin is gone; - the Resonance is what the law puts into its bridge per fire.
Only the laws of the ACTIVE side work — a hidden law’s condition is not even evaluated.
A bridge is bidirectional and carries two independent charges, one per
direction (BridgeCharge). A phase’s fires fill the charge that flows
AWAY from the active side; the flip delivers it to the receiving law, which
then runs amplified for the whole next phase. Amplification multiplies the
effect’s numbers only — never the condition, never the Resonance, which is
what makes self-amplification inexpressible rather than merely bounded.
This module holds the durable player-side shapes, the per-fight charge state
and the config template for one law; the arithmetic (slots, multiplier,
bridge limits, charge delivery) lives in
overlord_event_system::mechanics::cores and the combat runtime in
overlord_event_system::logic::laws.
Structs§
- Bridge
Charge - One live bridge of ONE combatant, with its two independent charges, in
hundredths of a unit (
CHARGE_SCALE). - Cores
State - Durable cores/laws/bridges state of one character. The all-zero default is the pre-feature character: no cores, no laws, no bridges, multiplier ×1.0.
- LawAttribute
Modifier - One attribute the law moves while its side is up. This is the law’s PASSIVE
half; the active half is
LawTemplate::effect. - LawBridge
- One bridge. Always stored side-normalized, so “exactly two laws from different cores” is structural rather than a runtime check that could rot.
- LawBridge
Charges - Per-fight bridge state of ONE combatant. Lives on the combat entity rather than on the fight because PvP and party fights hold several heroes, each with an independent active side and independent charges.
- LawTemplate
- A law as authored in config.
- Owned
Law - One law the character owns. There is at most one row per law template: the first copy becomes the working instance, every further copy is stock for the upgrade ladder (raw copies, their own level irrelevant).
Enums§
- LawCondition
- What makes a law fire. Every variant is a Core occurrence or a property of one — nothing a law (or any other modifier) produced can satisfy any of them, which is the anti-loop rule of the design (plan §8).
- LawEffect
- What a law does when it fires. One action, one number
(
LawTemplate::effect_value) plus an optional duration.
Constants§
- CHARGE_
SCALE - Fixed-point scale of every bridge charge: charges are stored in HUNDREDTHS of a unit and read back floored to whole units.