Package mage.target.common

Examples of mage.target.common.TargetArtifactPermanent.canChoose()


    @Override
    public boolean apply(Game game, Ability source) {
        TargetArtifactPermanent target = new TargetArtifactPermanent();
        Player you = game.getPlayer(source.getControllerId());
        if (you != null) {
            if (target.canChoose(source.getControllerId(), game) && target.choose(Outcome.DestroyPermanent, source.getControllerId(), source.getSourceId(), game)) {
                Permanent targetedArtifact = game.getPermanent(target.getFirstTarget());
                if (targetedArtifact != null) {
                    Card artifact = game.getCard(targetedArtifact.getId());
                    Player controller = game.getPlayer(targetedArtifact.getControllerId());
                    targetedArtifact.destroy(id, game, true);
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.