Package mage.game.permanent

Examples of mage.game.permanent.Permanent.destroy()


            }
        } else if (targetPointer.getTargets(game, source).size() > 0) {
            for (UUID permanentId : targetPointer.getTargets(game, source)) {
                Permanent permanent = game.getPermanent(permanentId);
                if (permanent != null && permanent.getToughness().getValue() <= game.getPlayer(source.getControllerId()).getGraveyard().size()) {
                    permanent.destroy(source.getSourceId(), game, noRegen);
                    affectedTargets++;
                }
            }
        }
        return affectedTargets > 0;
View Full Code Here


    @Override
    public boolean apply(Game game, Ability source) {
        for (UUID targetId: source.getTargets().get(0).getTargets()) {
            Permanent perm = game.getPermanent(targetId);
            if (perm != null) {
                perm.destroy(source.getSourceId(), game, false);
            }
        }
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            for (UUID targetId: source.getTargets().get(0).getTargets()) {
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getTargets().getFirstTarget());
        if (permanent != null && permanent.getColor().isBlue()) {
            permanent.destroy(source.getSourceId(), game, false);
        }
        return true;
    }

    @Override
View Full Code Here

                minPower = creature.getPower().getValue();
            }
        }

        if (targetCreature != null && targetCreature.getPower().getValue() <= minPower) {
            targetCreature.destroy(source.getSourceId(), game, false);
            return true;
        }
        return false;
    }
}
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent p = game.getPermanent(targetPointer.getFirst(game, source));
        if (p != null && p.isTapped()) {
            p.destroy(source.getSourceId(), game, false);
        }
        return false;
    }

    @Override
View Full Code Here

            Permanent creature = game.getPermanent(uuid);
            if (creature == null) {
                creature = game.getPermanent(enchantment.getAttachedTo());
            }
            if (creature != null) {
                return creature.destroy(source.getSourceId(), game, false);
            }
        }
        return false;
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent target = game.getPermanent(targetPointer.getFirst(game, source));
        if (target != null) {
            ObjectColor color = target.getColor();
            target.destroy(source.getSourceId(), game, false);
            for (Permanent p : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
                if (p.getColor().shares(color)) {
                    p.destroy(source.getSourceId(), game, false);
                }
            }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        boolean applied = false;
        Permanent permanent = game.getPermanent(source.getFirstTarget());
        if (permanent != null) {
            permanent.destroy(source.getSourceId(), game, false);
            applied = true;
        }
        Player player = game.getPlayer(source.getControllerId());
        Card card = game.getCard(source.getSourceId());
        if (card != null && player != null) {
View Full Code Here

        if (targetPointer.getTargets(game, source).size() > 0) {
            for (UUID permanentId : targetPointer.getTargets(game, source)) {
                Permanent permanent = game.getPermanent(permanentId);
                if (permanent != null) {
                    Player controller = game.getPlayer(permanent.getControllerId());
                    permanent.destroy(source.getSourceId(), game, false);
                    if (controller != null) {
                        Token spirit = new SpiritWhiteToken("AVR", 1);
                        spirit.putOntoBattlefield(1, game, source.getSourceId(), controller.getId());
                    }
                    affectedTargets++;
View Full Code Here

                cost.clearPaid();
                if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) {
                    return true;
                }
            }
            permanent.destroy(source.getSourceId(), game, false);
            return true;
        }
        return false;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.