Package mage.watchers.common

Examples of mage.watchers.common.ManaSpentToCastWatcher


    @Override
    public boolean apply(Game game, Ability source) {
        if (source.getAbilityType().equals(AbilityType.SPELL)) {
            return (source.getManaCostsToPay().getPayment().getColor(coloredManaSymbol) > 0);
        }
        ManaSpentToCastWatcher watcher = (ManaSpentToCastWatcher) game.getState().getWatchers().get("ManaSpentToCast", source.getSourceId());
        if (watcher != null) {
            Mana payment = watcher.getAndResetLastPayment();
            if (payment != null) {
                return payment.getColor(coloredManaSymbol) > 0;
            }
        }
        return false;
View Full Code Here


                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

                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

        this.getSpellAbility().addEffect(new ConditionalContinuousRuleModifyingEffect(
                effect2,
                new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.W))));
        this.getSpellAbility().addTarget(new TargetPlayer());
        this.addInfo("Info1", "<i>(Do both if {R}{W} was spent.)</i>");
        this.addWatcher(new ManaSpentToCastWatcher());
    }
View Full Code Here

        this.getSpellAbility().addEffect(effect);
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new BatwingBrumeEffect(),
                new ManaWasSpentCondition(ColoredManaSymbol.B), "Each player loses 1 life for each attacking creature he or she controls if {B} was spent to cast {this}"));
        this.addInfo("Info1", "<i>(Do both if {W}{B} was spent.)<i>");
        this.addWatcher(new ManaSpentToCastWatcher());

    }
View Full Code Here

        // When Patagia Viper enters the battlefield, put two 1/1 green and blue Snake creature tokens onto the battlefield.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new PatagiaViperSnakeToken(), 2), false));
       
        // When Patagia Viper enters the battlefield, sacrifice it unless {U} was spent to cast it.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.U)), false));
        this.addWatcher(new ManaSpentToCastWatcher());
    }
View Full Code Here

        this.addAbility(new UnblockableAbility());
        // When Azorius Herald enters the battlefield, you gain 4 life.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(4)));
        // When Azorius Herald enters the battlefield, sacrifice it unless {U} was spent to cast it.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.U)), false));
        this.addWatcher(new ManaSpentToCastWatcher());       
    }
View Full Code Here

                new BoostTargetEffect(3, 3, Duration.EndOfTurn),
                new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.G)),
                "If {G} was spent to cast {this}, you may have target creature get +3/+3 until end of turn"));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.addInfo("Info1", "<i>(Do both if {B}{G} was spent.)<i>");
        this.addWatcher(new ManaSpentToCastWatcher());
    }
View Full Code Here

        // When Crypt Champion enters the battlefield, each player puts a creature card with converted mana cost 3 or less from his or her graveyard onto the battlefield.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new CryptChampionEffect()));
       
        // When Crypt Champion enters the battlefield, sacrifice it unless {R} was spent to cast it.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.R)), false));
        this.addWatcher(new ManaSpentToCastWatcher());
    }
View Full Code Here

        this.addAbility(new EntersBattlefieldTriggeredAbility(
                new LookLibraryAndPickControllerEffect(new StaticValue(3), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false),
                false));
        // When Court Hussar enters the battlefield, sacrifice it unless {W} was spent to cast it.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.W)), false));
        this.addWatcher(new ManaSpentToCastWatcher());
    }
View Full Code Here

TOP

Related Classes of mage.watchers.common.ManaSpentToCastWatcher

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.