From 346de3142df75752ef91a831fcb653800b7a07a9 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 8 Sep 2020 11:35:32 -0400 Subject: [PATCH] [ZNR] Implemented Oran-Rief Ooze --- Mage.Sets/src/mage/cards/o/OranRiefOoze.java | 61 ++++++++++++++++++++ Mage.Sets/src/mage/sets/ZendikarRising.java | 1 + 2 files changed, 62 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/o/OranRiefOoze.java diff --git a/Mage.Sets/src/mage/cards/o/OranRiefOoze.java b/Mage.Sets/src/mage/cards/o/OranRiefOoze.java new file mode 100644 index 0000000000..c8f48b9c76 --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OranRiefOoze.java @@ -0,0 +1,61 @@ +package mage.cards.o; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.permanent.CounterPredicate; +import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class OranRiefOoze extends CardImpl { + + private static final FilterPermanent filter + = new FilterAttackingCreature("attacking creature with a +1/+1 counter on it"); + + static { + filter.add(new CounterPredicate(CounterType.P1P1)); + } + + public OranRiefOoze(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.OOZE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Oran-Rief Ooze enters the battlefield, put a +1/+1 counter on target creature you control. + Ability ability = new EntersBattlefieldTriggeredAbility( + new AddCountersTargetEffect(CounterType.P1P1.createInstance()) + ); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability); + + // Whenever Oran-Rief Ooze attacks, put a +1/+1 counter on each attacking creature with a +1/+1 counter on it. + this.addAbility(new AttacksTriggeredAbility(new AddCountersAllEffect( + CounterType.P1P1.createInstance(), filter + ), false)); + } + + private OranRiefOoze(final OranRiefOoze card) { + super(card); + } + + @Override + public OranRiefOoze copy() { + return new OranRiefOoze(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ZendikarRising.java b/Mage.Sets/src/mage/sets/ZendikarRising.java index 1c368e52b5..c76638d2a5 100644 --- a/Mage.Sets/src/mage/sets/ZendikarRising.java +++ b/Mage.Sets/src/mage/sets/ZendikarRising.java @@ -228,6 +228,7 @@ public final class ZendikarRising extends ExpansionSet { cards.add(new SetCardInfo("Ondu Inversion", 30, Rarity.RARE, mage.cards.o.OnduInversion.class)); cards.add(new SetCardInfo("Ondu Skyruins", 30, Rarity.RARE, mage.cards.o.OnduSkyruins.class)); cards.add(new SetCardInfo("Orah, Skyclave Hierophant", 233, Rarity.RARE, mage.cards.o.OrahSkyclaveHierophant.class)); + cards.add(new SetCardInfo("Oran-Rief Ooze", 198, Rarity.RARE, mage.cards.o.OranRiefOoze.class)); cards.add(new SetCardInfo("Paired Tactician", 31, Rarity.UNCOMMON, mage.cards.p.PairedTactician.class)); cards.add(new SetCardInfo("Pelakka Caverns", 120, Rarity.UNCOMMON, mage.cards.p.PelakkaCaverns.class)); cards.add(new SetCardInfo("Pelakka Predation", 120, Rarity.UNCOMMON, mage.cards.p.PelakkaPredation.class));