From 7cdda24e9a8806522c9cb3439edd53daecba5728 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 10 May 2015 01:32:14 +0200 Subject: [PATCH] Fixed that AI destroyed all their permanents with Rats of Rath. --- Mage.Sets/src/mage/sets/tempest/RatsOfRath.java | 8 +++++++- Mage/src/mage/abilities/effects/Effect.java | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/tempest/RatsOfRath.java b/Mage.Sets/src/mage/sets/tempest/RatsOfRath.java index 44a34b0d04..ed5eace41d 100644 --- a/Mage.Sets/src/mage/sets/tempest/RatsOfRath.java +++ b/Mage.Sets/src/mage/sets/tempest/RatsOfRath.java @@ -35,9 +35,11 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.constants.ColoredManaSymbol; +import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; @@ -63,9 +65,13 @@ public class RatsOfRath extends CardImpl { super(ownerId, 44, "Rats of Rath", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); this.expansionSetCode = "TMP"; this.subtype.add("Rat"); - this.color.setBlack(true); + this.power = new MageInt(2); this.toughness = new MageInt(1); + + // {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.addTarget(new TargetControlledPermanent(filter)); this.addAbility(ability); diff --git a/Mage/src/mage/abilities/effects/Effect.java b/Mage/src/mage/abilities/effects/Effect.java index 1479ed9810..e4fe554493 100644 --- a/Mage/src/mage/abilities/effects/Effect.java +++ b/Mage/src/mage/abilities/effects/Effect.java @@ -49,6 +49,7 @@ public interface Effect extends Serializable { void setText(String staticText); boolean apply(Game game, Ability source); Outcome getOutcome(); + void setOutcome(Outcome outcome); EffectType getEffectType(); void setTargetPointer(TargetPointer targetPointer); TargetPointer getTargetPointer();