[MH2] Implemented Duskshell Crawler (#7879)

* [MH2] Implemented Duskshell Crawler

* [MH2] Duskshell Crawler - Fixed predicate
This commit is contained in:
Daniel Bomar 2021-06-03 19:12:48 -05:00 committed by GitHub
parent 1c6f8ae035
commit cdca453738
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,59 @@
package mage.cards.d;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author weirddan455
*/
public final class DuskshellCrawler extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
static {
filter.add(CounterType.P1P1.getPredicate());
}
public DuskshellCrawler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.INSECT);
this.power = new MageInt(0);
this.toughness = new MageInt(3);
// When Duskshell Crawler enters the battlefield, put a +1/+1 counter on target creature.
Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
// Each creature you control with a +1/+1 counter on it has trample.
this.addAbility(new SimpleStaticAbility(
new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, filter)
.setText("Each creature you control with a +1/+1 counter on it has trample")
));
}
private DuskshellCrawler(final DuskshellCrawler card) {
super(card);
}
@Override
public DuskshellCrawler copy() {
return new DuskshellCrawler(this);
}
}

View file

@ -90,6 +90,7 @@ public final class ModernHorizons2 extends ExpansionSet {
cards.add(new SetCardInfo("Dress Down", 39, Rarity.RARE, mage.cards.d.DressDown.class));
cards.add(new SetCardInfo("Drey Keeper", 194, Rarity.COMMON, mage.cards.d.DreyKeeper.class));
cards.add(new SetCardInfo("Drossforge Bridge", 246, Rarity.COMMON, mage.cards.d.DrossforgeBridge.class));
cards.add(new SetCardInfo("Duskshell Crawler", 156, Rarity.COMMON, mage.cards.d.DuskshellCrawler.class));
cards.add(new SetCardInfo("Echoing Return", 83, Rarity.COMMON, mage.cards.e.EchoingReturn.class));
cards.add(new SetCardInfo("Enchantress's Presence", 283, Rarity.RARE, mage.cards.e.EnchantresssPresence.class));
cards.add(new SetCardInfo("Endurance", 157, Rarity.MYTHIC, mage.cards.e.Endurance.class));