Package mage.abilities.decorator

Examples of mage.abilities.decorator.ConditionalOneShotEffect


        this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);
        // Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice Ordeal of Heliod.
        ability = new AttacksAttachedTriggeredAbility(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(),"it"), AttachmentType.AURA, false);
        ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3),
                "Then if it has three or more +1/+1 counters on it, sacrifice {this}"));
        this.addAbility(ability);
        // When you sacrifice Ordeal of Heliod, you gain 10 life.
        this.addAbility(new SacrificeSourceTriggeredAbility(new GainLifeEffect(10), false));
    }
View Full Code Here


        // {1}{B}, {tap}: Target opponent discards a card. Then if that player has no cards in hand, flip Nezumi Shortfang.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1), new ManaCostsImpl("{1}{B}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetOpponent());
        ability.addEffect(new ConditionalOneShotEffect(
                    new FlipSourceEffect(new StabwhiskerTheOdious()),
                    new CardsInTargetOpponentHandCondition(CardsInTargetOpponentHandCondition.CountType.FEWER_THAN, 1),
                    "Then if that player has no cards in hand, flip {this}"));
        this.addAbility(ability);
    }
View Full Code Here

        super(ownerId, 229, "Seachrome Coast", Rarity.RARE, new CardType[]{CardType.LAND}, null);
        this.expansionSetCode = "SOM";

        Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 4));
        String abilityText = "tap it unless you control fewer than 3 lands";
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
        this.addAbility(new WhiteManaAbility());
        this.addAbility(new BlueManaAbility());
    }
View Full Code Here

        this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
        Effect effect = new DiscardControllerEffect(1);
        effect.setText(", then discard a card");
        this.getSpellAbility().addEffect(effect);
        // If you've cast a spell named Peer Through Depths and a spell named Reach Through Mists this turn, you may search your library for a card named The Unspeakable, put it onto the battlefield, then shuffle your library.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), false, true), new SiftThroughSandsCondition(), rule));
        this.addWatcher(new SiftThroughSandsWatcher());
    }
View Full Code Here

        this.expansionSetCode = "SOM";

        // Copperline Gorge enters the battlefield tapped unless you control two or fewer other lands.
        Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 4));
        String abilityText = "tapped unless you control two or fewer other lands";
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
        this.addAbility(new RedManaAbility());
        this.addAbility(new GreenManaAbility());
    }
View Full Code Here

        this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);
        // Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice Ordeal of Thassa.
        ability = new AttacksAttachedTriggeredAbility(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(),"it"), AttachmentType.AURA, false);
        ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3),
                "Then if it has three or more +1/+1 counters on it, sacrifice {this}"));
        this.addAbility(ability);
        // When you sacrifice Ordeal of Thassa, draw two cards.
        this.addAbility(new SacrificeSourceTriggeredAbility(new DrawCardSourceControllerEffect(2), false));
View Full Code Here

        // Kicker {4}
        this.addAbility(new KickerAbility("{4}"));
        // Target player discards a card. If Hypnotic Cloud was kicked, that player discards three cards instead.

        this.getSpellAbility().addTarget(new TargetPlayer());
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DiscardTargetEffect(3), new DiscardTargetEffect(1), KickedCondition.getInstance(),
                "Target player discards a card. If {this} was kicked, that player discards three cards instead"));

    }
View Full Code Here

        // White creatures get +1/+1.
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false));
        this.addAbility(ability);
        // Threshold - White creatures get an additional +1/+1 as long as seven or more cards are in your graveyard.
        ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalOneShotEffect(
                    new AddContinuousEffectToGame(new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false)),
                    new CardsInControllerGraveCondition(7),
                    "<i>Threshold</i> - If seven or more cards are in your graveyard, white creatures get an additional +1/+1."
                ));
        this.addAbility(ability);
View Full Code Here

        this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);
        // Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice Ordeal of Purphoros.
        ability = new AttacksAttachedTriggeredAbility(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(),"it"), AttachmentType.AURA, false);
        ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3),
                "Then if it has three or more +1/+1 counters on it, sacrifice {this}"));
        this.addAbility(ability);
        // When you sacrifice Ordeal of Purphoros, it deals 3 damage to target creature or player.
        ability = new SacrificeSourceTriggeredAbility(
                new DamageTargetEffect(3),false);
View Full Code Here

        // Each creature can't be blocked this turn except by two or more creatures.
        this.getSpellAbility().addEffect(new CantBeBlockedByOneAllEffect(2, new FilterCreaturePermanent(), Duration.EndOfTurn));

        // Threshold — If seven or more cards are in your graveyard, creatures can't block this turn.
        this.getSpellAbility().addEffect(
                new ConditionalOneShotEffect(
                    new AddContinuousEffectToGame(new CantBlockAllEffect(new FilterCreaturePermanent(), Duration.EndOfTurn)),
                    new CardsInControllerGraveCondition(7),
                    "<br/><br/><i>Threshold</i> - If seven or more cards are in your graveyard, creatures can't block this turn"
                ));
    }
View Full Code Here

TOP

Related Classes of mage.abilities.decorator.ConditionalOneShotEffect

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.