mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
- See b9bee56
This commit is contained in:
parent
b068d10c44
commit
6f9db86eb9
4 changed files with 104 additions and 41 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -36,16 +35,24 @@ public final class BrainInAJar extends CardImpl {
|
||||||
public BrainInAJar(UUID ownerId, CardSetInfo setInfo) {
|
public BrainInAJar(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||||
|
|
||||||
// {1}, {T}: Put a charge counter on Brain in a Jar, then you may cast an instant or sorcery card with converted mana costs equal to the number of charge counters on Brain in a Jar from your hand without paying its mana cost.
|
// {1}, {T}: Put a charge counter on Brain in a Jar, then you may
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), new GenericManaCost(1));
|
// cast an instant or sorcery card with converted mana costs equal
|
||||||
|
// to the number of charge counters on Brain in a Jar from your
|
||||||
|
// hand without paying its mana cost.
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||||
|
new AddCountersSourceEffect(CounterType.CHARGE.createInstance()),
|
||||||
|
new GenericManaCost(1));
|
||||||
ability.addEffect(new BrainInAJarCastEffect());
|
ability.addEffect(new BrainInAJarCastEffect());
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// {3}, {T}, Remove X charge counters from Brain in a Jar: Scry X.
|
// {3}, {T}, Remove X charge counters from Brain in a Jar: Scry X.
|
||||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BrainInAJarScryEffect(), new GenericManaCost(3));
|
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||||
|
new BrainInAJarScryEffect(),
|
||||||
|
new GenericManaCost(3));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance()));
|
ability.addCost(new RemoveVariableCountersSourceCost(
|
||||||
|
CounterType.CHARGE.createInstance()));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,8 +69,10 @@ public final class BrainInAJar extends CardImpl {
|
||||||
class BrainInAJarCastEffect extends OneShotEffect {
|
class BrainInAJarCastEffect extends OneShotEffect {
|
||||||
|
|
||||||
public BrainInAJarCastEffect() {
|
public BrainInAJarCastEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.PlayForFree);
|
||||||
this.staticText = ", then you may cast an instant or sorcery card with converted mana costs equal to the number of charge counters on {this} from your hand without paying its mana cost";
|
this.staticText = ", then you may cast an instant or sorcery card "
|
||||||
|
+ "with converted mana costs equal to the number of charge "
|
||||||
|
+ "counters on {this} from your hand without paying its mana cost";
|
||||||
}
|
}
|
||||||
|
|
||||||
public BrainInAJarCastEffect(final BrainInAJarCastEffect effect) {
|
public BrainInAJarCastEffect(final BrainInAJarCastEffect effect) {
|
||||||
|
@ -79,17 +88,26 @@ class BrainInAJarCastEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
Permanent sourceObject = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
Permanent sourceObject = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||||
if (controller != null && sourceObject != null) {
|
if (controller != null
|
||||||
|
&& sourceObject != null) {
|
||||||
int counters = sourceObject.getCounters(game).getCount(CounterType.CHARGE);
|
int counters = sourceObject.getCounters(game).getCount(CounterType.CHARGE);
|
||||||
FilterCard filter = new FilterInstantOrSorceryCard();
|
FilterCard filter = new FilterInstantOrSorceryCard();
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, counters));
|
filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, counters));
|
||||||
int cardsToCast = controller.getHand().count(filter, source.getControllerId(), source.getSourceId(), game);
|
int cardsToCast = controller.getHand().count(filter, source.getControllerId(),
|
||||||
if (cardsToCast > 0 && controller.chooseUse(outcome, "Cast an instant or sorcery card with converted mana costs of " + counters + " from your hand without paying its mana cost?", source, game)) {
|
source.getSourceId(), game);
|
||||||
|
if (cardsToCast > 0
|
||||||
|
&& controller.chooseUse(Outcome.PlayForFree,
|
||||||
|
"Cast an instant or sorcery card with converted mana costs of "
|
||||||
|
+ counters + " from your hand without paying its mana cost?",
|
||||||
|
source, game)) {
|
||||||
TargetCardInHand target = new TargetCardInHand(filter);
|
TargetCardInHand target = new TargetCardInHand(filter);
|
||||||
controller.chooseTarget(outcome, target, source, game);
|
controller.chooseTarget(outcome, target, source, game);
|
||||||
Card card = game.getCard(target.getFirstTarget());
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
controller.cast(card.getSpellAbility(), game, true, new MageObjectReference(source.getSourceObject(game), game));
|
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), Boolean.TRUE);
|
||||||
|
controller.cast(controller.chooseAbilityForCast(card, game, true),
|
||||||
|
game, true, new MageObjectReference(source.getSourceObject(game), game));
|
||||||
|
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -38,7 +38,8 @@ public final class ChandraPyromaster extends CardImpl {
|
||||||
|
|
||||||
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4));
|
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4));
|
||||||
|
|
||||||
// +1: Chandra, Pyromaster deals 1 damage to target player and 1 damage to up to one target creature that player controls. That creature can't block this turn.
|
// +1: Chandra, Pyromaster deals 1 damage to target player and 1 damage to
|
||||||
|
// up to one target creature that player controls. That creature can't block this turn.
|
||||||
LoyaltyAbility ability1 = new LoyaltyAbility(new ChandraPyromasterEffect1(), 1);
|
LoyaltyAbility ability1 = new LoyaltyAbility(new ChandraPyromasterEffect1(), 1);
|
||||||
Target target1 = new TargetPlayerOrPlaneswalker();
|
Target target1 = new TargetPlayerOrPlaneswalker();
|
||||||
ability1.addTarget(target1);
|
ability1.addTarget(target1);
|
||||||
|
@ -49,7 +50,9 @@ public final class ChandraPyromaster extends CardImpl {
|
||||||
LoyaltyAbility ability2 = new LoyaltyAbility(new ChandraPyromasterEffect2(), 0);
|
LoyaltyAbility ability2 = new LoyaltyAbility(new ChandraPyromasterEffect2(), 0);
|
||||||
this.addAbility(ability2);
|
this.addAbility(ability2);
|
||||||
|
|
||||||
// -7: Exile the top ten cards of your library. Choose an instant or sorcery card exiled this way and copy it three times. You may cast the copies without paying their mana costs.
|
// -7: Exile the top ten cards of your library. Choose an instant or sorcery
|
||||||
|
// card exiled this way and copy it three times. You may cast the copies
|
||||||
|
// without paying their mana costs.
|
||||||
LoyaltyAbility ability3 = new LoyaltyAbility(new ChandraPyromasterEffect3(), -7);
|
LoyaltyAbility ability3 = new LoyaltyAbility(new ChandraPyromasterEffect3(), -7);
|
||||||
this.addAbility(ability3);
|
this.addAbility(ability3);
|
||||||
|
|
||||||
|
@ -69,7 +72,9 @@ class ChandraPyromasterEffect1 extends OneShotEffect {
|
||||||
|
|
||||||
public ChandraPyromasterEffect1() {
|
public ChandraPyromasterEffect1() {
|
||||||
super(Outcome.Damage);
|
super(Outcome.Damage);
|
||||||
staticText = "{this} deals 1 damage to target player or planeswalker and 1 damage to up to one target creature that player or that planeswalker's controller controls. That creature can't block this turn.";
|
staticText = "{this} deals 1 damage to target player or planeswalker "
|
||||||
|
+ "and 1 damage to up to one target creature that player or that "
|
||||||
|
+ "planeswalker's controller controls. That creature can't block this turn.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChandraPyromasterEffect1(final ChandraPyromasterEffect1 effect) {
|
public ChandraPyromasterEffect1(final ChandraPyromasterEffect1 effect) {
|
||||||
|
@ -83,7 +88,8 @@ class ChandraPyromasterEffect1 extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
game.damagePlayerOrPlaneswalker(source.getTargets().get(0).getFirstTarget(), 1, source.getSourceId(), game, false, true);
|
game.damagePlayerOrPlaneswalker(source.getTargets().get(0).getFirstTarget(),
|
||||||
|
1, source.getSourceId(), game, false, true);
|
||||||
Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||||
if (creature != null) {
|
if (creature != null) {
|
||||||
creature.damage(1, source.getSourceId(), game, false, true);
|
creature.damage(1, source.getSourceId(), game, false, true);
|
||||||
|
@ -98,7 +104,8 @@ class ChandraPyromasterEffect1 extends OneShotEffect {
|
||||||
class ChandraPyromasterTarget extends TargetPermanent {
|
class ChandraPyromasterTarget extends TargetPermanent {
|
||||||
|
|
||||||
public ChandraPyromasterTarget() {
|
public ChandraPyromasterTarget() {
|
||||||
super(0, 1, new FilterCreaturePermanent("creature that the targeted player or planeswalker's controller controls"), false);
|
super(0, 1, new FilterCreaturePermanent("creature that the targeted player "
|
||||||
|
+ "or planeswalker's controller controls"), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChandraPyromasterTarget(final ChandraPyromasterTarget target) {
|
public ChandraPyromasterTarget(final ChandraPyromasterTarget target) {
|
||||||
|
@ -179,7 +186,8 @@ class ChandraPyromasterEffect2 extends OneShotEffect {
|
||||||
Card card = controller.getLibrary().getFromTop(game);
|
Card card = controller.getLibrary().getFromTop(game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
controller.moveCards(card, Zone.EXILED, source, game);
|
controller.moveCards(card, Zone.EXILED, source, game);
|
||||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.EndOfTurn);
|
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(
|
||||||
|
Zone.EXILED, Duration.EndOfTurn);
|
||||||
effect.setTargetPointer(new FixedTarget(card, game));
|
effect.setTargetPointer(new FixedTarget(card, game));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
}
|
}
|
||||||
|
@ -192,8 +200,10 @@ class ChandraPyromasterEffect2 extends OneShotEffect {
|
||||||
class ChandraPyromasterEffect3 extends OneShotEffect {
|
class ChandraPyromasterEffect3 extends OneShotEffect {
|
||||||
|
|
||||||
public ChandraPyromasterEffect3() {
|
public ChandraPyromasterEffect3() {
|
||||||
super(Outcome.PutCardInPlay);
|
super(Outcome.PlayForFree);
|
||||||
this.staticText = "Exile the top ten cards of your library. Choose an instant or sorcery card exiled this way and copy it three times. You may cast the copies without paying their mana costs";
|
this.staticText = "Exile the top ten cards of your library. Choose an instant "
|
||||||
|
+ "or sorcery card exiled this way and copy it three times. "
|
||||||
|
+ "You may cast the copies without paying their mana costs";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChandraPyromasterEffect3(final ChandraPyromasterEffect3 effect) {
|
public ChandraPyromasterEffect3(final ChandraPyromasterEffect3 effect) {
|
||||||
|
@ -223,15 +233,24 @@ class ChandraPyromasterEffect3 extends OneShotEffect {
|
||||||
MageObjectReference mor = new MageObjectReference(source.getSourceObject(game), game);
|
MageObjectReference mor = new MageObjectReference(source.getSourceObject(game), game);
|
||||||
if (controller.chooseUse(outcome, "Do you wish to cast copy 1 of " + card.getName(), source, game)) {
|
if (controller.chooseUse(outcome, "Do you wish to cast copy 1 of " + card.getName(), source, game)) {
|
||||||
Card copy1 = game.copyCard(card, source, source.getControllerId());
|
Card copy1 = game.copyCard(card, source, source.getControllerId());
|
||||||
controller.cast(copy1.getSpellAbility(), game, true, mor);
|
game.getState().setValue("PlayFromNotOwnHandZone" + copy1.getId(), Boolean.TRUE);
|
||||||
|
controller.cast(controller.chooseAbilityForCast(copy1, game, true),
|
||||||
|
game, true, mor);
|
||||||
|
game.getState().setValue("PlayFromNotOwnHandZone" + copy1.getId(), null);
|
||||||
}
|
}
|
||||||
if (controller.chooseUse(outcome, "Do you wish to cast copy 2 of " + card.getName(), source, game)) {
|
if (controller.chooseUse(outcome, "Do you wish to cast copy 2 of " + card.getName(), source, game)) {
|
||||||
Card copy2 = game.copyCard(card, source, source.getControllerId());
|
Card copy2 = game.copyCard(card, source, source.getControllerId());
|
||||||
controller.cast(copy2.getSpellAbility(), game, true, mor);
|
game.getState().setValue("PlayFromNotOwnHandZone" + copy2.getId(), Boolean.TRUE);
|
||||||
|
controller.cast(controller.chooseAbilityForCast(copy2, game, true),
|
||||||
|
game, true, mor);
|
||||||
|
game.getState().setValue("PlayFromNotOwnHandZone" + copy2.getId(), null);
|
||||||
}
|
}
|
||||||
if (controller.chooseUse(outcome, "Do you wish to cast copy 3 of " + card.getName(), source, game)) {
|
if (controller.chooseUse(outcome, "Do you wish to cast copy 3 of " + card.getName(), source, game)) {
|
||||||
Card copy3 = game.copyCard(card, source, source.getControllerId());
|
Card copy3 = game.copyCard(card, source, source.getControllerId());
|
||||||
controller.cast(copy3.getSpellAbility(), game, true, mor);
|
game.getState().setValue("PlayFromNotOwnHandZone" + copy3.getId(), Boolean.TRUE);
|
||||||
|
controller.cast(controller.chooseAbilityForCast(copy3, game, true),
|
||||||
|
game, true, mor);
|
||||||
|
game.getState().setValue("PlayFromNotOwnHandZone" + copy3.getId(), null);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.o;
|
package mage.cards.o;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -43,10 +42,12 @@ public final class OracleOfBones extends CardImpl {
|
||||||
this.addAbility(HasteAbility.getInstance());
|
this.addAbility(HasteAbility.getInstance());
|
||||||
// Tribute 2
|
// Tribute 2
|
||||||
this.addAbility(new TributeAbility(2));
|
this.addAbility(new TributeAbility(2));
|
||||||
// When Oracle of Bones enters the battlefield, if tribute wasn't paid, you may cast an instant or sorcery card from your hand without paying its mana cost.
|
// When Oracle of Bones enters the battlefield, if tribute wasn't paid,
|
||||||
|
// you may cast an instant or sorcery card from your hand without paying its mana cost.
|
||||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new OracleOfBonesCastEffect(), false);
|
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new OracleOfBonesCastEffect(), false);
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance,
|
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance,
|
||||||
"When {this} enters the battlefield, if its tribute wasn't paid, you may cast an instant or sorcery card from your hand without paying its mana cost."));
|
"When {this} enters the battlefield, if its tribute wasn't paid, "
|
||||||
|
+ "you may cast an instant or sorcery card from your hand without paying its mana cost."));
|
||||||
}
|
}
|
||||||
|
|
||||||
public OracleOfBones(final OracleOfBones card) {
|
public OracleOfBones(final OracleOfBones card) {
|
||||||
|
@ -61,11 +62,13 @@ public final class OracleOfBones extends CardImpl {
|
||||||
|
|
||||||
class OracleOfBonesCastEffect extends OneShotEffect {
|
class OracleOfBonesCastEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterInstantOrSorceryCard("instant or sorcery card from your hand");
|
private static final FilterCard filter = new FilterInstantOrSorceryCard(
|
||||||
|
"instant or sorcery card from your hand");
|
||||||
|
|
||||||
public OracleOfBonesCastEffect() {
|
public OracleOfBonesCastEffect() {
|
||||||
super(Outcome.PlayForFree);
|
super(Outcome.PlayForFree);
|
||||||
this.staticText = "you may cast an instant or sorcery card from your hand without paying its mana cost";
|
this.staticText = "you may cast an instant or sorcery card "
|
||||||
|
+ "from your hand without paying its mana cost";
|
||||||
}
|
}
|
||||||
|
|
||||||
public OracleOfBonesCastEffect(final OracleOfBonesCastEffect effect) {
|
public OracleOfBonesCastEffect(final OracleOfBonesCastEffect effect) {
|
||||||
|
@ -83,13 +86,16 @@ class OracleOfBonesCastEffect extends OneShotEffect {
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
Target target = new TargetCardInHand(filter);
|
Target target = new TargetCardInHand(filter);
|
||||||
if (target.canChoose(source.getSourceId(), controller.getId(), game)
|
if (target.canChoose(source.getSourceId(), controller.getId(), game)
|
||||||
&& controller.chooseUse(outcome, "Cast an instant or sorcery card from your hand without paying its mana cost?", source, game)) {
|
&& controller.chooseUse(outcome, "Cast an instant or sorcery "
|
||||||
|
+ "card from your hand without paying its mana cost?", source, game)) {
|
||||||
Card cardToCast = null;
|
Card cardToCast = null;
|
||||||
boolean cancel = false;
|
boolean cancel = false;
|
||||||
while (controller.canRespond() && !cancel) {
|
while (controller.canRespond()
|
||||||
|
&& !cancel) {
|
||||||
if (controller.chooseTarget(outcome, target, source, game)) {
|
if (controller.chooseTarget(outcome, target, source, game)) {
|
||||||
cardToCast = game.getCard(target.getFirstTarget());
|
cardToCast = game.getCard(target.getFirstTarget());
|
||||||
if (cardToCast != null && cardToCast.getSpellAbility().canChooseTarget(game)) {
|
if (cardToCast != null
|
||||||
|
&& cardToCast.getSpellAbility().canChooseTarget(game)) {
|
||||||
cancel = true;
|
cancel = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -97,7 +103,10 @@ class OracleOfBonesCastEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cardToCast != null) {
|
if (cardToCast != null) {
|
||||||
controller.cast(cardToCast.getSpellAbility(), game, true, new MageObjectReference(source.getSourceObject(game), game));
|
game.getState().setValue("PlayFromNotOwnHandZone" + cardToCast.getId(), Boolean.TRUE);
|
||||||
|
controller.cast(controller.chooseAbilityForCast(cardToCast, game, true),
|
||||||
|
game, true, new MageObjectReference(source.getSourceObject(game), game));
|
||||||
|
game.getState().setValue("PlayFromNotOwnHandZone" + cardToCast.getId(), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -26,8 +25,10 @@ import mage.target.common.TargetCardInYourGraveyard;
|
||||||
*/
|
*/
|
||||||
public final class Spelltwine extends CardImpl {
|
public final class Spelltwine extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCard("instant or sorcery card from your graveyard");
|
private static final FilterCard filter = new FilterCard(
|
||||||
private static final FilterCard filter2 = new FilterCard("instant or sorcery card from an opponent's graveyard");
|
"instant or sorcery card from your graveyard");
|
||||||
|
private static final FilterCard filter2 = new FilterCard(
|
||||||
|
"instant or sorcery card from an opponent's graveyard");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(Predicates.or(
|
filter.add(Predicates.or(
|
||||||
|
@ -42,7 +43,9 @@ public final class Spelltwine extends CardImpl {
|
||||||
public Spelltwine(UUID ownerId, CardSetInfo setInfo) {
|
public Spelltwine(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{U}");
|
||||||
|
|
||||||
// Exile target instant or sorcery card from your graveyard and target instant or sorcery card from an opponent's graveyard. Copy those cards. Cast the copies if able without paying their mana costs. Exile Spelltwine.
|
// Exile target instant or sorcery card from your graveyard and target
|
||||||
|
// instant or sorcery card from an opponent's graveyard. Copy those cards.
|
||||||
|
// Cast the copies if able without paying their mana costs. Exile Spelltwine.
|
||||||
this.getSpellAbility().addEffect(new SpelltwineEffect());
|
this.getSpellAbility().addEffect(new SpelltwineEffect());
|
||||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
|
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
|
||||||
this.getSpellAbility().addTarget(new TargetCardInOpponentsGraveyard(filter2));
|
this.getSpellAbility().addTarget(new TargetCardInOpponentsGraveyard(filter2));
|
||||||
|
@ -64,7 +67,9 @@ class SpelltwineEffect extends OneShotEffect {
|
||||||
|
|
||||||
public SpelltwineEffect() {
|
public SpelltwineEffect() {
|
||||||
super(Outcome.PlayForFree);
|
super(Outcome.PlayForFree);
|
||||||
staticText = "Exile target instant or sorcery card from your graveyard and target instant or sorcery card from an opponent's graveyard. Copy those cards. Cast the copies if able without paying their mana costs";
|
staticText = "Exile target instant or sorcery card from your graveyard and "
|
||||||
|
+ "target instant or sorcery card from an opponent's graveyard. "
|
||||||
|
+ "Copy those cards. Cast the copies if able without paying their mana costs";
|
||||||
}
|
}
|
||||||
|
|
||||||
public SpelltwineEffect(final SpelltwineEffect effect) {
|
public SpelltwineEffect(final SpelltwineEffect effect) {
|
||||||
|
@ -85,18 +90,30 @@ class SpelltwineEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
boolean castCardOne = true;
|
boolean castCardOne = true;
|
||||||
MageObjectReference mor = new MageObjectReference(source.getSourceObject(game), game);
|
MageObjectReference mor = new MageObjectReference(source.getSourceObject(game), game);
|
||||||
if (cardOne != null && controller.chooseUse(Outcome.Neutral, "Cast the copy of " + cardOne.getName() + " first?", source, game)) {
|
if (cardOne != null
|
||||||
|
&& controller.chooseUse(Outcome.Neutral, "Cast the copy of "
|
||||||
|
+ cardOne.getName() + " first?", source, game)) {
|
||||||
Card copyOne = game.copyCard(cardOne, source, controller.getId());
|
Card copyOne = game.copyCard(cardOne, source, controller.getId());
|
||||||
controller.cast(copyOne.getSpellAbility(), game, true, mor);
|
game.getState().setValue("PlayFromNotOwnHandZone" + copyOne.getId(), Boolean.TRUE);
|
||||||
|
controller.cast(controller.chooseAbilityForCast(copyOne, game, true),
|
||||||
|
game, true, mor);
|
||||||
|
game.getState().setValue("PlayFromNotOwnHandZone" + copyOne.getId(), null);
|
||||||
castCardOne = false;
|
castCardOne = false;
|
||||||
}
|
}
|
||||||
if (cardTwo != null) {
|
if (cardTwo != null) {
|
||||||
Card copyTwo = game.copyCard(cardTwo, source, controller.getId());
|
Card copyTwo = game.copyCard(cardTwo, source, controller.getId());
|
||||||
controller.cast(copyTwo.getSpellAbility(), game, true, mor);
|
game.getState().setValue("PlayFromNotOwnHandZone" + copyTwo.getId(), Boolean.TRUE);
|
||||||
|
controller.cast(controller.chooseAbilityForCast(copyTwo, game, true),
|
||||||
|
game, true, mor);
|
||||||
|
game.getState().setValue("PlayFromNotOwnHandZone" + copyTwo.getId(), null);
|
||||||
}
|
}
|
||||||
if (cardOne != null && castCardOne) {
|
if (cardOne != null
|
||||||
|
&& castCardOne) {
|
||||||
Card copyOne = game.copyCard(cardOne, source, controller.getId());
|
Card copyOne = game.copyCard(cardOne, source, controller.getId());
|
||||||
controller.cast(copyOne.getSpellAbility(), game, true, mor);
|
game.getState().setValue("PlayFromNotOwnHandZone" + copyOne.getId(), Boolean.TRUE);
|
||||||
|
controller.cast(controller.chooseAbilityForCast(copyOne, game, true),
|
||||||
|
game, true, mor);
|
||||||
|
game.getState().setValue("PlayFromNotOwnHandZone" + copyOne.getId(), null);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue