Package mage.abilities.decorator

Examples of mage.abilities.decorator.ConditionalOneShotEffect


        this.color.setRed(true);

        // Shower of Coals deals 2 damage to each of up to three target creatures and/or players.
        // Threshold - Shower of Coals deals 4 damage to each of those creatures and/or players instead if seven or more cards are in your graveyard.
        Effect effect = new ConditionalOneShotEffect(new DamageTargetEffect(4),
                                                     new DamageTargetEffect(2),
                                                     new CardsInControllerGraveCondition(7),
                                                     "{this} deals 2 damage to each of up to three target creatures and/or players.<br/><br/><i>Threshold<i/> - {this} deals 4 damage to each of those creatures and/or players instead if seven or more cards are in your graveyard.");
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(0,3));
        this.getSpellAbility().addEffect(effect);
View Full Code Here


        super(ownerId, 228, "Razorverge Thicket", 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 GreenManaAbility());
        this.addAbility(new WhiteManaAbility());
    }
View Full Code Here

        // Prevent all combat damage that would be dealt this turn if {W} was spent to cast Batwing Brume. Each player loses 1 life for each attacking creature he or she controls if {B} was spent to cast Batwing Brume.
        Effect effect = new ConditionalReplacementEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true),
                new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.W)));
        effect.setText("Prevent all combat damage that would be dealt this turn if {W} was spent to cast {this}");
        this.getSpellAbility().addEffect(effect);
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new BatwingBrumeEffect(),
                new ManaWasSpentCondition(ColoredManaSymbol.B), "Each player loses 1 life for each attacking creature he or she controls if {B} was spent to cast {this}"));
        this.addInfo("Info1", "<i>(Do both if {W}{B} was spent.)<i>");
        this.addWatcher(new ManaSpentToCastWatcher());
View Full Code Here

        super(ownerId, 227, "Rootbound Crag", 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 Mountain or a Forest";
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
        this.addAbility(new RedManaAbility());
        this.addAbility(new GreenManaAbility());
    }
View Full Code Here

        this.color.setWhite(true);

        // Destroy all creatures. They can't be regenerated.
        // Threshold - If seven or more cards are in your graveyard, instead destroy all creatures, then put two 1/1 white Spirit creature tokens with flying onto the battlefield. Creatures destroyed this way can't be regenerated.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new KirtarsWrathEffect(),
                new DestroyAllEffect(new FilterCreaturePermanent("all creatures"), true),
                new CardsInControllerGraveCondition(7),
                "Destroy all creatures. They can't be regenerated.<br/><br/><i>Threshold<i/> - If seven or more cards are in your graveyard, instead destroy all creatures, then put two 1/1 white Spirit creature tokens with flying onto the battlefield. Creatures destroyed this way can't be regenerated"));
View Full Code Here

        this.expansionSetCode = "EVE";

        this.color.setBlue(true);

        // {2}: Draw a card if you have no cards in hand.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalOneShotEffect(
                new DrawCardSourceControllerEffect(2), new CardsInHandCondition(), "Draw a card if you have no cards in hand"), new ManaCostsImpl("{2}")));
    }
View Full Code Here

        this.color.setRed(true);

        // Thermal Blast deals 3 damage to target creature.
        // Threshold - Thermal Blast deals 5 damage to that creature instead if seven or more cards are in your graveyard.
        Effect effect = new ConditionalOneShotEffect(new DamageTargetEffect(5),
                                                     new DamageTargetEffect(3),
                                                     new CardsInControllerGraveCondition(7),
                                                     "{this} deals 3 damage to target creature.<br/><br/><i>Threshold</i> - {this} deals 5 damage to that creature instead if seven or more cards are in your graveyard.");
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(effect);
View Full Code Here

        super(ownerId, 226, "Glacial Fortress", 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 Plains or an Island";
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
        this.addAbility(new BlueManaAbility());
        this.addAbility(new WhiteManaAbility());
    }
View Full Code Here

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

        // {2}, Sacrifice a creature: Lyzolda, the Blood Witch deals 2 damage to target creature or player if the sacrificed creature was red. Draw a card if the sacrificed creature was black.
        Effect effect = new ConditionalOneShotEffect(
                new DamageTargetEffect(2),
                new SacrificedWasCondition(redFilter),
                "{source} deals 2 damage to target creature or player if the sacrificed creature was red");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}"));
        effect = new ConditionalOneShotEffect(
                new DrawCardSourceControllerEffect(1),
                new SacrificedWasCondition(blackFilter),
                "Draw a card if the sacrificed creature was black");
        ability.addEffect(effect);
        ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
View Full Code Here

        this.color.setRed(true);

        this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
        this.getSpellAbility().addEffect(new DamageTargetEffect(2));

        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DamageTargetEffect(2), MetalcraftCondition.getInstance(), effectText));
    }
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.