From 7646e8224e92db90ccfa5e22a5eda667924ef20a Mon Sep 17 00:00:00 2001 From: magenoxx Date: Tue, 26 Jun 2012 01:05:54 +0400 Subject: [PATCH] Fixed Sphere Of The Suns --- .../sets/mirrodinbesieged/SphereOfTheSuns.java | 15 +++++++++------ .../common/EntersBattlefieldTappedAbility.java | 11 +++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/SphereOfTheSuns.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/SphereOfTheSuns.java index 5ecf5a2c678..fff4645a954 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/SphereOfTheSuns.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/SphereOfTheSuns.java @@ -27,32 +27,35 @@ */ package mage.sets.mirrodinbesieged; -import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.counters.CounterType; +import java.util.UUID; + /** * - * @author North, Loki + * @author North, Loki, noxx */ public class SphereOfTheSuns extends CardImpl { + private static final String ruleText = "Sphere of the Suns enters the battlefield tapped and with three charge counters on it."; + public SphereOfTheSuns(UUID ownerId) { super(ownerId, 134, "Sphere of the Suns", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); this.expansionSetCode = "MBS"; - Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(3)), - "Sphere of the Suns enters the battlefield tapped and with three charge counters on it."); + // Sphere of the Suns enters the battlefield tapped and with three charge counters on it. + Ability ability = new EntersBattlefieldTappedAbility(ruleText); + ((EntersBattlefieldEffect)ability.getEffects().get(0)).addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(3))); this.addAbility(ability); - this.addAbility(new EntersBattlefieldTappedAbility()); RemoveCountersSourceCost removeCounterCost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance()); ability = new AnyColorManaAbility(); diff --git a/Mage/src/mage/abilities/common/EntersBattlefieldTappedAbility.java b/Mage/src/mage/abilities/common/EntersBattlefieldTappedAbility.java index 0e3ba88a02f..bbaac004097 100644 --- a/Mage/src/mage/abilities/common/EntersBattlefieldTappedAbility.java +++ b/Mage/src/mage/abilities/common/EntersBattlefieldTappedAbility.java @@ -39,16 +39,27 @@ import mage.abilities.effects.common.TapSourceEffect; */ public class EntersBattlefieldTappedAbility extends StaticAbility { + private String ruleText; + public EntersBattlefieldTappedAbility() { super(Zone.BATTLEFIELD, new EntersBattlefieldEffect(new TapSourceEffect(true))); } + public EntersBattlefieldTappedAbility(String ruleText) { + this(); + this.ruleText = ruleText; + } + public EntersBattlefieldTappedAbility(final EntersBattlefieldTappedAbility ability) { super(ability); + this.ruleText = ability.ruleText; } @Override public String getRule() { + if (ruleText != null) { + return ruleText; + } return "{this} enters the battlefield tapped"; }