Examples of ConditionalOneShotEffect


Examples of mage.abilities.decorator.ConditionalOneShotEffect

        this.color.setBlue(true);

        // Counter target spell.  If you control a blue creature, draw a card, then discard a card.
        this.getSpellAbility().addEffect(new CounterTargetEffect());
        this.getSpellAbility().addTarget(new TargetSpell());
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new DrawDiscardControllerEffect(1,1),
                new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0, true),
                "If you control a blue creature, draw a card, then discard a card"));
    }
View Full Code Here

Examples of mage.abilities.decorator.ConditionalOneShotEffect

        this.toughness = new MageInt(4);

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // When Resolute Angel enters the battlefield, if your life total is lower than your starting life total, it becomes equal to your starting life total.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new ResoluteArchangelEffect(), ControllerLifeLowerThanStrtingLife.getInstance(),
                "if your life total is lower than your starting life total, it becomes equal to your starting life total")));
    }
View Full Code Here

Examples of mage.abilities.decorator.ConditionalOneShotEffect

        super(ownerId, 242, "Isolated Chapel", Rarity.RARE, new CardType[]{CardType.LAND}, null);
        this.expansionSetCode = "ISD";

        Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0));
        String abilityText = "tap it unless you control a Plains or a Swamp";
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
        this.addAbility(new WhiteManaAbility());
        this.addAbility(new BlackManaAbility());
    }
View Full Code Here

Examples of mage.abilities.decorator.ConditionalOneShotEffect

        super(ownerId, 248, "Sulfur Falls", Rarity.RARE, new CardType[]{CardType.LAND}, null);
        this.expansionSetCode = "ISD";

        Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0));
        String abilityText = "tap it unless you control a Island or a Mountain";
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
        this.addAbility(new BlueManaAbility());
        this.addAbility(new RedManaAbility());
    }
View Full Code Here

Examples of mage.abilities.decorator.ConditionalOneShotEffect

        // Return target creature to its owner's hand.
        this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());

        // <i>Ferocious</i> - If you control a creature with power 4 or greater, you may draw a card. If you do, discard a card.
        Effect effect = new ConditionalOneShotEffect(new DrawDiscardControllerEffect(1,1, true),
                FerociousCondition.getInstance() , "<br/><br/><i>Ferocious</i> - If you control a creature with power 4 or greater, you may draw a card. If you do, discard a card");
        this.getSpellAbility().addEffect(effect);
    }
View Full Code Here

Examples of mage.abilities.decorator.ConditionalOneShotEffect

        this.color.setGreen(true);

        // Put two 2/2 green Bear creature tokens onto the battlefield.
        // Threshold - Put four 2/2 green Bear creature tokens onto the battlefield instead if seven or more cards are in your graveyard.
        Effect effect = new ConditionalOneShotEffect(new CreateTokenEffect(new BearToken(), 4),
                                                     new CreateTokenEffect(new BearToken(), 2),
                                                     new CardsInControllerGraveCondition(7),
                                                     "Put two 2/2 green Bear creature tokens onto the battlefield.<br/><br/><i>Threshold</i> - Put four 2/2 green Bear creature tokens onto the battlefield instead if seven or more cards are in your graveyard.");
        this.getSpellAbility().addEffect(effect);
        // Flashback {5}{G}{G}
View Full Code Here

Examples of mage.abilities.decorator.ConditionalOneShotEffect

        this.color.setGreen(true);
        this.color.setWhite(true);

        // You gain X life if {G} was spent to cast Dawnglow Infusion and X life if {W} was spent to cast it.
        DynamicValue xValue = new ManacostVariableValue();
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new GainLifeEffect(xValue),
                new ManaWasSpentCondition(ColoredManaSymbol.G), "You gain X life if {G} was spent to cast {this}"));
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new GainLifeEffect(xValue),
                new ManaWasSpentCondition(ColoredManaSymbol.W), " And X life if {W} was spent to cast it"));
        this.addInfo("Info1", "<i>(Do both if {G}{W} was spent.)</i>");
        this.addWatcher(new ManaSpentToCastWatcher());
View Full Code Here

Examples of mage.abilities.decorator.ConditionalOneShotEffect

        this.expansionSetCode = "AVR";

        // {1}, Sacrifice Scroll of Griselbrand: Target opponent discards a card. If you control a Demon, that player loses 3 life.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1), new GenericManaCost(1));
        ability.addCost(new SacrificeSourceCost());
        ability.addEffect(new ConditionalOneShotEffect(new LoseLifeTargetEffect(3), new PermanentsOnTheBattlefieldCondition(filter), "If you control a Demon, that player loses 3 life"));
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.abilities.decorator.ConditionalOneShotEffect

        this.color.setRed(true);
        this.color.setGreen(true);

        // Firespout deals 3 damage to each creature without flying if {R} was spent to cast Firespout and 3 damage to each creature with flying if {G} was spent to cast it.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new DamageAllEffect(3, filter1),
                new ManaWasSpentCondition(ColoredManaSymbol.R), "{this} deals 3 damage to each creature without flying if {R} was spent to cast {this}"));
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new DamageAllEffect(3, filter2),
                new ManaWasSpentCondition(ColoredManaSymbol.G), " And 3 damage to each creature with flying if {G} was spent to cast it"));
        this.addInfo("Info1", "<i>(Do both if {R}{G} was spent.)</i>");
        this.addWatcher(new ManaSpentToCastWatcher());
View Full Code Here

Examples of mage.abilities.decorator.ConditionalOneShotEffect

        super(ownerId, 241, "Hinterland Harbor", Rarity.RARE, new CardType[]{CardType.LAND}, null);
        this.expansionSetCode = "ISD";

        Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0));
        String abilityText = "tapped unless you control a Forest or an Island";
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
        this.addAbility(new GreenManaAbility());
        this.addAbility(new BlueManaAbility());
    }
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.