Package mage.abilities.decorator

Examples of mage.abilities.decorator.ConditionalOneShotEffect


        this.color.setGreen(true);

        // Put two 3/3 green Centaur enchantment creature tokens onto the battlefield. If it's your turn, scry 2.
        this.getSpellAbility().addEffect(new CreateTokenEffect(new CentaurEnchantmentCreatureToken(), 2));
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ScryEffect(2), MyTurnCondition.getInstance(), "If it's your turn, scry 2"));
    }
View Full Code Here


        this.color.setWhite(true);

        // Target player gains 4 life.
        // Landfall - If you had a land enter the battlefield under your control this turn, that player gains 8 life instead.
        this.addWatcher(new LandfallWatcher());
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new GainLifeTargetEffect(8), new GainLifeTargetEffect(4), LandfallCondition.getInstance(), "Target player gains 4 life. Landfall - If you had a land enter the battlefield under your control this turn, that player gains 8 life instead"));
        this.getSpellAbility().addTarget(new TargetPlayer());
    }
View Full Code Here

        this.color.setBlue(true);

        // Draw two cards.
        // Landfall - If you had a land enter the battlefield under your control this turn, draw three cards instead.
        this.addWatcher(new LandfallWatcher());
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(3), new DrawCardSourceControllerEffect(2), LandfallCondition.getInstance(), "Draw 2 cards. Landfall - If you had a land enter the battlefield under your control this turn, draw three cards instead"));
    }
View Full Code Here

        this.addAbility(new EntersBattlefieldTappedAbility());
        this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance(2))));
        // {tap}, Remove a depletion counter from Remote Farm: Add {W}{W} to your mana pool. If there are no depletion counters on Remote Farm, sacrifice it.
        Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana(2), new TapSourceCost());
        ability.addCost(new RemoveCountersSourceCost(CounterType.DEPLETION.createInstance(1)));
        ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new SourceHasCounterCondition(CounterType.DEPLETION, 0,0), "If there are no depletion counters on Remote Farm, sacrifice it"));
    }
View Full Code Here

        this.addAbility(new EntersBattlefieldTappedAbility());
        this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance(2))));
        // {tap}, Remove a depletion counter from Hickory Woodlot: Add {G}{G} to your mana pool. If there are no depletion counters on Hickory Woodlot, sacrifice it.
        Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(2), new TapSourceCost());
        ability.addCost(new RemoveCountersSourceCost(CounterType.DEPLETION.createInstance(1)));
        ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new SourceHasCounterCondition(CounterType.DEPLETION, 0,0), "If there are no depletion counters on Hickory Woodlot, sacrifice it"));
        this.addAbility(ability);
    }
View Full Code Here

        this.addAbility(new EntersBattlefieldTappedAbility());
        this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance(2))));
        // {tap}, Remove a depletion counter from Sandstone Needle: Add {R}{R} to your mana pool. If there are no depletion counters on Sandstone Needle, sacrifice it.
        Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(2), new TapSourceCost());
        ability.addCost(new RemoveCountersSourceCost(CounterType.DEPLETION.createInstance(1)));
        ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new SourceHasCounterCondition(CounterType.DEPLETION, 0,0), "If there are no depletion counters on Sandstone Needle, sacrifice it"));
        this.addAbility(ability);
    }
View Full Code Here

        this.expansionSetCode = "KTK";

        this.color.setRed(true);

        // Bring Low deals 3 damage to target creature. If that creature has a +1/+1 counter on it, Bring Low deals 5 damage to it instead.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new DamageTargetEffect(5),
                new DamageTargetEffect(3),
                new TargetHasCounterCondition(CounterType.P1P1),
                "{this} deals 3 damage to target creature. If that creature has a +1/+1 counter on it, Bring Low deals 5 damage to it instead"));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
View Full Code Here

        this.expansionSetCode = "KTK";

        this.color.setRed(true);

        // Arrow Storm deals 4 damage to target creature or player.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new DamageTargetEffect(4),
                new InvertCondition(RaidCondition.getInstance()),
                "{this} deals 4 damage to target creature or player"));
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
        // Raid - If you attacked with a creature this turn, instead Arrow Storm deals 5 damage to that creature or player and the damage can't be prevented.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new DamageTargetEffect(5, false),
                RaidCondition.getInstance(),
                "<br/><br/><i>Raid</i> - If you attacked with a creature this turn, instead {this} deals 5 damage to that creature or player and the damage can't be prevented"));
        this.addWatcher(new PlayerAttackedWatcher());
    }
View Full Code Here

        super(ownerId, 249, "Woodland Cemetery", Rarity.RARE, new CardType[]{CardType.LAND}, null);
        this.expansionSetCode = "ISD";

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

        Effect effect = new CreateDelayedTriggeredAbilityEffect(new HowlOfTheHordeDelayedTriggeredAbility());
        effect.setText("When you cast your next instant or sorcery spell this turn, copy that spell. You may choose new targets for the copy.");
        this.getSpellAbility().addEffect(effect);
       
        // <i>Raid</i> - If you attacked with a creature this turn, when you cast your next instant or sorcery spell this turn, copy that spell an additional time. You may choose new targets for the copy.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new CreateDelayedTriggeredAbilityEffect(new HowlOfTheHordeDelayedTriggeredAbility()), RaidCondition.getInstance(), "<br><br><i>Raid</i> - If you attacked with a creature this turn, when you cast your next instant or sorcery spell this turn, copy that spell an additional time. You may choose new targets for the copy."));
        this.addWatcher(new PlayerAttackedWatcher());
    }
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.