Expand description
AbilityActivated – helper functions for activated abilities.
Mirrors Java’s AbilityActivated.java.
In Rust the subclass is flattened: SpellAbility.is_activated == true.
Functions§
- can_
play - Whether this activated ability can currently be played.
Mirrors Java’s
AbilityActivated.canPlay(). - check_
restrictions - Check cant-be-activated restrictions from static abilities.
Mirrors Java’s
AbilityActivated.checkRestrictions(). - is_
detained - Check if the source card is detained (can’t attack, block, or activate abilities).
- is_
possible_ activated - Whether this activated ability is possible (zone and activator checks).
Mirrors Java’s
AbilityActivated.isPossible(). - is_
suppressed - Check if the source card is suppressed by a naming effect (Pithing Needle). A card is suppressed if an opponent controls a permanent that names it and prevents activated abilities.
- prompt_
if_ only_ possible_ ability - Whether to prompt even if this is the only possible ability.
Mirrors Java’s
AbilityActivated.promptIfOnlyPossibleAbility(). Returns false – activated abilities don’t need confirmation when they’re the only option (unlike spells which may have alternative costs).