mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Merge origin/master
This commit is contained in:
commit
c8b79f5568
6 changed files with 174 additions and 4 deletions
52
Mage.Sets/src/mage/sets/modernmasters2015/Spellskite.java
Normal file
52
Mage.Sets/src/mage/sets/modernmasters2015/Spellskite.java
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.modernmasters2015;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author fireshoes
|
||||||
|
*/
|
||||||
|
public class Spellskite extends mage.sets.newphyrexia.Spellskite {
|
||||||
|
|
||||||
|
public Spellskite(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 230;
|
||||||
|
this.expansionSetCode = "MMB";
|
||||||
|
}
|
||||||
|
|
||||||
|
public Spellskite(final Spellskite card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Spellskite copy() {
|
||||||
|
return new Spellskite(this);
|
||||||
|
}
|
||||||
|
}
|
52
Mage.Sets/src/mage/sets/modernmasters2015/SplinterTwin.java
Normal file
52
Mage.Sets/src/mage/sets/modernmasters2015/SplinterTwin.java
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.modernmasters2015;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author fireshoes
|
||||||
|
*/
|
||||||
|
public class SplinterTwin extends mage.sets.riseoftheeldrazi.SplinterTwin {
|
||||||
|
|
||||||
|
public SplinterTwin(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 129;
|
||||||
|
this.expansionSetCode = "MMB";
|
||||||
|
}
|
||||||
|
|
||||||
|
public SplinterTwin(final SplinterTwin card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SplinterTwin copy() {
|
||||||
|
return new SplinterTwin(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -80,5 +80,44 @@ public class CrypticCommandTest extends CardTestPlayerBase {
|
||||||
assertHandCount(playerB, 0); // Because Cryptic Command has no legal target playerB does not draw a card and has 0 cards in hand
|
assertHandCount(playerB, 0); // Because Cryptic Command has no legal target playerB does not draw a card and has 0 cards in hand
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Game is not letting me play Ricochet Trap targetting oponent's Cryptic Command,
|
||||||
|
* modes 1 and 4. It only has one target and should be allowed
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testCommandChangeTarget() {
|
||||||
|
addCard(Zone.HAND, playerA, "Thoughtseize");
|
||||||
|
// Counter target spell. If that spell is countered this way, put it into its owner's hand instead of into that player's graveyard.
|
||||||
|
// Draw a card.
|
||||||
|
addCard(Zone.HAND, playerA, "Ricochet Trap");
|
||||||
|
addCard(Zone.HAND, playerA, "Lightning Bolt");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
||||||
|
|
||||||
|
addCard(Zone.HAND, playerB, "Cryptic Command");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Island", 4);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Thoughtseize", playerB);
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Cryptic Command", "Thoughtseize");
|
||||||
|
setModeChoice(playerB, "1"); // Counter target spell
|
||||||
|
setModeChoice(playerB, "4"); // Draw a card
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ricochet Trap", "Cryptic Command");
|
||||||
|
addTarget(playerA, "Lightning Bolt");
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.CLEANUP);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertLife(playerA, 18); // -2 from Thoughtseize
|
||||||
|
assertLife(playerB, 20);
|
||||||
|
|
||||||
|
assertGraveyardCount(playerA, "Ricochet Trap", 1);
|
||||||
|
assertGraveyardCount(playerA, "Thoughtseize", 1);
|
||||||
|
assertGraveyardCount(playerB, "Cryptic Command", 1);
|
||||||
|
assertGraveyardCount(playerA, "Lightning Bolt", 1);
|
||||||
|
|
||||||
|
assertHandCount(playerB, 1); // card drawn from Cryptic Command
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,7 @@ import mage.abilities.mana.ManaOptions;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.target.TargetSource;
|
import mage.target.TargetSource;
|
||||||
|
import mage.target.TargetSpell;
|
||||||
import mage.target.common.TargetCardInHand;
|
import mage.target.common.TargetCardInHand;
|
||||||
import mage.target.common.TargetPermanentOrPlayer;
|
import mage.target.common.TargetPermanentOrPlayer;
|
||||||
|
|
||||||
|
@ -445,6 +446,26 @@ public class TestPlayer extends ComputerPlayer {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (target instanceof TargetSpell) {
|
||||||
|
for (String targetDefinition: targets) {
|
||||||
|
String[] targetList = targetDefinition.split("\\^");
|
||||||
|
boolean targetFound = false;
|
||||||
|
for (String targetName: targetList) {
|
||||||
|
for(StackObject stackObject: game.getStack()) {
|
||||||
|
if (stackObject.getName().equals(targetName)) {
|
||||||
|
target.add(stackObject.getId(), game);
|
||||||
|
targetFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (targetFound) {
|
||||||
|
targets.remove(targetDefinition);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return super.chooseTarget(outcome, target, source, game);
|
return super.chooseTarget(outcome, target, source, game);
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
*/
|
*/
|
||||||
package mage.filter.predicate.mageobject;
|
package mage.filter.predicate.mageobject;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
|
import mage.abilities.Mode;
|
||||||
import mage.filter.predicate.Predicate;
|
import mage.filter.predicate.Predicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
|
@ -50,11 +52,13 @@ public class NumberOfTargetsPredicate implements Predicate<MageObject> {
|
||||||
public boolean apply(MageObject input, Game game) {
|
public boolean apply(MageObject input, Game game) {
|
||||||
Spell spell = game.getStack().getSpell(input.getId());
|
Spell spell = game.getStack().getSpell(input.getId());
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
Targets spellTargets = spell.getSpellAbility().getTargets();
|
|
||||||
int numberOfTargets = 0;
|
int numberOfTargets = 0;
|
||||||
for (Target target : spellTargets) {
|
for (UUID modeId : spell.getSpellAbility().getModes().getSelectedModes()) {
|
||||||
|
Mode mode = spell.getSpellAbility().getModes().get(modeId);
|
||||||
|
for (Target target : mode.getTargets()) {
|
||||||
numberOfTargets += target.getTargets().size();
|
numberOfTargets += target.getTargets().size();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (numberOfTargets == targets) {
|
if (numberOfTargets == targets) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25943,7 +25943,9 @@ Forest|Dragons of Tarkir|264|L||Basic Land - Forest|||G|
|
||||||
Emrakul, the Aeons Torn|Modern Masters 2015|3|M|{15}|Legendary Creature - Eldrazi|15|15|Emrakul, the Aeons Torn can't be countered.$When you cast Emrakul, take an extra turn after this one.$Flying, protection from colored spells, annihilator 6$When Emrakul is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library.|
|
Emrakul, the Aeons Torn|Modern Masters 2015|3|M|{15}|Legendary Creature - Eldrazi|15|15|Emrakul, the Aeons Torn can't be countered.$When you cast Emrakul, take an extra turn after this one.$Flying, protection from colored spells, annihilator 6$When Emrakul is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library.|
|
||||||
Karn Liberated|Modern Masters 2015|4|M|{7}|Planeswalker - Karn|||+4: Target player exiles a card from his or her hand.$-3: Exile target permanent.$-14: Restart the game, leaving in exile all non-Aura permanent cards exiled with Karn Liberated. Then put those cards onto the battlefield under your control.|
|
Karn Liberated|Modern Masters 2015|4|M|{7}|Planeswalker - Karn|||+4: Target player exiles a card from his or her hand.$-3: Exile target permanent.$-14: Restart the game, leaving in exile all non-Aura permanent cards exiled with Karn Liberated. Then put those cards onto the battlefield under your control.|
|
||||||
Vendilion Clique|Modern Masters 2015|67|M|{1}{U}{U}|Legendary Creature Faerie Wizard|3|1|Flash$Flying$When Vendilion Clique enters the battlefield, look at target player's hand. You may choose a nonland card from it. If you do, that player reveals the chosen card, puts it on the bottom of his or her library, then draws a card.|
|
Vendilion Clique|Modern Masters 2015|67|M|{1}{U}{U}|Legendary Creature Faerie Wizard|3|1|Flash$Flying$When Vendilion Clique enters the battlefield, look at target player's hand. You may choose a nonland card from it. If you do, that player reveals the chosen card, puts it on the bottom of his or her library, then draws a card.|
|
||||||
|
Splinter Twin|Modern Masters 2015|129|R|{2}{R}{R}|Enchantment - Aura|||Enchant creature$Enchanted creature has "{T}: Put a token that's a copy of this creature onto the battlefield. That token has haste. Exile it at the beginning of the next end step."|
|
||||||
Tarmogoyf|Modern Masters 2015|165|M|{1}{G}|Creature - Lhurgoyf|*|1+*|Tarmogoyf's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1. <i>(Artifact, creature, enchantment, instant, land, planeswalker, sorcery, and tribal are card types.)</i>|
|
Tarmogoyf|Modern Masters 2015|165|M|{1}{G}|Creature - Lhurgoyf|*|1+*|Tarmogoyf's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1. <i>(Artifact, creature, enchantment, instant, land, planeswalker, sorcery, and tribal are card types.)</i>|
|
||||||
|
Spellskite|Modern Masters 2015|230|R|{2}|Artifact Creature - Horror|0|4|{UP}: Change a target of target spell or ability to Spellskite. <i>({UP} can be paid with either {U} or 2 life.)</i>|
|
||||||
Liliana, Heretical Healer|Magic Origins|106|M|{1}{B}{B}|Legendary Creature - Human Cleric|2|3|Lifelink$Whenever another nontoken creature you control dies, exile Liliana, Heretical Healer, then return her to the battlefield transformed under her owner's control. If you do, put a 2/2 black Zombie creature token onto the battlefield.|
|
Liliana, Heretical Healer|Magic Origins|106|M|{1}{B}{B}|Legendary Creature - Human Cleric|2|3|Lifelink$Whenever another nontoken creature you control dies, exile Liliana, Heretical Healer, then return her to the battlefield transformed under her owner's control. If you do, put a 2/2 black Zombie creature token onto the battlefield.|
|
||||||
Liliana, Defiant Necromancer|Magic Origins|106|M||Planeswalker - Liliana|||+2: Each player discards a card.$-X: Return target nonlegendary creature card with converted mana cost X from your graveyard to the battlefield.$-8: You get an emble with "Whenever a creature dies, return it to the battlefield under your control at the beginning of the next end step."|
|
Liliana, Defiant Necromancer|Magic Origins|106|M||Planeswalker - Liliana|||+2: Each player discards a card.$-X: Return target nonlegendary creature card with converted mana cost X from your graveyard to the battlefield.$-8: You get an emble with "Whenever a creature dies, return it to the battlefield under your control at the beginning of the next end step."|
|
||||||
Ambush Commander|Duel Decks: Anthology, Elves vs. Goblins|1|R|{3}{G}{G}|Creature - Elf|2|2|Forests you control are 1/1 green Elf creatures that are still lands.${1}{G}, Sacrifice an Elf: Target creature gets +3/+3 until end of turn.|
|
Ambush Commander|Duel Decks: Anthology, Elves vs. Goblins|1|R|{3}{G}{G}|Creature - Elf|2|2|Forests you control are 1/1 green Elf creatures that are still lands.${1}{G}, Sacrifice an Elf: Target creature gets +3/+3 until end of turn.|
|
||||||
|
|
Loading…
Reference in a new issue