Package mage.abilities.decorator

Examples of mage.abilities.decorator.ConditionalOneShotEffect


        super(ownerId, 224, "Blackcleave Cliffs", Rarity.RARE, new CardType[]{CardType.LAND}, null);
        this.expansionSetCode = "SOM";

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


        // {2}{G}, {T}: Put a 1/1 green Snake creature token onto the battlefield. If you control ten or more creatures, flip Orochi Eggwatcher.
        Ability ability;
        ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SnakeToken()),new ManaCostsImpl("{2}{G}"));
        ability.addCost(new TapSourceCost());
        ability.addEffect(new ConditionalOneShotEffect(new FlipSourceEffect(new ShidakoBroodmistress()),
                new PermanentsOnTheBattlefieldCondition(new FilterControlledCreaturePermanent(),PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 9),"If you control ten or more creatures, flip {this}"));
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setBlack(true);

        // Reveal a card from your hand. Search your library for a card with the same name as that card, reveal it, put it into your hand, then shuffle your library.
        this.getSpellAbility().addEffect(new InfernalTutorEffect());
        // Hellbent - If you have no cards in hand, instead search your library for a card, put it into your hand, then shuffle your library.
        Effect effect = new ConditionalOneShotEffect(
                new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterCard()), false, true),
                HellbentCondition.getInstance(),
                "<br/><br/><i>Hellbent</i> - If you have no cards in hand, instead search your library for a card, put it into your hand, then shuffle your library");
        this.getSpellAbility().addEffect(effect);
       
View Full Code Here

        this.color.setWhite(true);

        // Put two 1/1 white Human creature tokens onto the battlefield.
        // Fateful hour - If you have 5 or less life, put five of those tokens onto the battlefield instead.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new CreateTokenEffect(new HumanToken(), 5), new CreateTokenEffect(new HumanToken(), 2),
                FatefulHourCondition.getInstance(), "Put two 1/1 white Human creature tokens onto the battlefield. If you have 5 or less life, put five of those tokens onto the battlefield instead"));
    }
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 Nylea.
        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 Nylea, search your library for up to two basic land cards, put them onto the battlefield tapped, then shuffle your library.
        ability = new SacrificeSourceTriggeredAbility(
                new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0,2, new FilterBasicLandCard()),true, true),false);
View Full Code Here

        // Flying
        this.addAbility(FlyingAbility.getInstance());

        // When Dream Thief enters the battlefield, draw a card if you've cast another blue spell this turn.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), new CastBlueSpellThisTurnCondition(), rule)));
        this.addWatcher(new DreamThiefWatcher(this.getId()));
       
    }
View Full Code Here

        // Rekindled Flame deals 4 damage to target creature or player.
        this.getSpellAbility().addEffect(new DamageTargetEffect(4));
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
       
        // At the beginning of your upkeep, if an opponent has no cards in hand, you may return Rekindled Flame from your graveyard to your hand.
        Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, new ConditionalOneShotEffect(new ReturnSourceFromGraveyardToHandEffect(), new OpponentHasNoCardsInHandCondition(), rule), TargetController.YOU, true);
        ability.setRuleVisible(true);
        this.addAbility(ability);
       
    }
View Full Code Here

        super(ownerId, 228, "Sunpetal Grove", 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 Forest or a Plains";
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
        this.addAbility(new GreenManaAbility());
        this.addAbility(new WhiteManaAbility());
    }
View Full Code Here

        this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.MINING.createInstance(3))));

        // {tap}, Remove a mining counter from Gemstone Mine: Add one mana of any color to your mana pool. If there are no mining counters on Gemstone Mine, sacrifice it.
        Ability ability = new AnyColorManaAbility();
        ability.addCost(new RemoveCountersSourceCost(CounterType.MINING.createInstance(1)));
        ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new SourceHasCounterCondition(CounterType.MINING, 0,0), "If there are no mining counters on Gemstone Mine, sacrifice it"));
        this.addAbility(ability);
    }
View Full Code Here

}

class RayneAcademyChancellorTriggeredAbility extends TriggeredAbilityImpl {
   
    RayneAcademyChancellorTriggeredAbility() {
        super(Zone.BATTLEFIELD, new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(2), new DrawCardSourceControllerEffect(1), new EnchantedCondition(), "you may draw a card. You may draw an additional card if {this} is enchanted."), true);
    }
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.