Module artifacts

Source
Expand description

Artifact combat runtime — the pure half.

The data lives in essences::artifacts and the knobs in configs::artifacts; this module is the arithmetic and the per-fight bookkeeping keys that turn them into behaviour. The orchestration — which event runs which rule — is crate::logic::artifacts, and the Aspect rules that ride on a trigger fire are woven into crate::logic::stones.

Like the stone runtime, all per-fight artifact state lives in the player entity’s attributes, namespaced artifact.*: it resets exactly when the fight’s entities are rebuilt, needs no schema or Unity change, and is reached identically from the pure dispatch and from the monolith’s merged arms. No attribute code is named artifact, so the namespace cannot collide with a stat (crate::mechanics::fight::get_entity_stat composes <code>, <code>.bonus and <code>.mod).

Structs§

HiddenWake
How a hidden law may be woken on this event, by whichever source offers the most (design §3.3: the largest available multiplier, never the sum).
LawColumnMods
Everything the right column does to the law runtime, resolved in ONE read.
LawRuleInstance
One socketed Law-column stone, flattened to the numbers its rule needs.

Constants§

AFTERIMAGE_COUNT
How many trigger procs FA-04 Afterimage has already accompanied in this phase.
AFTERIMAGE_REVISION
Flip revision (plus one) the FA-04 Afterimage counter belongs to. A new phase is a new count, and the marker is what tells the two apart.
FLIP_ASPECT_REVISION
Flip revision (plus one) the Flip-Aspect rule last ran for. One flip runs one volley even if the GlobalFlip event is dispatched more than once.
LAST_RESOLVED_SLOT
Which slot resolved last, as slot_order_marker. The two slot-order rules (VA-02 Alternator, VA-03 Focused Engine) are defined against “the previous slot”, and up to five slots answer one Core event, so the answer has to survive both the batch and the event boundary.
SHADOW_CIRCLE_DUE
Tick at which «Теневой круг» (HA-02 Shadow Round) next fires.
SHADOW_CIRCLE_INDEX
Which slot «Теневой круг» visits next; it walks the two-sided slots in order and wraps.
SLOT_REPEAT_STREAK
How many times in a row the same slot has resolved, counting repeats only: 0 on a fresh slot, 1 on its first repeat. VA-03 turns this into its stacking bonus.

Functions§

crescendo_multiplier
Strength multiplier VA-01 Crescendo applies to an effect fired right now.
equipped_world_law
The World Law of the worn artifact, or None when nothing is worn.
flip_threshold
The flip threshold this collection actually plays against.
gauge_fill
How full the gauge is, in [0, 1], against the bar this player plays against. A nonsense bar reads as empty rather than dividing by zero.
law_column_mods
Reads the three Law sockets and the worn World Law into one value.
opening_five_key
Flip revision (plus one) at which this slot’s effect last took the VA-04 Opening Five bonus. 0 means “not yet this fight” — hence the + 1, so revision 0 is distinguishable from “never”.
ownership_stat_mods
The ownership bonus of a whole collection, as ("<code>.mod", permyriad) pairs ready for calculate_entity_stats_with_mods.
share_multiplier
Share of full strength a rule that rebroadcasts an effect fires it at («Фоновый голос», «Теневой круг», the two Flip rules).
slot_order_marker
Position of item_type in the order the slot rules resolve in, plus one.
socketed_aspect
The stone in socket together with its upgrade level, or None when the socket is empty.
total_multiplier
Strength multiplier for a rule that states the effect’s total strength as a percentage (VA-04 Opening Five at 150%): 100 is plain.
warm_start_key
Flip revision (plus one) at which this slot’s effect last took its FA-03 Warm Start repeat. Same shape as opening_five_key, separate key: the two rules live in different sockets and are worn together.