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
//! AbilityStatic -- helper functions for static abilities (e.g. morph face-up).
//! Mirrors Java's `AbilityStatic.java`.
//! Static abilities are special actions that don't use the stack (like turning
//! a morph face-up).
use ZoneType;
use crateGameState;
use crateSpellAbility;
/// Type alias for SpellAbility when used as a static ability.
/// In Java, `AbilityStatic` is a subclass; in Rust it's the same struct.
pub type AbilityStatic = SpellAbility;
/// Whether this static ability can currently be played.
/// Mirrors Java's `AbilityStatic.canPlay()`.
///
/// The primary use case is morph/megamorph turn-face-up: the card must be
/// face-down on the battlefield, and the player must be able to pay the cost.