mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Some minor changes to framework and card classes.
This commit is contained in:
parent
0697801cdc
commit
17238bee3e
5 changed files with 21 additions and 20 deletions
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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,7 +74,7 @@ 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(source.getTargets() != null ? source.getTargets().get(0).getTargetName() : "target")
|
||||
.append(" onto the battlefield?").toString(), game)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -83,20 +82,19 @@ public class PutOntoBattlefieldTargetEffect extends OneShotEffect<PutOntoBattlef
|
|||
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);
|
||||
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);
|
||||
result |= card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, tapped);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue