Package mage.abilities.decorator

Examples of mage.abilities.decorator.ConditionalTriggeredAbility


        this.toughness = new MageInt(3);

        // At the beginning of each upkeep, if no spells were cast last turn, transform Villagers of Estwald.
        this.addAbility(new TransformAbility());
        TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false);
        this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.getInstance(), TransformAbility.NO_SPELLS_TRANSFORM_RULE));
    }
View Full Code Here


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

        // <i>Raid</i> - When Timely Hordemate enters the battlefield, if you attacked this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.
        Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()), RaidCondition.getInstance(),
                 "<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.", false);
        ability.addTarget(new TargetCardInYourGraveyard(filter));
        this.addAbility(ability);
        this.addWatcher(new PlayerAttackedWatcher());

    }
View Full Code Here

        this.addAbility(IntimidateAbility.getInstance());

        // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Gatstaf Howler.
        TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false);
        this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.getInstance(), TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE));
    }
View Full Code Here

        // At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature.
        TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(new SacrificeTargetEffect(), TargetController.YOU, false);
        target = new TargetControlledCreaturePermanent();
        target.setNotTarget(false);
        triggeredAbility.addTarget(target);
        this.addAbility(new ConditionalTriggeredAbility(
                triggeredAbility,
                new InvertCondition(new CreatureCardsInControllerGraveCondition(6)),
                "At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature"));

    }
View Full Code Here

        // Prowl {2}{B}
        this.addAbility(new ProwlAbility(this, "{2}{B}"));
        // When Earwig Squad enters the battlefield, if its prowl cost was paid, search target opponent's library for three cards and exile them. Then that player shuffles his or her library.
        EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new EarwigSquadEffect(), false);
        ability.addTarget(new TargetOpponent());
        this.addAbility(new ConditionalTriggeredAbility(ability, ProwlCondition.getInstance(),
                "When {this} enters the battlefield, if its prowl cost was paid, search target opponent's library for three cards and exile them. Then that player shuffles his or her library."));

    }
View Full Code Here

        Effect effect = new BlowflyInfestationEffect();
        TriggeredAbility triggeredAbility = new DiesCreatureTriggeredAbility(effect, false, false, true);
        triggeredAbility.addTarget(new TargetCreaturePermanent());
        Condition condition = new BlowflyInfestationCondition();
        this.addAbility(new ConditionalTriggeredAbility(triggeredAbility, condition, rule));

    }
View Full Code Here

        // Each Werewolf you control can't be blocked except by two or more creatures.
        Effect effect = new ConditionalContinousEffect(new CantBeBlockedByOneAllEffect(2, filter), new TransformedCondition(), ruleText);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
        // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Terror of Kruin Pass.
        TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false);
        this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.getInstance(), TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE));
    }
View Full Code Here

        this.expansionSetCode = "M15";

        this.color.setBlack(true);

        // At the beginning of each upkeep, if an opponent lost life last turn, put a +1/+1 counter on target creature you control.
        Ability ability = new ConditionalTriggeredAbility(
                new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
                        new AddCountersTargetEffect(CounterType.P1P1.createInstance()),
                        TargetController.ANY, false),
                FeastOnTheFallenCondition.getInstance(),
                "At the beginning of each upkeep, if an opponent lost life last turn, put a +1/+1 counter on target creature you control.");
        ability.addTarget(new TargetControlledCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

        this.toughness = new MageInt(1);

        // At the beginning of each upkeep, if no spells were cast last turn, transform Reckless Waif.
        this.addAbility(new TransformAbility());
        TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false);
        this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.getInstance(), TransformAbility.NO_SPELLS_TRANSFORM_RULE));
    }
View Full Code Here

        Ability enchantAbility = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(enchantAbility);       
        // When Animate Dead enters the battlefield, if it's on the battlefield, it loses "enchant creature card in a graveyard"
        // and gains "enchant creature put onto the battlefield with Animate Dead." Return enchanted creature card to the battlefield
        // under your control and attach Animate Dead to it. When Animate Dead leaves the battlefield, that creature's controller sacrifices it.
        Ability ability = new ConditionalTriggeredAbility(
                new EntersBattlefieldTriggeredAbility(new AnimateDeadReAttachEffect(), false),
                SourceOnBattelfieldCondition.getInstance(),
                "When {this} enters the battlefield, if it's on the battlefield, it loses \"enchant creature card in a graveyard\" and gains \"enchant creature put onto the battlefield with {this}.\" Return enchanted creature card to the battlefield under your control and attach {this} to it.");
        ability.addEffect(new AnimateDeadChangeAbilityEffect());
        this.addAbility(ability);
        this.addAbility(new LeavesBattlefieldTriggeredAbility(new AnimateDeadLeavesBattlefieldTriggeredEffect(), false));       
       
        // Enchanted creature gets -1/-0.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-1, 0, Duration.WhileOnBattlefield)));
View Full Code Here

TOP

Related Classes of mage.abilities.decorator.ConditionalTriggeredAbility

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.