Module pet_facets

Source
Expand description

Pet Facets / Team Die v0 — the combat runtime.

§The resolution boundary

Global Flip begins
→ the incoming side is determined
→ the Team Die picks one of THAT side's three facets
→ the outcome applies one instant payoff or one short window
→ the remaining incoming Flip payoffs execute

That order is the whole reason OverlordLogic::handle_global_flip exists: the die is rolled and its outcome applied BEFORE OverlordLogic::apply_flip_to_laws delivers the bridge charge and fires the phase-start laws, and long before the artifact Flip Aspects run out of apply_success_hooks. The same function is the single dispatch arm for GlobalFlip in both paths — the pure dispatch and the monolith’s merged arm — so neither can drift into rolling a different number of times.

§Provenance

A facet outcome is Derived: everything it lands as a combat outcome is emitted CombatEventOrigin::Proc, so it can never ignite a Trigger Stone and never re-enter a law condition. It creates no Resonance, no Mastery, no Bridge charge and no Gauge — the two Clock Crow facets (PetFacet::AdvanceNotice, PetFacet::RisingGate) are the design doc’s one stated exception, and they are the Flip-Gauge pair whose entire content is handing out Gauge. Where a facet touches Resonance (PetFacet::LeadReading) or the Gauge of an existing proc (PetFacet::RisingGate) it MODIFIES the flow that was already going to run; it never opens a second one.

A facet-generated repeat cannot repeat itself: mech::APPLYING is raised for the whole of an outcome, and OverlordLogic::apply_pet_facets — the hook that spends armed facet state — leaves immediately while it is up.

§State

Per-fight facet state lives in the player entity’s attributes under pet.* (crate::mechanics::pet_facets), so it resets with the fight by construction. The three “one chosen Law” facets read a DURABLE selection (essences::pet_facets::PetFacetLawChoices, set out of combat) and keep only the charge in the entity.

Functions§

facet_from_marker
The facet a marker written by [facet_marker] names.