Package mage.abilities.decorator

Examples of mage.abilities.decorator.ConditionalRestrictionEffect


        this.color.setBlue(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        //Neurok Spy is unblockable as long as defending player controls an artifact.
        Effect effect = new ConditionalRestrictionEffect(
                new UnblockableSourceEffect(),
                new DefendingPlayerControlsCondition(new FilterArtifactPermanent()));
        effect.setText("{this} is unblockable as long as defending player controls an artifact");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here


        SimpleStaticAbility whiteAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostEnchantedEffect(1, 1), new EnchantedCreatureColorCondition(ObjectColor.WHITE), "As long as enchanted creature is white, it gets +1/+1"));
        whiteAbility.addEffect(new ConditionalContinousEffect(new GainAbilityAttachedEffect(LifelinkAbility.getInstance(), AttachmentType.AURA), new EnchantedCreatureColorCondition(ObjectColor.WHITE), "and has lifelink"));
        this.addAbility(whiteAbility);
        // As long as enchanted creature is blue, it gets +1/+1 and is unblockable.
        SimpleStaticAbility blueAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostEnchantedEffect(1, 1), new EnchantedCreatureColorCondition(ObjectColor.BLUE), "As long as enchanted creature is blue, it gets +1/+1"));
        Effect effect = new ConditionalRestrictionEffect(new UnblockableAttachedEffect(AttachmentType.AURA), new EnchantedCreatureColorCondition(ObjectColor.BLUE));
        effect.setText("and is unblockable");
        blueAbility.addEffect(effect);
        this.addAbility(blueAbility);
    }
View Full Code Here

        this.color.setGreen(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // Each creature you control is unblockable as long as defending player controls an artifact land.
        Effect effect = new ConditionalRestrictionEffect(
                new UnblockableAllEffect(new FilterControlledCreaturePermanent("Creatures you control"), Duration.WhileOnBattlefield),
                new DefendingPlayerControlsCondition(filter));
        effect.setText("Each creature you control is unblockable as long as defending player controls an artifact land");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);

        // Enchanted creature gets +2/+2 as long as it's a Human. Otherwise, it can't attack or block.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostEquippedEffect(2, 2), new EquippedHasSubtypeCondition("Human"), rule)));
        Effect effect = new ConditionalRestrictionEffect(new CantAttackBlockAttachedEffect(AttachmentType.AURA), new InvertCondition(new EquippedHasSubtypeCondition("Human")));
        effect.setText("Otherwise, it can't attack or block");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

        this.color.setBlue(true);
        this.power = new MageInt(5);
        this.toughness = new MageInt(5);

        // Scrapdiver Serpent is unblockable as long as defending player controls an artifact
        Effect effect = new ConditionalRestrictionEffect(
                new UnblockableSourceEffect(),
                new DefendingPlayerControlsCondition(new FilterArtifactPermanent()));
        effect.setText("{this} is unblockable as long as defending player controls an artifact");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // Whenever Medomai the Ageless deals combat damage to a player, take an extra turn after this one.
        this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddExtraTurnControllerEffect(), false));
        // Medomai the Ageless can't attack during extra turns.
        Effect effect = new ConditionalRestrictionEffect(new CantAttackAllSourceEffect(Duration.WhileOnBattlefield), ExtraTurnCondition.getInstance());
        effect.setText("{this} can't attack during extra turns");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

                    new ConditionalContinousEffect(
                    new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
                    new CardsInControllerGraveCondition(7),
                    "<i>Threshold</i> - If seven or more cards are in your graveyard, Dirty Wererat gets +2/+2 and can't block"
                ));
        Effect effect = new ConditionalRestrictionEffect(
                    new CantBlockSourceEffect(Duration.WhileOnBattlefield),
                    new CardsInControllerGraveCondition(7));
        effect.setText("and can't block");
        thresholdAbility.addEffect(effect);
        this.addAbility(thresholdAbility);
    }
View Full Code Here

        this.color.setBlue(true);
        this.power = new MageInt(3);
        this.toughness = new MageInt(3);

        // Bubbling Beebles is unblockable as long as defending player controls an enchantment.
        Effect effect = new ConditionalRestrictionEffect(
                new UnblockableSourceEffect(),
                new DefendingPlayerControlsCondition(filter));
        effect.setText("{this} is unblockable as long as defending player controls an enchantment");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

        this.color.setBlue(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        //Bouncing Beebles is unblockable as long as defending player controls an artifact.
        Effect effect = new ConditionalRestrictionEffect(
                new UnblockableSourceEffect(),
                new DefendingPlayerControlsCondition(new FilterArtifactPermanent()));
        effect.setText("{this} is unblockable as long as defending player controls an artifact");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

        // Enchanted creature gets +2/+2.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield)));

        // Enchanted creature is unblockable as long as you control a Gate.
        Effect effect = new ConditionalRestrictionEffect(new UnblockableAttachedEffect(AttachmentType.AURA), new PermanentsOnTheBattlefieldCondition(filter));
        effect.setText(rule);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

TOP

Related Classes of mage.abilities.decorator.ConditionalRestrictionEffect

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.