mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[ECL] Implement Kirol, Attentive First-Year
This commit is contained in:
parent
16e3b25024
commit
0ef4695e29
7 changed files with 83 additions and 44 deletions
|
|
@ -8,6 +8,7 @@ import mage.filter.common.*;
|
|||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.*;
|
||||
import mage.filter.predicate.other.AnotherTargetPredicate;
|
||||
import mage.filter.predicate.other.TriggeredAbilityPredicate;
|
||||
import mage.filter.predicate.permanent.*;
|
||||
|
||||
/**
|
||||
|
|
@ -978,6 +979,14 @@ public final class StaticFilters {
|
|||
FILTER_SPELL_OR_ABILITY_A.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterStackObject FILTER_CONTROLLED_TRIGGERED_ABILITY = new FilterStackObject("triggered ability you control");
|
||||
|
||||
static {
|
||||
FILTER_CONTROLLED_TRIGGERED_ABILITY.add(TriggeredAbilityPredicate.instance);
|
||||
FILTER_CONTROLLED_TRIGGERED_ABILITY.add(TargetController.YOU.getControllerPredicate());
|
||||
FILTER_CONTROLLED_TRIGGERED_ABILITY.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterCreatureSpell FILTER_SPELL_A_CREATURE = new FilterCreatureSpell("a creature spell");
|
||||
|
||||
static {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
package mage.filter.predicate.other;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.StackObject;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum TriggeredAbilityPredicate implements Predicate<StackObject> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(StackObject input, Game game) {
|
||||
return input instanceof Ability && ((Ability) input).isTriggeredAbility();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue