Package mage.abilities.decorator

Examples of mage.abilities.decorator.ConditionalOneShotEffect


        this.addAbility(new KickerAbility("{2}{U}"));
        // Destroy target artifact or enchantment.
        this.getSpellAbility().addEffect(new DestroyTargetEffect());
        this.getSpellAbility().addTarget(new TargetPermanent(filter));
        // If Dismantling Blow was kicked, draw two cards.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new DrawCardSourceControllerEffect(2),
                KickedCondition.getInstance(),
                "If {this} was kicked, draw two cards"));
    }
View Full Code Here


        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 Erebos.
        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 Erebos, target player discards two cards.
        ability = new SacrificeSourceTriggeredAbility(new DiscardTargetEffect(2), false);
        ability.addTarget(new TargetPlayer());
View Full Code Here

        this.expansionSetCode = "TSP";

        this.color.setBlue(true);

        // Target player draws four cards, then discards three cards. If you cast this spell during your main phase, instead that player draws four cards, then discards two cards.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new DrawDiscardTargetEffect(4,2),
                new DrawDiscardTargetEffect(4,3),
                MyMainPhaseCondition.getInstance(),
                "Target player draws four cards, then discards three cards. If you cast this spell during your main phase, instead that player draws four cards, then discards two cards"));
        this.getSpellAbility().addTarget(new TargetPlayer());
View Full Code Here

        this.addAbility(new KickerAbility("{R}"));

        // Destroy target artifact or enchantment. If Orim's Thunder was kicked, it deals damage equal to that permanent's converted mana cost to target creature.
        this.getSpellAbility().addEffect(new OrimsThunderEffect());
        this.getSpellAbility().addTarget(new TargetPermanent(filter));
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new OrimsThunderEffect2(),
                KickedCondition.getInstance(),
                "If Orim's Thunder was kicked, it deals damage equal to that permanent's converted mana cost to target creature"));

    }
View Full Code Here

        super(ownerId, 224, "Drowned Catacomb", Rarity.RARE, new CardType[]{CardType.LAND}, null);
        this.expansionSetCode = "M10";

        Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0));
        String abilityText = "tap it unless you control a Island or a Swamp";
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
        this.addAbility(new BlackManaAbility());
        this.addAbility(new BlueManaAbility());
    }
View Full Code Here

        // Prevent all combat damage that would be dealt this turn.
        this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(null, Duration.EndOfTurn, true));

        // Fateful hour - If you have 5 or less life, tap all attacking creatures. Those creatures don't untap during their controller's next untap step.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ClingingMistsEffect(),
                FatefulHourCondition.getInstance(), "If you have 5 or less life, tap all attacking creatures. Those creatures don't untap during their controller's next untap step."));

    }
View Full Code Here

        this.power = new MageInt(4);
        this.toughness = new MageInt(4);

        this.addAbility(TrampleAbility.getInstance());
        // Morbid - Gravetiller Wurm enters the battlefield with four +1/+1 counters on it if a creature died this turn.
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(4)),
                MorbidCondition.getInstance(), ""), "with four +1/+1 counters on it if a creature died this turn"));
    }
View Full Code Here

        this.color.setGreen(true);

        // Put a +1/+1 counter on target creature.
        // Morbid - Put three +1/+1 counters on that creature instead if a creature died this turn.
        this.getSpellAbility().addEffect(
                new ConditionalOneShotEffect(
                        new AddCountersTargetEffect(CounterType.P1P1.createInstance(3)),
                        new AddCountersTargetEffect(CounterType.P1P1.createInstance()),
                        MorbidCondition.getInstance(),
                        "Put a +1/+1 counter on target creature. Morbid - Put three +1/+1 counters on that creature instead if a creature died this turn"));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
View Full Code Here

        // Haste
        this.addAbility(HasteAbility.getInstance());
       
        // Hotheaded Giant enters the battlefield with two -1/-1 counters on it unless you've cast another red spell this turn.
        Condition condition = new CastRedSpellThisTurnCondition();
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.M1M1.createInstance(2)), new InvertCondition(condition), ""), "with two -1/-1 counters on it unless you've cast another red spell this turn"));
        this.addWatcher(new HotHeadedGiantWatcher(this.getId()));
       
    }
View Full Code Here

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

        // When Tin Street Hooligan enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact.
        Ability ability = new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new DestroyTargetEffect(), new ManaWasSpentCondition(ColoredManaSymbol.G),
                "if {G} was spent to cast {this}, destroy target artifact"), false);
        ability.addTarget(new TargetArtifactPermanent());       
        this.addAbility(ability);
        this.addWatcher(new ManaSpentToCastWatcher());
    }
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.