diff --git a/Mage.Sets/src/mage/cards/o/OgreChitterlord.java b/Mage.Sets/src/mage/cards/o/OgreChitterlord.java new file mode 100644 index 00000000000..6ad690dfe1c --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OgreChitterlord.java @@ -0,0 +1,72 @@ +package mage.cards.o; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.AddContinuousEffectToGame; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.abilities.meta.OrTriggeredAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.game.permanent.token.RatCantBlockToken; + +import java.util.UUID; + +/** + * + * @author Susucr + */ +public final class OgreChitterlord extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = + new FilterControlledCreaturePermanent(SubType.RAT, "each Rat you control"); + private static final FilterControlledPermanent filterCondition = + new FilterControlledPermanent(SubType.RAT, "five or more Rats"); + private static final Condition condition = + new PermanentsOnTheBattlefieldCondition(filterCondition, ComparisonType.OR_GREATER, 5); + + public OgreChitterlord(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + // Menace + this.addAbility(new MenaceAbility()); + + // Whenever Ogre Chitterlord enters the battlefield or attacks, create two 1/1 black Rat creature tokens with "This creature can't block." Then if you control five or more Rats, each Rat you control gets +2/+0 until end of turn. + Ability ability = new OrTriggeredAbility( + Zone.BATTLEFIELD, new CreateTokenEffect(new RatCantBlockToken(), 2), + false, "whenever {this} enters the battlefield or attacks, ", + new EntersBattlefieldTriggeredAbility(null), + new AttacksTriggeredAbility(null) + ); + ability.addEffect(new ConditionalOneShotEffect( + new AddContinuousEffectToGame( + new BoostAllEffect(2, 0, Duration.EndOfTurn, filter, false) + ), + condition + ).concatBy("Then")); + this.addAbility(ability); + } + + private OgreChitterlord(final OgreChitterlord card) { + super(card); + } + + @Override + public OgreChitterlord copy() { + return new OgreChitterlord(this); + } +} diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraine.java b/Mage.Sets/src/mage/sets/WildsOfEldraine.java index 4c5d9a20748..8d88adde15f 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraine.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraine.java @@ -143,6 +143,7 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Not Dead After All", 101, Rarity.COMMON, mage.cards.n.NotDeadAfterAll.class)); cards.add(new SetCardInfo("Obyra's Attendants", 63, Rarity.COMMON, mage.cards.o.ObyrasAttendants.class)); cards.add(new SetCardInfo("Obyra, Dreaming Duelist", 210, Rarity.UNCOMMON, mage.cards.o.ObyraDreamingDuelist.class)); + cards.add(new SetCardInfo("Ogre Chitterlord", 319, Rarity.RARE, mage.cards.o.OgreChitterlord.class)); cards.add(new SetCardInfo("Old Flitterfang", 316, Rarity.UNCOMMON, mage.cards.o.OldFlitterfang.class)); cards.add(new SetCardInfo("Pests of Honor", 310, Rarity.UNCOMMON, mage.cards.p.PestsOfHonor.class)); cards.add(new SetCardInfo("Picklock Prankster", 64, Rarity.UNCOMMON, mage.cards.p.PicklockPrankster.class));