Fixed Sphere Of The Suns

This commit is contained in:
magenoxx 2012-06-26 01:05:54 +04:00
parent f786727b40
commit 7646e8224e
2 changed files with 20 additions and 6 deletions

View file

@ -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<SphereOfTheSuns> {
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();

View file

@ -39,16 +39,27 @@ import mage.abilities.effects.common.TapSourceEffect;
*/
public class EntersBattlefieldTappedAbility extends StaticAbility<EntersBattlefieldTappedAbility> {
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";
}