Skip to main content

EffectSite

Enum EffectSite 

Source
pub enum EffectSite {
    Objective {
        quest: String,
        objective: String,
    },
    QuestComplete {
        quest: String,
    },
    Trigger {
        trigger: String,
    },
    Trap {
        trap: String,
    },
    DialogueRespawn {
        npc: String,
        node: String,
    },
    ShortcutUnlock {
        shortcut: String,
    },
    ShopOffer {
        shop: String,
        offer: usize,
    },
    OnDeath,
    OnKill {
        fight: String,
    },
    AssemblyLand {
        assembly: String,
        step: usize,
    },
    LoopCross {
        loop: String,
    },
}
Expand description

Where in the campaign one effect sits — the attribution every per-branch proof and the branch chronicle need (spec-0025).

Variants§

§

Objective

A quest’s on_objective_complete[<objective>] bundle.

Fields

§quest: String

The owning quest.

§objective: String

The objective whose completion fires the bundle.

§

QuestComplete

A quest’s on_complete bundle.

Fields

§quest: String

The owning quest.

§

Trigger

An environment trigger’s effects bundle — ambient, no DAG position.

Fields

§trigger: String

The trigger id.

§

Trap

A trap’s spec-0022 payload bundle — ambient, no DAG position.

Fields

§trap: String

The trap id.

§

DialogueRespawn

A dialogue option’s set-checkpoint on_respawn bundle — ambient, no DAG position, and the only site that does not live in the quests stage.

This variant did not exist until the effect-root sweep, and its absence was load-bearing: EffectSite had no way to represent a dialogue-hosted bundle, so the four proofs that walk for_each_campaign_effect (combat::actor_beats, wave::difficulty_checks, daylight::fightable_actor, nav::actor_fights) could not have seen root 5 even if their authors had thought of it. Widening the type is what let the walk widen.

Fields

§npc: String

The NPC whose dialogue tree hosts the option.

§node: String

The node the option sits under.

§

ShortcutUnlock

A shortcuts[].on_unlock bundle (spec-0016 §2) — ambient, no DAG position, and the sixth root: representable here only since spec-0031, for exactly the reason EffectSite::DialogueRespawn records above.

Fields

§shortcut: String

The shortcut id.

§

ShopOffer

A shops[].offers[].effects bundle (DSL v0.10, spec-0032) — ambient, no DAG position: nobody is forced to buy anything.

Fields

§shop: String

The shop id.

§offer: usize

The offer’s index within that shop, which is also its button order.

§

OnDeath

The campaign’s on_death bundle (spec-0031) — ambient, no DAG position, and no owning object: there is one per campaign.

§

OnKill

A wave’s or an actor’s on_kill bundle (spec-0074) — ambient, no DAG position: nobody is forced to be credited with a kill.

Fields

§fight: String

The fight’s id (wave/<kebab> or actor/<kebab>).

§

AssemblyLand

An assembly strike step’s on_land bundle (spec-0082) — ambient, no DAG position: nobody is forced to stand where a blow lands.

Fields

§assembly: String

The assembly id.

§step: usize

The step’s index within the pattern.

§

LoopCross

A loop’s on_cross bundle (spec-0086) — no DAG position of its own: it runs when a body crosses the holding slab.

Fields

§loop: String

The loop id (loop/<kebab>).

Implementations§

Source§

impl EffectSite

Source

pub fn quest(&self) -> Option<&str>

The quest this site belongs to, if it has a DAG position at all.

This Option is the capability, and it is on the enum rather than on the variants that happen to have a quest. Only two of the eight sites name a quest, because only two of the eight roots HAVE a DAG position: an ambient root — a trigger, a trap payload, a dialogue on_respawn, a shortcut’s on_unlock, the campaign’s on_death, a shop offer — fires at a moment no static model can order, and inventing a quest for one would be exactly the over-attribution the completability model must not make. Asking the question of every variant and getting an honest None is the lift; tools/ci/check-capability-ownership.py check D asked for it while the field was still cross-cutting, and spec-0032’s eighth site took it below that threshold, so the reasoning lives here now rather than in an exemption.

Trait Implementations§

Source§

impl Clone for EffectSite

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for EffectSite

Source§

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

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

impl Eq for EffectSite

Source§

impl PartialEq for EffectSite

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for EffectSite

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.

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.