From 81300cd90ae8a5eb6860132172c22fc5d1d7cd74 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 10 May 2015 09:38:14 +0200 Subject: [PATCH] Fixed rats of Rath and optimized Karplusan Strider. --- .../sets/modernmasters2015/KarplusanStrider.java | 12 +++++------- Mage.Sets/src/mage/sets/tempest/RatsOfRath.java | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Mage.Sets/src/mage/sets/modernmasters2015/KarplusanStrider.java b/Mage.Sets/src/mage/sets/modernmasters2015/KarplusanStrider.java index d1a0b70b677..257b3a25702 100644 --- a/Mage.Sets/src/mage/sets/modernmasters2015/KarplusanStrider.java +++ b/Mage.Sets/src/mage/sets/modernmasters2015/KarplusanStrider.java @@ -29,7 +29,6 @@ package mage.sets.modernmasters2015; import java.util.UUID; import mage.MageInt; -import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; @@ -108,12 +107,11 @@ class KarplusanStriderEffect extends ContinuousRuleModifyingEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { - Permanent targettedPermanent = game.getPermanent(event.getTargetId()); - Spell sourceSpell = game.getStack().getSpell(event.getSourceId()); - if (targettedPermanent != null && sourceSpell != null && targettedPermanent.getId().equals(source.getSourceId())) { - if (sourceSpell.getColor().contains(ObjectColor.BLUE) - || sourceSpell.getColor().contains(ObjectColor.BLACK)) { - return true; + if (event.getTargetId().equals(source.getSourceId())) { + Permanent targettedPermanent = game.getPermanent(event.getTargetId()); + Spell sourceSpell = game.getStack().getSpell(event.getSourceId()); + if (targettedPermanent != null && sourceSpell != null) { + return sourceSpell.getColor().isBlue() || sourceSpell.getColor().isBlack(); } } return false; diff --git a/Mage.Sets/src/mage/sets/tempest/RatsOfRath.java b/Mage.Sets/src/mage/sets/tempest/RatsOfRath.java index ed5eace41d0..1199d11cf07 100644 --- a/Mage.Sets/src/mage/sets/tempest/RatsOfRath.java +++ b/Mage.Sets/src/mage/sets/tempest/RatsOfRath.java @@ -72,7 +72,7 @@ public class RatsOfRath extends CardImpl { // {B}: Destroy target artifact, creature, or land you control. Effect effect = new DestroyTargetEffect(); effect.setOutcome(Outcome.AIDontUseIt); // AI can't handle this - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ColoredManaCost(ColoredManaSymbol.B)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ColoredManaCost(ColoredManaSymbol.B)); ability.addTarget(new TargetControlledPermanent(filter)); this.addAbility(ability); }