fix SecludedSteppe and Myr Battlesphere

This commit is contained in:
Plopman 2012-11-24 19:15:37 +01:00
parent a029105605
commit f1a9310228
3 changed files with 10 additions and 10 deletions

View file

@ -33,7 +33,7 @@ import mage.Constants.Rarity;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.keyword.CyclingAbility;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
/**
@ -49,7 +49,7 @@ public class SecludedSteppe extends CardImpl<SecludedSteppe> {
// Secluded Steppe enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {tap}: Add {W} to your mana pool.
this.addAbility(new BlackManaAbility());
this.addAbility(new WhiteManaAbility());
// Cycling {W}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{W}")));
}

View file

@ -97,7 +97,7 @@ class MyrBattlesphereAbility extends TriggeredAbilityImpl<MyrBattlesphereAbility
public MyrBattlesphereAbility() {
super(Zone.BATTLEFIELD, new BoostSourceEffect(new GetXValue(), new StaticValue(0), Duration.EndOfTurn), true);
this.addEffect(new MyrBattlesphereEffect());
this.addCost(new TapVariableTargetCost(new TargetControlledCreaturePermanent(1, Integer.MAX_VALUE, filter, false)));
this.addCost(new TapVariableTargetCost(new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, filter, false)));
}
public MyrBattlesphereAbility(final MyrBattlesphereAbility ability) {
@ -140,6 +140,7 @@ class MyrBattlesphereEffect extends OneShotEffect<MyrBattlesphereEffect> {
public MyrBattlesphereEffect() {
super(Outcome.Damage);
staticText = "{source} deals X damage to defending player";
}
public MyrBattlesphereEffect(final MyrBattlesphereEffect effect) {

View file

@ -28,6 +28,7 @@
package mage.abilities.costs.common;
import java.util.Iterator;
import java.util.UUID;
import mage.Constants.Outcome;
import mage.abilities.Ability;
@ -66,17 +67,15 @@ public class TapVariableTargetCost extends CostImpl<TapVariableTargetCost> imple
@Override
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
amountPaid = 0;
while (true) {
target.clearChosen();
if (target.canChoose(sourceId, controllerId, game) && target.choose(Outcome.Tap, controllerId, sourceId, game)) {
Permanent permanent = game.getPermanent(target.getFirstTarget());
target.clearChosen();
if (target.canChoose(sourceId, controllerId, game) && target.choose(Outcome.Tap, controllerId, sourceId, game)) {
for (Iterator it = target.getTargets().iterator(); it.hasNext();) {
UUID uuid = (UUID) it.next();
Permanent permanent = game.getPermanent(uuid);
if (permanent != null && permanent.tap(game)) {
amountPaid++;
}
}
else {
break;
}
}
paid = true;
return true;