Changed some modal spells to the new handling of modal spells.

This commit is contained in:
LevelX2 2013-06-22 19:36:16 +02:00
parent 853810ce45
commit 4d3d76e8e9
4 changed files with 38 additions and 69 deletions

View file

@ -64,44 +64,23 @@ public class ClanDefiance extends CardImpl<ClanDefiance> {
this.color.setRed(true);
this.color.setGreen(true);
// Choose one or more - Clan Defiance deals X damage to target creature with flying; Clan Defiance deals X damage to target creature without flying; and/or Clan Defiance deals X damage to target player.
// Choose one or more -
this.getSpellAbility().getModes().setMinModes(1);
this.getSpellAbility().getModes().setMaxModes(3);
// Clan Defiance deals X damage to target creature with flying;
this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
// Clan Defiance deals X damage to target creature without flying;
Mode mode1 = new Mode();
mode1.getEffects().add(new DamageTargetEffect(new ManacostVariableValue()));
mode1.getTargets().add(new TargetCreaturePermanent(filter2));
this.getSpellAbility().addMode(mode1);
// and/or Clan Defiance deals X damage to target player.
Mode mode2 = new Mode();
mode2.getEffects().add(new DamageTargetEffect(new ManacostVariableValue()));
mode2.getTargets().add(new TargetPlayer());
this.getSpellAbility().addMode(mode2);
Mode mode3 = new Mode();
mode3.getEffects().add(new DamageTargetEffect(new ManacostVariableValue(), true, "target creature with flying, then deals X damage to target creature without flying"));
mode3.getTargets().add(new TargetCreaturePermanent(filter));
mode3.getTargets().add(new TargetCreaturePermanent(filter2));
this.getSpellAbility().addMode(mode3);
Mode mode4 = new Mode();
mode4.getEffects().add(new DamageTargetEffect(new ManacostVariableValue(), true, "target creature with flying, then deals X damage to target player"));
mode4.getTargets().add(new TargetCreaturePermanent(filter));
mode4.getTargets().add(new TargetPlayer());
this.getSpellAbility().addMode(mode4);
Mode mode5 = new Mode();
mode5.getEffects().add(new DamageTargetEffect(new ManacostVariableValue(), true, "target creature without flying, then deals X damage to target player"));
mode5.getTargets().add(new TargetCreaturePermanent(filter2));
mode5.getTargets().add(new TargetPlayer());
this.getSpellAbility().addMode(mode5);
Mode mode6 = new Mode();
mode6.getEffects().add(new DamageTargetEffect(new ManacostVariableValue(), true, "target creature with flying, then deals X damage to target creature without flying, then deals X damage to target player"));
mode6.getTargets().add(new TargetCreaturePermanent(filter));
mode6.getTargets().add(new TargetCreaturePermanent(filter2));
mode6.getTargets().add(new TargetPlayer());
this.getSpellAbility().addMode(mode6);
}
public ClanDefiance(final ClanDefiance card) {

View file

@ -45,7 +45,6 @@ import mage.filter.predicate.permanent.ControllerPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPlayer;
import mage.target.TargetSpell;
import mage.target.common.TargetCreaturePermanent;
@ -61,41 +60,25 @@ public class CrypticCommand extends CardImpl<CrypticCommand> {
this.color.setBlue(true);
// Choose two - Counter target spell; or return target permanent to its owner's hand; or tap all creatures your opponents control; or draw a card.
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// Choose two -
this.getSpellAbility().getModes().setMinModes(2);
this.getSpellAbility().getModes().setMaxModes(2);
// Counter target spell;
this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addTarget(new TargetSpell());
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
this.getSpellAbility().addEffect(new CounterSecondTargetEffect());
Mode mode1 = new Mode();
mode1.getTargets().add(new TargetSpell());
mode1.getEffects().add(new CounterTargetEffect());
mode1.getEffects().add(new CrypticCommandEffect());
this.getSpellAbility().addMode(mode1);
Mode mode2 = new Mode();
mode2.getTargets().add(new TargetSpell());
mode2.getEffects().add(new CounterTargetEffect());
mode2.getEffects().add(new DrawCardControllerEffect(1));
this.getSpellAbility().addMode(mode2);
Mode mode3 = new Mode();
mode3.getTargets().add(new TargetCreaturePermanent());
mode3.getEffects().add(new ReturnToHandTargetEffect());
mode3.getEffects().add(new CrypticCommandEffect());
this.getSpellAbility().addMode(mode3);
Mode mode4 = new Mode();
mode4.getTargets().add(new TargetCreaturePermanent());
mode4.getEffects().add(new ReturnToHandTargetEffect());
mode4.getEffects().add(new DrawCardControllerEffect(1));
this.getSpellAbility().addMode(mode4);
Mode mode5 = new Mode();
mode5.getTargets().add(new TargetPlayer());
mode5.getEffects().add(new CrypticCommandEffect());
mode5.getEffects().add(new DrawCardControllerEffect(1));
this.getSpellAbility().addMode(mode5);
// or return target permanent to its owner's hand;
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetCreaturePermanent());
this.getSpellAbility().getModes().addMode(mode);
// or tap all creatures your opponents control;
mode = new Mode();
mode.getEffects().add(new CrypticCommandEffect());
this.getSpellAbility().getModes().addMode(mode);
// or draw a card.
mode = new Mode();
mode.getEffects().add(new DrawCardControllerEffect(1));
this.getSpellAbility().getModes().addMode(mode);
}
public CrypticCommand(final CrypticCommand card) {

View file

@ -65,7 +65,10 @@ public class BranchingBolt extends CardImpl<BranchingBolt> {
this.color.setRed(true);
this.color.setGreen(true);
// Choose one or both - Branching Bolt deals 3 damage to target creature with flying;
// Choose one or both -
this.getSpellAbility().getModes().setMinModes(1);
this.getSpellAbility().getModes().setMaxModes(2);
// Branching Bolt deals 3 damage to target creature with flying;
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterFlying));
// or Branching Bolt deals 3 damage to target creature without flying.
@ -73,12 +76,6 @@ public class BranchingBolt extends CardImpl<BranchingBolt> {
mode.getEffects().add(new DamageTargetEffect(3));
mode.getTargets().add(new TargetCreaturePermanent(filterNotFlying));
this.getSpellAbility().addMode(mode);
// both
mode = new Mode();
mode.getEffects().add(new DamageTargetEffect(3));
mode.getTargets().add(new TargetCreaturePermanent(filterFlying));
mode.getTargets().add(new TargetCreaturePermanent(filterNotFlying));
this.getSpellAbility().addMode(mode);
}
public BranchingBolt(final BranchingBolt card) {

View file

@ -16,7 +16,17 @@ public class DearlyDepartedTest extends CardTestPlayerBase {
@Test
public void testEnteringWithCounters() {
addCard(Zone.BATTLEFIELD, playerA, "Plains", 5);
// Dearly Departed
// Creature Spirit 5/5, 4WW (6)
// Flying
// As long as Dearly Departed is in your graveyard, each Human creature you control enters the battlefield with an additional +1/+1 counter on it.
addCard(Zone.GRAVEYARD, playerA, "Dearly Departed");
/**
* Thraben Doomsayer
* Creature Human Cleric 2/2, 1WW (3)
* {T}: Put a 1/1 white Human creature token onto the battlefield.
* Fateful hour As long as you have 5 or less life, other creatures you control get +2/+2.
*/
addCard(Zone.BATTLEFIELD, playerA, "Thraben Doomsayer");
activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Put a 1/1 white Human creature token onto the battlefield.");