forked from External/mage
Implemented Boneyard Parley
This commit is contained in:
parent
da7ff83478
commit
8e464f89a7
3 changed files with 166 additions and 0 deletions
162
Mage.Sets/src/mage/cards/b/BoneyardParley.java
Normal file
162
Mage.Sets/src/mage/cards/b/BoneyardParley.java
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
/*
|
||||
* 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.cards.b;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class BoneyardParley extends CardImpl {
|
||||
|
||||
public BoneyardParley(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{B}{B}");
|
||||
|
||||
// Exile up to five target creature cards from graveyards. An opponent separates those cards into two piles. Put all cards from the pile of your choice onto the battlefield under your control and the rest into their owners' graveyards.
|
||||
this.getSpellAbility().addEffect(new BoneyardParleyEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCardInGraveyard(0, 5, new FilterCard("cards from graveyards")));
|
||||
}
|
||||
|
||||
public BoneyardParley(final BoneyardParley card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BoneyardParley copy() {
|
||||
return new BoneyardParley(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BoneyardParleyEffect extends OneShotEffect {
|
||||
|
||||
BoneyardParleyEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Exile up to five target creature cards from graveyards. "
|
||||
+ "An opponent separates those cards into two piles. "
|
||||
+ "Put all cards from the pile of your choice onto the battlefield under your control "
|
||||
+ "and the rest into their owners' graveyards";
|
||||
}
|
||||
|
||||
BoneyardParleyEffect(final BoneyardParleyEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BoneyardParleyEffect copy() {
|
||||
return new BoneyardParleyEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
Cards cards = new CardsImpl();
|
||||
for (Target target : source.getTargets()) {
|
||||
for (UUID cardId : target.getTargets()) {
|
||||
cards.add(cardId);
|
||||
}
|
||||
}
|
||||
if (!cards.isEmpty() && player.moveCards(cards, Zone.EXILED, source, game)) {
|
||||
TargetOpponent targetOpponent = new TargetOpponent(true);
|
||||
if (player.choose(Outcome.Neutral, targetOpponent, source.getSourceId(), game)) {
|
||||
Player opponent = game.getPlayer(targetOpponent.getFirstTarget());
|
||||
if (opponent != null) {
|
||||
TargetCard targetCards = new TargetCard(0, cards.size(), Zone.EXILED, new FilterCard("cards to put in the first pile"));
|
||||
List<Card> pile1 = new ArrayList<>();
|
||||
if (opponent.choose(Outcome.Neutral, cards, targetCards, game)) {
|
||||
List<UUID> targets = targetCards.getTargets();
|
||||
for (UUID targetId : targets) {
|
||||
Card card = cards.get(targetId, game);
|
||||
if (card != null) {
|
||||
pile1.add(card);
|
||||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
List<Card> pile2 = new ArrayList<>();
|
||||
pile2.addAll(cards.getCards(game));
|
||||
boolean choice = player.choosePile(outcome, "Choose a pile to put onto the battlefield.", pile1, pile2, game);
|
||||
|
||||
Zone pile1Zone = Zone.GRAVEYARD;
|
||||
Zone pile2Zone = Zone.BATTLEFIELD;
|
||||
if (choice) {
|
||||
pile1Zone = Zone.BATTLEFIELD;
|
||||
pile2Zone = Zone.GRAVEYARD;
|
||||
}
|
||||
Set<Card> pile1Set = new HashSet<>();
|
||||
Set<Card> pile2Set = new HashSet<>();
|
||||
pile1Set.addAll(pile1);
|
||||
pile2Set.addAll(pile2);
|
||||
|
||||
// Cards toBattlefield = new CardsImpl();
|
||||
// Cards toGraveyard = new CardsImpl();
|
||||
//
|
||||
// if (pile1Zone == Zone.BATTLEFIELD) {
|
||||
// toBattlefield.addAll(pile1);
|
||||
// toGraveyard.addAll(pile2);
|
||||
// } else {
|
||||
// toBattlefield.addAll(pile2);
|
||||
// toGraveyard.addAll(pile1);
|
||||
// }
|
||||
player.moveCards(pile1Set, pile1Zone, source, game, false, false, false, null);
|
||||
player.moveCards(pile2Set, pile2Zone, source, game, false, false, false, null);
|
||||
|
||||
// StringBuilder sb = new StringBuilder("Pile 1, going to ").append(pile1Zone == Zone.BATTLEFIELD ? "Battlefield" : "Graveyard").append(": ");
|
||||
// game.informPlayers(sb.toString());
|
||||
// sb = new StringBuilder("Pile 2, going to ").append(pile2Zone == Zone.BATTLEFIELD ? "Battlefield" : "Graveyard").append(':');
|
||||
// game.informPlayers(sb.toString());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -38,6 +38,7 @@ public class Ixalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Belligerent Brontodon", 218, Rarity.UNCOMMON, mage.cards.m.BelligerentBrontodon.class));
|
||||
cards.add(new SetCardInfo("Bellowing Aegisaur", 4, Rarity.UNCOMMON, mage.cards.b.BellowingAegisaur.class));
|
||||
cards.add(new SetCardInfo("Bloodcrazed Paladin", 93, Rarity.RARE, mage.cards.b.BloodcrazedPaladin.class));
|
||||
cards.add(new SetCardInfo("Boneyard Parley", 94, Rarity.MYTHIC, mage.cards.b.BoneyardParley.class));
|
||||
cards.add(new SetCardInfo("Burning Sun's Avatar", 135, Rarity.RARE, mage.cards.b.BurningSunsAvatar.class));
|
||||
cards.add(new SetCardInfo("Call to the Feast", 219, Rarity.UNCOMMON, mage.cards.c.CallToTheFeast.class));
|
||||
cards.add(new SetCardInfo("Captain Lannery Storm", 136, Rarity.RARE, mage.cards.c.CaptainLanneryStorm.class));
|
||||
|
|
@ -113,6 +114,7 @@ public class Ixalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Slice in Twain", 207, Rarity.UNCOMMON, mage.cards.s.SliceinTwain.class));
|
||||
cards.add(new SetCardInfo("Sorcerous Spyglass", 248, Rarity.RARE, mage.cards.s.SorcerousSpyglass.class));
|
||||
cards.add(new SetCardInfo("Spires of Orazca", 249, Rarity.RARE, mage.cards.s.SpiresOfOrazca.class));
|
||||
cards.add(new SetCardInfo("Spell Pierce", 81, Rarity.RARE, mage.cards.s.SpellPierce.class));
|
||||
cards.add(new SetCardInfo("Star of Extinction", 161, Rarity.MYTHIC, mage.cards.s.StarOfExtinction.class));
|
||||
cards.add(new SetCardInfo("Stone Quarry", 289, Rarity.COMMON, mage.cards.s.StoneQuarry.class));
|
||||
cards.add(new SetCardInfo("Storm Fleet Aerialist", 63, Rarity.UNCOMMON, mage.cards.s.StormFleetAerialist.class));
|
||||
|
|
|
|||
|
|
@ -32331,6 +32331,7 @@ Cinder Barrens|Hour of Devastation|209|C||Land|||Cinder Barrens enters the battl
|
|||
Ashes of the Abhorrent|Ixalan|2|R|{1}{W}|Enchantment|||Players can't cast spells from graveyards or activate abilities from graveyards.$Whenever a creature dies, you gain 1 life.|
|
||||
Bellowing Aegisaur|Ixalan|4|U|{5}{W}|Creature - Dinosaur|3|5|Enrage - Whenever Bellowing Aegisaur is dealt damage, put a +1/+1 counter on each other creature you control.|
|
||||
Bishop of Rebirth|Ixalan|5|R|Creature - Vampire Cleric|3|4|Vigilance$Whenever Bishop of Rebirth attacks, you may return target creature card with converted mana cost 3 or less from your graveyard to the battlefield.|
|
||||
Duskborne Skymarcher|Ixalan|9|U|{W}|Creature - Vampire Cleric|1|1|Flying${W}, {T}: Target attacking vampire gets +1/+1 until end of turn.|
|
||||
Goring Ceratops|Ixalan|13|R|Creature - Dinosaur|3|3|Double strike$Whenever Goring Ceratops attacks, other creatures you control gain double strike until end of turn.|
|
||||
Ixalan's Binding|Ixalan|17|U|{3}{W}|Enchantment|||When Ixalan's Binding enters the battlefield, exile target nonland permanent an opponent controls until Ixalan's Binding leaves the battlefield.$Your opponents can't cast spells with the same name as the exiled card.|
|
||||
Kinjalli's Sunwing|Ixalan|19|R|{2}{W}|Creature - Dinosaur|2|3|Flying$Creatures your opponents control enter the battlefield tapped.|
|
||||
|
|
@ -32357,6 +32358,7 @@ Opt|Ixalan|65|C|{U}|Instant|||Scry 1.$Draw a card.|
|
|||
Prosperous Pirates|Ixalan|69|C|{4}{U}|Creature - Human Pirate|3|4|When Prosperous Pirates enters the battlefield, create two colorless Treasure artifact tokens with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."|
|
||||
River's Rebuke|Ixalan|71|R|{4}{U}{U}|Sorcery|||Return all nonland permanents target player controls to their owner's hand.|
|
||||
Siren Stormtamer|Ixalan|79|U|{U}|Creature - Siren Pirate Wizard|Flying${U}, Sacrifice Siren Stormtamer: Counter target spell or ability that targets you or a creature you control.|
|
||||
Spell Pierce|Ixalan|81|C|{U}|Instant|||Counter target noncreature spell unless its controller pays {2}.|
|
||||
Bloodcrazed Paladin|Ixalan|93|R|{1}{B}|Creature - Vampire Knight|1|1|Flash$Bloodcrazed Paladin enters the battlefield with a +1/+1 counter on it for each creature that died this turn.|
|
||||
Boneyard Parley|Ixalan|94|M|{5}{B}{B}|Sorcery|||Exile up to five target creature cards from graveyards. An opponent separates those cards into two piles. Put all cards from the pile of your choice onto the battlefield under your control and the rest into their owners' graveyards.|
|
||||
Deadeye Tormentor|Ixalan|98|C|{2}{B}|Creature - Human Pirate|2|2|<i>Raid</i> — When Deadeye Tormentor enters the battlefield, if you attacked with a creature this turn, target opponent discards a card.|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue