mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +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.color.setBlue(true);
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(4);
|
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 ability = new BeginningOfUpkeepTriggeredAbility(new AddCountersTargetEffect(CounterType.CHARGE.createInstance()), TargetController.YOU, true);
|
||||||
ability.addTarget(new TargetArtifactPermanent());
|
ability.addTarget(new TargetArtifactPermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class SeersSundial extends CardImpl<SeersSundial> {
|
||||||
this.expansionSetCode = "WWK";
|
this.expansionSetCode = "WWK";
|
||||||
|
|
||||||
// Landfall - Whenever a land enters the battlefield under your control, you may pay {2}. If you do, draw a card.
|
// 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) {
|
public SeersSundial(final SeersSundial card) {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
|
||||||
public class ManacostVariableValue implements DynamicValue {
|
public class ManacostVariableValue implements DynamicValue {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int calculate(Game game, Ability sourceAbility) {
|
public int calculate(Game game, Ability sourceAbility) {
|
||||||
return sourceAbility.getManaCostsToPay().getX();
|
return sourceAbility.getManaCostsToPay().getX();
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
* authors and should not be interpreted as representing official policies, either expressed
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package mage.abilities.effects.common;
|
package mage.abilities.effects.common;
|
||||||
|
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
@ -75,31 +74,30 @@ public class PutOntoBattlefieldTargetEffect extends OneShotEffect<PutOntoBattlef
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller == null || !controller.chooseUse(Outcome.PutCreatureInPlay,
|
if (controller == null || !controller.chooseUse(Outcome.PutCreatureInPlay,
|
||||||
new StringBuilder("Put ")
|
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)) {
|
.append(" onto the battlefield?").toString(), game)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (UUID targetId : targetPointer.getTargets(game, source)) {
|
for (UUID targetId : targetPointer.getTargets(game, source)) {
|
||||||
Card card = game.getCard(targetId);
|
Card card = game.getCard(targetId);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
|
switch (game.getState().getZone(targetId)) {
|
||||||
switch (game.getState().getZone(targetId)) {
|
case GRAVEYARD:
|
||||||
case GRAVEYARD:
|
for (Player player : game.getPlayers().values()) {
|
||||||
for (Player player : game.getPlayers().values()) {
|
if (player.getGraveyard().contains(card.getId())) {
|
||||||
if (player.getGraveyard().contains(card.getId())) {
|
player.getGraveyard().remove(card);
|
||||||
player.getGraveyard().remove(card);
|
result |= card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, tapped);
|
||||||
result |= card.moveToZone(Zone.BATTLEFIELD, source.getId(), game, tapped);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
case HAND:
|
}
|
||||||
for (Player player : game.getPlayers().values()) {
|
case HAND:
|
||||||
if (player.getHand().contains(card.getId())) {
|
for (Player player : game.getPlayers().values()) {
|
||||||
player.getHand().remove(card);
|
if (player.getHand().contains(card.getId())) {
|
||||||
result |= card.moveToZone(Zone.BATTLEFIELD, source.getId(), game, tapped);
|
player.getHand().remove(card);
|
||||||
}
|
result |= card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, tapped);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class AddCountersTargetEffect extends OneShotEffect<AddCountersTargetEffe
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getText(Mode mode) {
|
public String getText(Mode mode) {
|
||||||
if (staticText != null) {
|
if (!staticText.isEmpty()) {
|
||||||
return staticText;
|
return staticText;
|
||||||
}
|
}
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
Loading…
Reference in a new issue