From 3cf53810d97274ca9f9190e14770858f45d7e303 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 20 Oct 2013 16:48:10 +0200 Subject: [PATCH] * Fixed must be blocked by all creatures if able target effects to be not abilities of the targeted creatures (so e.g. a turn to frog does not neutralize the effect). --- .../avacynrestored/RevengeOfTheHunted.java | 47 ++----------------- .../mage/sets/dragonsmaze/ArmedDangerous.java | 6 +-- .../src/mage/sets/mirrodin/Bloodscent.java | 16 +++---- 3 files changed, 14 insertions(+), 55 deletions(-) diff --git a/Mage.Sets/src/mage/sets/avacynrestored/RevengeOfTheHunted.java b/Mage.Sets/src/mage/sets/avacynrestored/RevengeOfTheHunted.java index be22708f6c3..8930a271191 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/RevengeOfTheHunted.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/RevengeOfTheHunted.java @@ -33,7 +33,9 @@ import mage.constants.Duration; import mage.constants.Rarity; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; import mage.abilities.effects.RequirementEffect; +import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect; import mage.abilities.effects.common.continious.BoostTargetEffect; import mage.abilities.effects.common.continious.GainAbilityTargetEffect; import mage.abilities.keyword.MiracleAbility; @@ -59,7 +61,9 @@ public class RevengeOfTheHunted extends CardImpl { this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new BoostTargetEffect(6, 6, Duration.EndOfTurn)); this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new RevengeOfTheHuntedEffect()); + Effect effect = new MustBeBlockedByAllTargetEffect(Duration.EndOfTurn); + effect.setText("and all creatures able to block it this turn do so"); + this.getSpellAbility().addEffect(effect); this.addAbility(new MiracleAbility(new ManaCostsImpl("{G}"))); } @@ -73,44 +77,3 @@ public class RevengeOfTheHunted extends CardImpl { return new RevengeOfTheHunted(this); } } - -class RevengeOfTheHuntedEffect extends RequirementEffect { - - public RevengeOfTheHuntedEffect() { - this(Duration.EndOfTurn); - } - - public RevengeOfTheHuntedEffect(Duration duration) { - super(duration); - staticText = "All creatures able to block it this turn do so"; - } - - public RevengeOfTheHuntedEffect(final RevengeOfTheHuntedEffect effect) { - super(effect); - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - return permanent.canBlock(source.getFirstTarget(), game); - } - - @Override - public boolean mustAttack(Game game) { - return false; - } - - @Override - public boolean mustBlock(Game game) { - return true; - } - - @Override - public UUID mustBlockAttacker(Ability source, Game game) { - return source.getFirstTarget(); - } - - @Override - public RevengeOfTheHuntedEffect copy() { - return new RevengeOfTheHuntedEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/ArmedDangerous.java b/Mage.Sets/src/mage/sets/dragonsmaze/ArmedDangerous.java index 553f30d12bd..e68f15cdccc 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/ArmedDangerous.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/ArmedDangerous.java @@ -36,6 +36,7 @@ import mage.constants.Zone; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.combat.MustBeBlockedByAllSourceEffect; +import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect; import mage.abilities.effects.common.continious.BoostTargetEffect; import mage.abilities.effects.common.continious.GainAbilityTargetEffect; import mage.abilities.keyword.DoubleStrikeAbility; @@ -67,10 +68,7 @@ public class ArmedDangerous extends SplitCard { // Dangerous // All creatures able to block target creature this turn do so. getRightHalfCard().getColor().setGreen(true); - Effect effect = new GainAbilityTargetEffect( - new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBeBlockedByAllSourceEffect(Duration.EndOfCombat)), Duration.EndOfTurn, - "All creatures able to block target creature this turn do so"); - getRightHalfCard().getSpellAbility().addEffect(effect); + getRightHalfCard().getSpellAbility().addEffect(new MustBeBlockedByAllTargetEffect(Duration.EndOfTurn)); getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent(true)); } diff --git a/Mage.Sets/src/mage/sets/mirrodin/Bloodscent.java b/Mage.Sets/src/mage/sets/mirrodin/Bloodscent.java index 49a03d2353a..68f6d85f2c7 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/Bloodscent.java +++ b/Mage.Sets/src/mage/sets/mirrodin/Bloodscent.java @@ -28,15 +28,11 @@ package mage.sets.mirrodin; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.combat.MustBeBlockedByAllSourceEffect; -import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect; import mage.cards.CardImpl; +import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.Zone; +import mage.constants.Rarity; import mage.target.common.TargetCreaturePermanent; /** @@ -49,8 +45,10 @@ public class Bloodscent extends CardImpl { super(ownerId, 114, "Bloodscent", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{G}"); this.expansionSetCode = "MRD"; this.color.setGreen(true); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBeBlockedByAllSourceEffect()), Duration.EndOfTurn)); - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // All creatures able to block target creature this turn do so. + this.getSpellAbility().addEffect(new MustBeBlockedByAllTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(true)); } public Bloodscent(final Bloodscent card) {