Examples of ConditionalReplacementEffect


Examples of mage.abilities.decorator.ConditionalReplacementEffect

        ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(
                new GainAbilityAttachedEffect(DoubleStrikeAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield),
                condition, "Enchanted creature has double strike as long as it's an enchantment"));
        ReplacementEffect effect = new PreventAllDamageByAttachedEffect(Duration.WhileOnBattlefield, "enchanted creature", false);
        effect.setText("Otherwise, prevent all damage that would be dealt by enchanted creature");
        ability.addEffect(new ConditionalReplacementEffect(effect, new InvertCondition(condition)));
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.abilities.decorator.ConditionalReplacementEffect

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

        // Prevent all combat damage that would be dealt this turn if {W} was spent to cast Batwing Brume. Each player loses 1 life for each attacking creature he or she controls if {B} was spent to cast Batwing Brume.
        Effect effect = new ConditionalReplacementEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true),
                new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.W)));
        effect.setText("Prevent all combat damage that would be dealt this turn if {W} was spent to cast {this}");
        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>");
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.