Package mage.game.permanent

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


    @Override
    public boolean applies(Permanent permanent, Ability source, Game game) {
        if (permanent.getId().equals(source.getFirstTarget())) {
            Permanent blocker = game.getPermanent(source.getFirstTarget());
            if (blocker != null && blocker.canBlock(source.getSourceId(), game)) {             
                Permanent attacker = game.getPermanent(source.getSourceId());
                if (attacker != null) {
                    BlockedAttackerWatcher blockedAttackerWatcher = (BlockedAttackerWatcher) game.getState().getWatchers().get("BlockedAttackerWatcher");
                    if (blockedAttackerWatcher != null && blockedAttackerWatcher.creatureHasBlockedAttacker(attacker, blocker)) {
                        // has already blocked this turn, so no need to do again
View Full Code Here


    public boolean applies(Permanent permanent, Ability source, Game game) {
        if (permanent.getId().equals(targetPointer.getFirst(game, source))) {
            Permanent blocker = game.getPermanent(source.getFirstTarget());
            if (blocker != null && blocker.isTapped()) {
                blocker.untap(game);
                if (blocker.canBlock(source.getSourceId(), game)) {
                    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.