minor refactoring

This commit is contained in:
North 2011-12-27 15:25:36 +02:00
parent 3704283aa0
commit 4b8507a941
7 changed files with 9 additions and 10 deletions

View file

@ -33,7 +33,6 @@ import mage.Constants.Outcome;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageMultiEffect; import mage.abilities.effects.common.DamageMultiEffect;

View file

@ -30,7 +30,6 @@ package mage.sets.ravnika;
import java.util.UUID; import java.util.UUID;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.Constants.Zone; import mage.Constants.Zone;
import mage.Mana; import mage.Mana;
@ -38,7 +37,6 @@ import mage.abilities.Ability;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.effects.common.BasicManaEffect;
import mage.abilities.mana.BasicManaAbility;
import mage.abilities.mana.SimpleManaAbility; import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -51,6 +49,7 @@ public class BorosSignet extends CardImpl<BorosSignet> {
public BorosSignet (UUID ownerId) { public BorosSignet (UUID ownerId) {
super(ownerId, 255, "Boros Signet", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); super(ownerId, 255, "Boros Signet", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "RAV"; this.expansionSetCode = "RAV";
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(1, 0, 0, 1, 0, 0, 0)), new GenericManaCost(1)); Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(1, 0, 0, 1, 0, 0, 0)), new GenericManaCost(1));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
this.addAbility(ability); this.addAbility(ability);

View file

@ -73,7 +73,7 @@ class PsychicMiasmaEffect1 extends OneShotEffect<PsychicMiasmaEffect1> {
public PsychicMiasmaEffect1() { public PsychicMiasmaEffect1() {
super(Outcome.Discard); super(Outcome.Discard);
staticText = "Target player discards a card."; staticText = "Target player discards a card";
} }
public PsychicMiasmaEffect1(final PsychicMiasmaEffect1 effect) { public PsychicMiasmaEffect1(final PsychicMiasmaEffect1 effect) {
@ -106,7 +106,7 @@ class PsychicMiasmaEffect1 extends OneShotEffect<PsychicMiasmaEffect1> {
class PsychicMiasmaEffect2 extends PostResolveEffect<PsychicMiasmaEffect2> { class PsychicMiasmaEffect2 extends PostResolveEffect<PsychicMiasmaEffect2> {
public PsychicMiasmaEffect2() { public PsychicMiasmaEffect2() {
staticText = "If a land card is discarded this way, return {this} to its owner's hand."; staticText = "If a land card is discarded this way, return {this} to its owner's hand";
} }
public PsychicMiasmaEffect2(final PsychicMiasmaEffect2 effect) { public PsychicMiasmaEffect2(final PsychicMiasmaEffect2 effect) {

View file

@ -44,8 +44,10 @@ public class NaturalSpring extends CardImpl<NaturalSpring> {
super(ownerId, 133, "Natural Spring", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{G}{G}"); super(ownerId, 133, "Natural Spring", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
this.expansionSetCode = "TMP"; this.expansionSetCode = "TMP";
this.color.setGreen(true); this.color.setGreen(true);
// Target player gains 8 life.
this.getSpellAbility().addEffect(new GainLifeTargetEffect(8)); this.getSpellAbility().addEffect(new GainLifeTargetEffect(8));
this.getSpellAbility().addTarget(new TargetPlayer(1)); this.getSpellAbility().addTarget(new TargetPlayer());
} }
public NaturalSpring(final NaturalSpring card) { public NaturalSpring(final NaturalSpring card) {

View file

@ -47,7 +47,7 @@ import mage.filter.common.FilterLandPermanent;
*/ */
public class LoamLion extends CardImpl<LoamLion> { public class LoamLion extends CardImpl<LoamLion> {
private static final String rule = "Loam Lion gets +1/+2 as long as you control a Forest"; private static final String rule = "{this} gets +1/+2 as long as you control a Forest";
private static final FilterLandPermanent filter = new FilterLandPermanent("a Forest"); private static final FilterLandPermanent filter = new FilterLandPermanent("a Forest");
static { static {
@ -64,6 +64,7 @@ public class LoamLion extends CardImpl<LoamLion> {
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// Loam Lion gets +1/+2 as long as you control a Forest.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinousEffect(new BoostSourceEffect(1, 2, Duration.WhileOnBattlefield), new ConditionalContinousEffect(new BoostSourceEffect(1, 2, Duration.WhileOnBattlefield),
new ControlsPermanentCondition(filter), rule))); new ControlsPermanentCondition(filter), rule)));

View file

@ -81,7 +81,7 @@ public class DestroyTargetEffect extends OneShotEffect<DestroyTargetEffect> {
@Override @Override
public String getText(Mode mode) { public String getText(Mode mode) {
StringBuffer sb = new StringBuffer(); StringBuilder sb = new StringBuilder();
if (mode.getTargets().size() == 0) { if (mode.getTargets().size() == 0) {
sb.append("destroy that creature"); //TODO add possibility to specify text with targetPointer usage sb.append("destroy that creature"); //TODO add possibility to specify text with targetPointer usage
} else if (mode.getTargets().get(0).getNumberOfTargets() == 1) } else if (mode.getTargets().get(0).getNumberOfTargets() == 1)

View file

@ -30,8 +30,6 @@ package mage.filter.common;
import java.util.UUID; import java.util.UUID;
import mage.abilities.Ability;
import mage.filter.Filter;
import mage.filter.FilterImpl; import mage.filter.FilterImpl;
import mage.filter.FilterInPlay; import mage.filter.FilterInPlay;
import mage.filter.FilterPlayer; import mage.filter.FilterPlayer;