Package mage.filter.predicate.mageobject

Examples of mage.filter.predicate.mageobject.NamePredicate


    @Override
    public boolean apply(Game game, Ability source) {
        Permanent targetPermanent = game.getPermanent(targetPointer.getFirst(game, source));
        if (targetPermanent != null) {
            FilterCreaturePermanent filter = new FilterCreaturePermanent();
            filter.add(new NamePredicate(targetPermanent.getName()));
            List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game);
            for (Permanent permanent : permanents) {
                permanent.damage(1, source.getSourceId(), game, false, true);
            }
            return true;
View Full Code Here


    @Override
    public boolean apply(Game game, Ability source) {
        Permanent targetPermanent = game.getPermanent(targetPointer.getFirst(game, source));
        if (targetPermanent != null) {
            FilterCreaturePermanent filter = new FilterCreaturePermanent();
            filter.add(new NamePredicate(targetPermanent.getName()));
            ContinuousEffect effect = new BoostAllEffect(2,2, Duration.EndOfTurn, filter, false);
            game.addEffect(effect, source);
            return true;
        }
        return false;
View Full Code Here

     * @param cardName  Name of the cards that should be counted.
     * @param count    Expected count.
     */
    public void assertHandCount(Player player, String cardName, int count) throws AssertionError {
        FilterCard filter = new FilterCard();
        filter.add(new NamePredicate(cardName));
        int actual = currentGame.getPlayer(player.getId()).getHand().count(filter, player.getId(), currentGame);
        Assert.assertEquals("(Hand) Card counts for card " + cardName + " are not equal ", count, actual);
    }
View Full Code Here

TOP

Related Classes of mage.filter.predicate.mageobject.NamePredicate

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.