pub struct EffectRecord {
pub id: String,
pub kind: EffectKind,
pub category: Option<String>,
pub power: Option<u32>,
pub mtype: Option<String>,
pub accuracy: Option<u32>,
pub cost: Vec<ResourceCost>,
pub hooks: Vec<HookRecord>,
}Expand description
One effect record (doc 11 §1). kind selects which resolver hosts it and the
engine EffectType; the optional
category/power/type/accuracy are per-move data the provider’s damage
formula reads (the engine never sees them).
Fields§
§id: StringOpaque effect id string (e.g. "move.ember"). Maps to a synthesized
EffectId per hook at compile.
kind: EffectKindWhich resolver hosts this effect + the engine EffectType.
category: Option<String>Optional per-move category (Physical/Special) — provider-read data.
power: Option<u32>Optional base power — provider-read data.
mtype: Option<String>Optional attacking type name — used by ApplyTypeChart to recover the
in-flight move’s type from source_effect (doc 12 §3.3).
accuracy: Option<u32>Optional accuracy — provider-read data.
cost: Vec<ResourceCost>Optional resource cost of this move (MP / SP / mana — doc 13 §4). Each
entry names a resource from the ruleset’s resources: list and the amount
to pay. The loader interns the names to resource ids; the engine’s cost gate
(the move_cost provider hook) reads them before BeforeMove. Empty by
default ⇒ no cost ⇒ the gate is inert (the move always costs nothing).
hooks: Vec<HookRecord>The event hooks.
Trait Implementations§
Source§impl Clone for EffectRecord
impl Clone for EffectRecord
Source§fn clone(&self) -> EffectRecord
fn clone(&self) -> EffectRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more