1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! SpellApiBased — spell abilities backed by an API type.
//!
//! Mirrors Java's `SpellApiBased.java`.
//! A spell (as opposed to an activated ability) whose resolution is
//! dispatched through the effect system based on its `ApiType`.
use crateSpellAbility;
/// Marker trait for API-based spell abilities.
///
/// In Java, `SpellApiBased extends Spell` and holds a reference to
/// `SpellAbilityEffect`. In Rust the dispatch is centralized in
/// `effect_dispatch!`, so this provides structural parity.
/// Build a spell ability for an API-based spell.
/// Mirrors Java's `SpellApiBased` constructor which creates a Spell with
/// an associated SpellAbilityEffect.
///
/// In the Rust engine, this delegates to `ability_factory::build_spell_ability`
/// since the effect dispatch is centralized.
/// Resolve an API-based spell ability.
/// Mirrors Java's `SpellApiBased.resolve()` which delegates to its SpellAbilityEffect.
///
/// In the Rust engine, resolution is centralized in `effects::resolve_effect`.