Package mage.abilities

Examples of mage.abilities.TriggeredAbility


        this.expansionSetCode = "ULG";

        this.color.setRed(true);

        // At the beginning of your upkeep, if there are seven or more lands on the battlefield, sacrifice Impending Disaster and destroy all lands.
        TriggeredAbility ability  = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, false);
        ability.addEffect(new DestroyAllEffect(new FilterLandPermanent()));
        ImpendingDisasterCondition contition = new ImpendingDisasterCondition();
        this.addAbility(new ConditionalTriggeredAbility(ability, contition, "At the beginning of your upkeep, if there are seven or more lands on the battlefield, sacrifice {this} and destroy all lands"));
       
    }
View Full Code Here


        this.canTransform = true;

        // Whenever an opponent casts a spell, Tovolar's Magehunter deals 2 damage to that player.
        this.addAbility(new TovolarsMagehunterTriggeredAbility());
        // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Tovolar's Magehunter.
        TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false);
        this.addAbility(new ConditionalTriggeredAbility(ability,
                TwoOrMoreSpellsWereCastLastTurnCondition.getInstance(),
                TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE));
    }
View Full Code Here

        this.toughness = new MageInt(1);

        // Protection from black
        this.addAbility(new ProtectionAbility(filter));
        // At the beginning of each end step, if Whirling Dervish dealt damage to an opponent this turn, put a +1/+1 counter on it.
        TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of each end step", true, new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
    this.addAbility(new ConditionalTriggeredAbility(triggered, new DealtDamageToAnOpponent(), ruleText));
    }
View Full Code Here

        this.canTransform = true;
        this.secondSideCard = new TovolarsMagehunter(ownerId);

        // At the beginning of each upkeep, if no spells were cast last turn, transform Mondronen Shaman.
        this.addAbility(new TransformAbility());
        TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false);
        this.addAbility(new ConditionalTriggeredAbility(ability,
                NoSpellsWereCastLastTurnCondition.getInstance(),
                TransformAbility.NO_SPELLS_TRANSFORM_RULE));
    }
View Full Code Here

        this.addAbility(VigilanceAbility.getInstance());
        // {tap}: Add {G}{G} to your mana pool.
        this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(2)), new TapSourceCost()));
        // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Moonscarred Werewolf.
        TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false);
        this.addAbility(new ConditionalTriggeredAbility(ability,
                TwoOrMoreSpellsWereCastLastTurnCondition.getInstance(),
                TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE));
    }
View Full Code Here

        ability1.setRuleVisible(false); // rule will be shown only on the other face of the card but triggers only on this side
        this.addAbility(ability1);

        // At the beginning of each upkeep, if no spells were cast last turn, transform Afflicted Deserter.
        this.addAbility(new TransformAbility());
        TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false);
        this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.getInstance(), TransformAbility.NO_SPELLS_TRANSFORM_RULE));
    }
View Full Code Here

    public IvoryCraneNetsuke(UUID ownerId) {
        super(ownerId, 155, "Ivory Crane Netsuke", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
        this.expansionSetCode = "SOK";

        // At the beginning of your upkeep, if you have seven or more cards in hand, you gain 4 life.
        TriggeredAbility ability  = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(4), TargetController.YOU, false);
        CardsInHandCondition contition = new CardsInHandCondition(CardsInHandCondition.CountType.MORE_THAN, 6);
        this.addAbility(new ConditionalTriggeredAbility(ability, contition, "At the beginning of your upkeep, if you have seven or more cards in hand, you gain 4 life."));
       
    }
View Full Code Here

        // Remove a charge counter from Mana Bloom: Add one mana of any color to your mana pool. Activate this ability only once each turn.
        Ability ability = new ActivateOncePerTurnManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new RemoveCountersSourceCost(CounterType.CHARGE.createInstance()));
        this.addAbility(ability);

        // At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand.
        TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(new ReturnToHandSourceEffect(true), TargetController.YOU, false);
        this.addAbility(new ConditionalTriggeredAbility(triggeredAbility, new SourceHasCounterCondition(CounterType.CHARGE, 0,0), "At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand."));

    }
View Full Code Here

        // {1}{G}: Wolfbitten Captive gets +2/+2 until end of turn. Activate this ability only once each turn.
        this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{1}{G}")));

        // At the beginning of each upkeep, if no spells were cast last turn, transform Wolfbitten Captive.
        this.addAbility(new TransformAbility());
        TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false);
        this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.getInstance(), TransformAbility.NO_SPELLS_TRANSFORM_RULE));
    }
View Full Code Here

        this.color.setBlack(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // Morbid - When Wakedancer enters the battlefield, if a creature died this turn, put a 2/2 black Zombie creature token onto the battlefield.
        TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieToken("ISD")));
        this.addAbility(new ConditionalTriggeredAbility(ability, MorbidCondition.getInstance(), staticText));
    }
View Full Code Here

TOP

Related Classes of mage.abilities.TriggeredAbility

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.