Some minor changes to framework and card classes.

This commit is contained in:
LevelX2 2013-11-01 17:04:27 +01:00
parent 0697801cdc
commit 17238bee3e
5 changed files with 21 additions and 20 deletions

View file

@ -55,6 +55,8 @@ public class VedalkenInfuser extends CardImpl<VedalkenInfuser> {
this.color.setBlue(true);
this.power = new MageInt(1);
this.toughness = new MageInt(4);
// At the beginning of your upkeep, you may put a charge counter on target artifact.
Ability ability = new BeginningOfUpkeepTriggeredAbility(new AddCountersTargetEffect(CounterType.CHARGE.createInstance()), TargetController.YOU, true);
ability.addTarget(new TargetArtifactPermanent());
this.addAbility(ability);

View file

@ -47,7 +47,7 @@ public class SeersSundial extends CardImpl<SeersSundial> {
this.expansionSetCode = "WWK";
// Landfall - Whenever a land enters the battlefield under your control, you may pay {2}. If you do, draw a card.
this.addAbility(new LandfallAbility(new DoIfCostPaid(new DrawCardControllerEffect(1), new ManaCostsImpl("{2}")), true));
this.addAbility(new LandfallAbility(new DoIfCostPaid(new DrawCardControllerEffect(1), new ManaCostsImpl("{2}")), false)); // optional = false because DoIfCost is already optonal
}
public SeersSundial(final SeersSundial card) {

View file

@ -5,6 +5,7 @@ import mage.abilities.dynamicvalue.DynamicValue;
import mage.game.Game;
public class ManacostVariableValue implements DynamicValue {
@Override
public int calculate(Game game, Ability sourceAbility) {
return sourceAbility.getManaCostsToPay().getX();

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.abilities.effects.common;
import mage.constants.Outcome;
@ -75,31 +74,30 @@ public class PutOntoBattlefieldTargetEffect extends OneShotEffect<PutOntoBattlef
Player controller = game.getPlayer(source.getControllerId());
if (controller == null || !controller.chooseUse(Outcome.PutCreatureInPlay,
new StringBuilder("Put ")
.append(source.getTargets() != null ? source.getTargets().get(0).getTargetName():"target")
.append(" onto the battlefield?").toString(), game)) {
.append(source.getTargets() != null ? source.getTargets().get(0).getTargetName() : "target")
.append(" onto the battlefield?").toString(), game)) {
return false;
}
}
for (UUID targetId : targetPointer.getTargets(game, source)) {
Card card = game.getCard(targetId);
if (card != null) {
switch (game.getState().getZone(targetId)) {
case GRAVEYARD:
for (Player player : game.getPlayers().values()) {
if (player.getGraveyard().contains(card.getId())) {
player.getGraveyard().remove(card);
result |= card.moveToZone(Zone.BATTLEFIELD, source.getId(), game, tapped);
}
switch (game.getState().getZone(targetId)) {
case GRAVEYARD:
for (Player player : game.getPlayers().values()) {
if (player.getGraveyard().contains(card.getId())) {
player.getGraveyard().remove(card);
result |= card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, tapped);
}
case HAND:
for (Player player : game.getPlayers().values()) {
if (player.getHand().contains(card.getId())) {
player.getHand().remove(card);
result |= card.moveToZone(Zone.BATTLEFIELD, source.getId(), game, tapped);
}
}
case HAND:
for (Player player : game.getPlayers().values()) {
if (player.getHand().contains(card.getId())) {
player.getHand().remove(card);
result |= card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, tapped);
}
}
}
}
}
}
return result;

View file

@ -104,7 +104,7 @@ public class AddCountersTargetEffect extends OneShotEffect<AddCountersTargetEffe
@Override
public String getText(Mode mode) {
if (staticText != null) {
if (!staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder();