diff --git a/Mage.Sets/src/mage/cards/f/FrenziedSaddlebrute.java b/Mage.Sets/src/mage/cards/f/FrenziedSaddlebrute.java new file mode 100644 index 00000000000..2aa0f015924 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FrenziedSaddlebrute.java @@ -0,0 +1,68 @@ +package mage.cards.f; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FrenziedSaddlebrute extends CardImpl { + + public FrenziedSaddlebrute(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.WARRIOR); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // All creatures can attack your opponents and planeswalkers your opponents control as though those creatures had haste. + this.addAbility(new SimpleStaticAbility(new FrenziedSaddlebruteEffect())); + } + + private FrenziedSaddlebrute(final FrenziedSaddlebrute card) { + super(card); + } + + @Override + public FrenziedSaddlebrute copy() { + return new FrenziedSaddlebrute(this); + } +} + +class FrenziedSaddlebruteEffect extends AsThoughEffectImpl { + + FrenziedSaddlebruteEffect() { + super(AsThoughEffectType.ATTACK_AS_HASTE, Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "all creatures can attack your opponents and planeswalkers " + + "your opponents control as though those creatures had haste"; + } + + private FrenziedSaddlebruteEffect(final FrenziedSaddlebruteEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public FrenziedSaddlebruteEffect copy() { + return new FrenziedSaddlebruteEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + return game.getOpponents(source.getControllerId()).contains(affectedControllerId); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegends.java b/Mage.Sets/src/mage/sets/CommanderLegends.java index e56e3cf04f8..adbe4cfeece 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegends.java +++ b/Mage.Sets/src/mage/sets/CommanderLegends.java @@ -191,6 +191,7 @@ public final class CommanderLegends extends ExpansionSet { cards.add(new SetCardInfo("Forest", 510, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forgotten Cave", 483, Rarity.COMMON, mage.cards.f.ForgottenCave.class)); cards.add(new SetCardInfo("Foundry Inspector", 310, Rarity.COMMON, mage.cards.f.FoundryInspector.class)); + cards.add(new SetCardInfo("Frenzied Saddlebrute", 180, Rarity.UNCOMMON, mage.cards.f.FrenziedSaddlebrute.class)); cards.add(new SetCardInfo("Furnace Celebration", 181, Rarity.UNCOMMON, mage.cards.f.FurnaceCelebration.class)); cards.add(new SetCardInfo("Fyndhorn Elves", 228, Rarity.COMMON, mage.cards.f.FyndhornElves.class)); cards.add(new SetCardInfo("Galestrike", 70, Rarity.COMMON, mage.cards.g.Galestrike.class)); diff --git a/Mage/src/main/java/mage/game/permanent/PermanentImpl.java b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java index 912983a0b15..8f1818a89ba 100644 --- a/Mage/src/main/java/mage/game/permanent/PermanentImpl.java +++ b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java @@ -1,5 +1,6 @@ package mage.game.permanent; +import mage.ApprovingObject; import mage.MageObject; import mage.MageObjectReference; import mage.ObjectColor; @@ -1220,8 +1221,10 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { @Override public boolean canAttackInPrinciple(UUID defenderId, Game game) { - if (hasSummoningSickness() - && null == game.getContinuousEffects().asThough(this.objectId, AsThoughEffectType.ATTACK_AS_HASTE, null, this.getControllerId(), game)) { + ApprovingObject approvingObject = game.getContinuousEffects().asThough( + this.objectId, AsThoughEffectType.ATTACK_AS_HASTE, null, defenderId, game + ); + if (hasSummoningSickness() && approvingObject == null) { return false; } //20101001 - 508.1c