[RIX] Added Deeproot Elite

This commit is contained in:
Oleg Agafonov 2018-01-04 05:44:12 +04:00
parent a37cd4036c
commit 6b9db5eb17
4 changed files with 97 additions and 5 deletions

View file

@ -0,0 +1,86 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.d;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
/**
*
* @author JayDi85
*/
public class DeeprootElite extends CardImpl {
private static final FilterPermanent filterYourAnotherMerfolk = new FilterPermanent(SubType.MERFOLK, "another " + SubType.MERFOLK.toString());
static {
filterYourAnotherMerfolk.add(new AnotherPredicate());
filterYourAnotherMerfolk.add(new ControllerPredicate(TargetController.YOU));
}
private static final FilterControlledCreaturePermanent filterYourAnyMerfolk = new FilterControlledCreaturePermanent(SubType.MERFOLK);
static {
filterYourAnyMerfolk.add(new ControllerPredicate(TargetController.YOU));
}
public DeeprootElite(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.MERFOLK);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Whenever another Merfolk enters the battlefield under your control, put a +1/+1 counter on target Merfolk you control.
Ability ability = new EntersBattlefieldControlledTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), filterYourAnotherMerfolk);
ability.addTarget(new TargetControlledCreaturePermanent(filterYourAnyMerfolk));
this.addAbility(ability);
}
public DeeprootElite(final DeeprootElite card) {
super(card);
}
@Override
public DeeprootElite copy() {
return new DeeprootElite(this);
}
}

View file

@ -52,7 +52,7 @@ import mage.target.common.TargetCardInLibrary;
*/
public class ForerunnerOfTheHeralds extends CardImpl {
private static final FilterPermanent filterAnotherMerfolk = new FilterPermanent(SubType.MERFOLK, SubType.MERFOLK.toString());
private static final FilterPermanent filterAnotherMerfolk = new FilterPermanent(SubType.MERFOLK, "another " + SubType.MERFOLK.toString());
static {
filterAnotherMerfolk.add(new AnotherPredicate());
filterAnotherMerfolk.add(new ControllerPredicate(TargetController.YOU));

View file

@ -63,6 +63,7 @@ public class RivalsOfIxalan extends ExpansionSet {
cards.add(new SetCardInfo("Buffling End", 1, Rarity.UNCOMMON, mage.cards.m.BafflingEnd.class));
cards.add(new SetCardInfo("Captain's Hook", 177, Rarity.RARE, mage.cards.c.CaptainsHook.class));
cards.add(new SetCardInfo("Cinder Barrens", 205, Rarity.RARE, mage.cards.c.CinderBarrens.class));
cards.add(new SetCardInfo("Deeproot Elite", 127, Rarity.RARE, mage.cards.d.DeeprootElite.class));
cards.add(new SetCardInfo("Dusk Charger", 69, Rarity.COMMON, mage.cards.d.DuskCharger.class));
cards.add(new SetCardInfo("Elenda, the Dusk Rose", 157, Rarity.MYTHIC, mage.cards.e.ElendaTheDuskRose.class));
cards.add(new SetCardInfo("Evolving Wilds", 186, Rarity.RARE, mage.cards.e.EvolvingWilds.class));

View file

@ -43,15 +43,20 @@ public class FilterControlledCreaturePermanent extends FilterControlledPermanent
}
public FilterControlledCreaturePermanent(String name) {
super(name);
this.add(new CardTypePredicate(CardType.CREATURE));
// this.add(new ControllerPredicate(TargetController.YOU));
this(null, name);
}
public FilterControlledCreaturePermanent(SubType subtype) {
this(subtype, subtype.toString() + " you control");
}
public FilterControlledCreaturePermanent(SubType subtype, String name) {
super(name);
this.add(new CardTypePredicate(CardType.CREATURE));
this.add(new SubtypePredicate(subtype));
if(subtype != null) {
this.add(new SubtypePredicate(subtype));
}
}
public FilterControlledCreaturePermanent(final FilterControlledCreaturePermanent filter) {