mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Merge remote-tracking branch 'magefree/master'
This commit is contained in:
commit
80da09471d
139 changed files with 5092 additions and 252 deletions
|
@ -44,6 +44,7 @@ import mage.client.util.sets.ConstructedFormats;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.Rarity;
|
||||
import mage.util.RandomUtil;
|
||||
import mage.util.TournamentUtil;
|
||||
|
||||
/**
|
||||
|
@ -120,7 +121,6 @@ public class DeckGenerator {
|
|||
*/
|
||||
private static String getRandomColors(String selectedColors) {
|
||||
|
||||
Random random = new Random();
|
||||
List<Character> availableColors = new ArrayList<>();
|
||||
for (ColoredManaSymbol cms : ColoredManaSymbol.values()) {
|
||||
availableColors.add(cms.toString().charAt(0));
|
||||
|
@ -138,7 +138,7 @@ public class DeckGenerator {
|
|||
}
|
||||
}
|
||||
for (int i = 0; i < randomColors && !availableColors.isEmpty(); i++) {
|
||||
int index = random.nextInt(availableColors.size());
|
||||
int index = RandomUtil.nextInt(availableColors.size());
|
||||
generatedColors.append(availableColors.remove(index));
|
||||
}
|
||||
return generatedColors.toString();
|
||||
|
@ -214,14 +214,13 @@ public class DeckGenerator {
|
|||
List<CardInfo> cardPool = CardRepository.instance.findCards(criteria);
|
||||
int retrievedCount = cardPool.size();
|
||||
List<DeckGeneratorCMC.CMC> deckCMCs = genPool.getCMCsForSpellCount(spellCount);
|
||||
Random random = new Random();
|
||||
int count = 0;
|
||||
int reservesAdded = 0;
|
||||
boolean added;
|
||||
if (retrievedCount > 0 && retrievedCount >= spellCount) {
|
||||
int tries = 0;
|
||||
while (count < spellCount) {
|
||||
Card card = cardPool.get(random.nextInt(retrievedCount)).getMockCard();
|
||||
Card card = cardPool.get(RandomUtil.nextInt(retrievedCount)).getMockCard();
|
||||
if (genPool.isValidSpellCard(card)) {
|
||||
int cardCMC = card.getManaCost().convertedManaCost();
|
||||
for (DeckGeneratorCMC.CMC deckCMC : deckCMCs) {
|
||||
|
@ -278,10 +277,9 @@ public class DeckGenerator {
|
|||
if (!genPool.isMonoColoredDeck() && genDialog.useNonBasicLand()) {
|
||||
List<Card> landCards = genPool.filterLands(CardRepository.instance.findCards(criteria));
|
||||
int allCount = landCards.size();
|
||||
Random random = new Random();
|
||||
if (allCount > 0) {
|
||||
while (countNonBasic < landsCount / 2) {
|
||||
Card card = landCards.get(random.nextInt(allCount));
|
||||
Card card = landCards.get(RandomUtil.nextInt(allCount));
|
||||
if (genPool.isValidLandCard(card)) {
|
||||
Card addedCard = card.copy();
|
||||
deckLands.add(addedCard);
|
||||
|
@ -394,10 +392,9 @@ public class DeckGenerator {
|
|||
* @return a single basic land that produces the color needed.
|
||||
*/
|
||||
private static Card getBasicLand(ColoredManaSymbol color, Map<String, List<CardInfo>> basicLands) {
|
||||
Random random = new Random();
|
||||
String landName = DeckGeneratorPool.getBasicLandName(color.toString());
|
||||
List<CardInfo> basicLandsInfo = basicLands.get(landName);
|
||||
return basicLandsInfo.get(random.nextInt(basicLandsInfo.size() - 1)).getMockCard().copy();
|
||||
return basicLandsInfo.get(RandomUtil.nextInt(basicLandsInfo.size() - 1)).getMockCard().copy();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ import mage.cards.Card;
|
|||
import mage.cards.decks.Deck;
|
||||
import mage.cards.repository.CardInfo;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
@ -390,7 +391,6 @@ public class DeckGeneratorPool
|
|||
*/
|
||||
private List<Card> getFixedSpells()
|
||||
{
|
||||
Random random = new Random();
|
||||
int spellSize = deckCards.size();
|
||||
int nonLandSize = (deckSize - landCount);
|
||||
|
||||
|
@ -409,7 +409,7 @@ public class DeckGeneratorPool
|
|||
spellsToAdd.add(reserveSpells.get(i));
|
||||
|
||||
for (int i = spellsNeeded + 1; i < reserveSpells.size() - 1; i++) {
|
||||
int j = random.nextInt(i);
|
||||
int j = RandomUtil.nextInt(i);
|
||||
Card randomCard = reserveSpells.get(j);
|
||||
if (isValidSpellCard(randomCard) && j < spellsToAdd.size()) {
|
||||
spellsToAdd.set(j, randomCard);
|
||||
|
@ -424,7 +424,7 @@ public class DeckGeneratorPool
|
|||
else if(spellSize > (deckSize - landCount)) {
|
||||
int spellsRemoved = (spellSize)-(deckSize-landCount);
|
||||
for(int i = 0; i < spellsRemoved; ++i) {
|
||||
deckCards.remove(random.nextInt(deckCards.size()));
|
||||
deckCards.remove(RandomUtil.nextInt(deckCards.size()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ import mage.cards.repository.ExpansionRepository;
|
|||
import mage.client.MageFrame;
|
||||
import mage.client.constants.Constants.DeckEditorMode;
|
||||
import mage.constants.Rarity;
|
||||
import mage.util.RandomUtil;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
|
@ -118,7 +119,6 @@ public class AddLandDialog extends MageDialog {
|
|||
}
|
||||
|
||||
private void addLands(String landName, int number) {
|
||||
Random random = new Random();
|
||||
String landSetName = (String) cbLandSet.getSelectedItem();
|
||||
|
||||
CardCriteria criteria = new CardCriteria();
|
||||
|
@ -142,7 +142,7 @@ public class AddLandDialog extends MageDialog {
|
|||
}
|
||||
|
||||
for (int i = 0; i < number; i++) {
|
||||
Card land = cards.get(random.nextInt(cards.size())).getMockCard();
|
||||
Card land = cards.get(RandomUtil.nextInt(cards.size())).getMockCard();
|
||||
deck.getCards().add(land);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,13 +77,14 @@ import static mage.constants.Constants.DEFAULT_AVATAR_ID;
|
|||
import static mage.constants.Constants.MAX_AVATAR_ID;
|
||||
import static mage.constants.Constants.MIN_AVATAR_ID;
|
||||
import mage.constants.ManaType;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.remote.Session;
|
||||
import mage.utils.timer.PriorityTimer;
|
||||
import mage.view.CardView;
|
||||
import mage.view.ManaPoolView;
|
||||
import mage.view.PlayerView;
|
||||
import org.mage.card.arcane.ManaSymbols;
|
||||
import mage.players.Player;
|
||||
import mage.view.CardView;
|
||||
|
||||
/**
|
||||
* Enhanced player pane.
|
||||
|
@ -191,7 +192,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
changedFontLife = false;
|
||||
}
|
||||
lifeLabel.setText(Integer.toString(playerLife));
|
||||
poisonLabel.setText(Integer.toString(player.getPoison()));
|
||||
poisonLabel.setText(Integer.toString(player.getCounters().getCount(CounterType.POISON)));
|
||||
handLabel.setText(Integer.toString(player.getHandCount()));
|
||||
int libraryCards = player.getLibraryCount();
|
||||
if (libraryCards > 99) {
|
||||
|
@ -330,9 +331,10 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
}
|
||||
// Extend tooltip
|
||||
StringBuilder tooltipText = new StringBuilder(basicTooltipText);
|
||||
if (player.getExperience() > 0) {
|
||||
tooltipText.append("<br/>Experience counters: ").append(player.getExperience());
|
||||
for (Counter counter : player.getCounters().values()) {
|
||||
tooltipText.append("<br/>").append(counter.getName()).append(" counters: ").append(counter.getCount());
|
||||
}
|
||||
|
||||
avatar.setToolTipText(tooltipText.toString());
|
||||
avatar.repaint();
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@ public interface CardImageSource {
|
|||
|
||||
String generateURL(CardDownloadData card) throws Exception;
|
||||
String generateTokenUrl(CardDownloadData card) throws Exception;
|
||||
String getNextHttpImageUrl();
|
||||
String getFileForHttpImage(String httpImageUrl);
|
||||
String getSourceName();
|
||||
Float getAverageSize();
|
||||
}
|
||||
|
|
|
@ -33,28 +33,31 @@ public class GathererSets implements Iterable<DownloadJob> {
|
|||
"SHM", "EVE",
|
||||
"MED", "ME2", "ME3", "ME4",
|
||||
"POR", "PO2", "PTK",
|
||||
"ARC",
|
||||
"W16"};
|
||||
|
||||
private static final String[] withMythics = {"M10", "M11", "M12", "M13", "M14", "M15", "ORI",
|
||||
"ANB",
|
||||
"DDF", "DDG", "DDH", "DDI", "DDJ", "DDK", "DDL", "DDM", "DDN",
|
||||
"DD3", "DD3B", "DDO", "DDP", "DDQ", "DDR",
|
||||
"DD3", "DD3B", "DDO", "DDP", "DDQ", "DDR", "DDS",
|
||||
"FVD", "FVE", "FVL", "FVR",
|
||||
"V12", "V13", "V14", "V15", "V16",
|
||||
"ALA", "CON", "ARB",
|
||||
"ZEN", "WWK", "ROE",
|
||||
"SOM", "MBS", "NPH",
|
||||
"CMD", "C13", "C14", "C15", "C16",
|
||||
"CMD", "C13", "C14", "C15", "C16", "CMA",
|
||||
"PC2", "PCA",
|
||||
"ISD", "DKA", "AVR",
|
||||
"RTR", "GTC", "DGM",
|
||||
"MMA", "MM2", "EMA",
|
||||
"MMA", "MM2", "EMA", "MM3",
|
||||
"THS", "BNG", "JOU",
|
||||
"CNS", "CN2",
|
||||
"VMA", "TPR",
|
||||
"KTK", "FRF", "DTK",
|
||||
"BFZ", "EXP", "OGW",
|
||||
"SOI", "EMN",
|
||||
"KLD", "AER"
|
||||
"KLD", "AER",
|
||||
"AKH", "HOU"
|
||||
};
|
||||
private static final HashMap<String, String> symbolsReplacements = new HashMap<>();
|
||||
|
||||
|
|
|
@ -18,7 +18,9 @@ public class MagicCardsImageSource implements CardImageSource {
|
|||
{
|
||||
put("10E", "tenth-edition");
|
||||
put("AER", "aether-revolt");
|
||||
put("AKH", "amonkhet");
|
||||
put("ALA", "shards-of-alara");
|
||||
put("ANB", "archenemy-nicol-bolas");
|
||||
put("APAC", "asia-pacific-land-program");
|
||||
put("APC", "player-rewards-2001");
|
||||
put("ARB", "alara-reborn");
|
||||
|
@ -32,6 +34,7 @@ public class MagicCardsImageSource implements CardImageSource {
|
|||
put("C15", "commander-2015");
|
||||
put("C16", "commander-2016");
|
||||
put("CLASH", "clash-pack");
|
||||
put("CMA", "commander-anthology");
|
||||
put("CMA", "commanders-arsenal");
|
||||
put("CMD", "commander");
|
||||
put("CN2", "conspiracy-take-the-crown");
|
||||
|
@ -60,6 +63,7 @@ public class MagicCardsImageSource implements CardImageSource {
|
|||
put("DDP", "duel-decks-zendikar-vs-eldrazi");
|
||||
put("DDQ", "duel-decks-blessed-vs-cursed");
|
||||
put("DDR", "duel-decks-nissa-vs-ob-nixilis");
|
||||
put("DDS", "duel-decks-mind-vs-might");
|
||||
put("DGM", "dragons-maze");
|
||||
put("DKA", "dark-ascension");
|
||||
put("DRB", "from-the-vault-dragons");
|
||||
|
@ -76,6 +80,7 @@ public class MagicCardsImageSource implements CardImageSource {
|
|||
put("GRC", "wpngateway");
|
||||
put("GTC", "gatecrash");
|
||||
put("HOP", "planechase");
|
||||
put("HOU", "hour-of-devastation");
|
||||
put("INV", "player-rewards-2001");
|
||||
put("ISD", "innistrad");
|
||||
put("JOU", "journey-into-nyx");
|
||||
|
@ -94,6 +99,7 @@ public class MagicCardsImageSource implements CardImageSource {
|
|||
put("MGDC", "magic-game-day-cards");
|
||||
put("MLP", "launch-party");
|
||||
put("MM2", "modern-masters-2015");
|
||||
put("MM3", "modern-masters-2017");
|
||||
put("MMA", "modern-masters");
|
||||
put("MOR", "morningtide");
|
||||
put("MPRP", "magic-player-rewards");
|
||||
|
@ -146,6 +152,16 @@ public class MagicCardsImageSource implements CardImageSource {
|
|||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNextHttpImageUrl() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileForHttpImage(String httpImageUrl) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateURL(CardDownloadData card) throws Exception {
|
||||
String collectorId = card.getCollectorId();
|
||||
|
|
|
@ -55,6 +55,16 @@ public class MtgImageSource implements CardImageSource {
|
|||
return "mtgimage.com";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNextHttpImageUrl() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileForHttpImage(String httpImageUrl) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateURL(CardDownloadData card) throws Exception {
|
||||
String collectorId = card.getCollectorId();
|
||||
|
|
|
@ -0,0 +1,358 @@
|
|||
/*
|
||||
* 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 org.mage.plugins.card.dl.sources;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.mage.plugins.card.images.CardDownloadData;
|
||||
import org.mage.plugins.card.images.DownloadPictures;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class MtgOnlTokensImageSource implements CardImageSource {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(MtgOnlTokensImageSource.class);
|
||||
|
||||
private static CardImageSource instance = new MtgOnlTokensImageSource();
|
||||
|
||||
public static CardImageSource getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new MtgOnlTokensImageSource();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSourceName() {
|
||||
return "http://mtg.onl/token-list/tokens/";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float getAverageSize() {
|
||||
return 26.7f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNextHttpImageUrl() {
|
||||
if (copyUrlToImage == null) {
|
||||
setupLinks();
|
||||
}
|
||||
|
||||
for (String key : copyUrlToImageDone.keySet()) {
|
||||
if (copyUrlToImageDone.get(key) == false) {
|
||||
copyUrlToImageDone.put(key, true);
|
||||
return key;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileForHttpImage(String httpImageUrl) {
|
||||
if (httpImageUrl != null) {
|
||||
return copyUrlToImage.get(httpImageUrl);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateURL(CardDownloadData card) throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
HashMap<String, String> copyUrlToImage = null;
|
||||
HashMap<String, String> copyImageToUrl = null;
|
||||
HashMap<String, Boolean> copyUrlToImageDone = null;
|
||||
|
||||
private void setupLinks() {
|
||||
if (copyUrlToImage != null) {
|
||||
return;
|
||||
}
|
||||
copyUrlToImage = new HashMap<String, String>();
|
||||
copyImageToUrl = new HashMap<String, String>();
|
||||
copyUrlToImageDone = new HashMap<String, Boolean>();
|
||||
copyUrlToImage.put("Angel_B_3_3.jpg", "ANGEL.B.ANGEL.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Angel_W_3_3.jpg", "ANGEL.W.ANGEL.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Angel_W_4_4.jpg", "ANGEL.W.ANGEL.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Ape_G_2_2.jpg", "APE.G.APE.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Ape_G_3_3.jpg", "APE.G.APE.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Ashaya_the_Awoken_World_G_4_4.jpg", "ASHAYATHEAWOKENWORLD.G.ELEMENTAL.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Assassin_B_1_1.jpg", "ASSASSIN.B.ASSASSIN.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Assembly-Worker_2_2.jpg", "ASSEMBLYWORKER..ASSEMBLYWORKER.ARTIFACTCREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Avatar_W_y_y.jpg", "AVATAR.W.AVATAR.CREATURE.S.S.full.jpg");
|
||||
copyUrlToImage.put("Bat_B_1_1.jpg", "BAT.B.BAT.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Bat_B_1_2.jpg", "BAT.B.BAT.CREATURE.1.2.full.jpg");
|
||||
copyUrlToImage.put("Bear_G_2_2.jpg", "BEAR.G.BEAR.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Bear_G_4_4.jpg", "BEAR.G.BEAR.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Beast_B_3_3.jpg", "BEAST.B.BEAST.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Beast_G_3_3.jpg", "BEAST.G.BEAST.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Beast_G_2_2.jpg", "BEAST.G.BEAST.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Beast_G_4_4.jpg", "BEAST.G.BEAST.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Beast_G_5_5.jpg", "BEAST.G.BEAST.CREATURE.5.5.full.jpg");
|
||||
copyUrlToImage.put("Beast_RGW_8_8.jpg", "BEAST.WRG.BEAST.CREATURE.8.8.full.jpg");
|
||||
copyUrlToImage.put("Bird_Soldier_W_1_1.jpg", "BIRDSOLDIER.W.BIRD.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Bird_U_1_1.jpg", "BIRD.U.BIRD.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Bird_U_2_2.jpg", "BIRD.U.BIRD.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Bird_U_2_2_Enchantment.jpg", "BIRD.U.BIRD.ENCHANTMENTCREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Bird_WU_1_1.jpg", "BIRD.WU.BIRD.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Bird_W_1_1.jpg", "BIRD.W.BIRD.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Bird_W_3_3.jpg", "BIRD.W.BIRD.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Bird_W_3_4.jpg", "BIRD.W.BIRD.CREATURE.3.4.full.jpg");
|
||||
copyUrlToImage.put("Boar_G_2_2.jpg", "BOAR.G.BOAR.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Boar_G_3_3.jpg", "BOAR.G.BOAR.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Butterfly_G_1_1.jpg", "BUTTERFLY.G.INSECT.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Camarid_U_1_1.jpg", "CAMARID.U.CAMARID.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Caribou_W_0_1.jpg", "CARIBOU.W.CARIBOU.CREATURE.0.1.full.jpg");
|
||||
copyUrlToImage.put("Carnivore_R_3_1.jpg", "CARNIVORE.R.BEAST.CREATURE.3.1.full.jpg");
|
||||
copyUrlToImage.put("Cat_B_2_1.jpg", "CAT.B.CAT.CREATURE.2.1.full.jpg");
|
||||
copyUrlToImage.put("Cat_G_1_1.jpg", "CAT.G.CAT.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Cat_R_1_1.jpg", "CAT.R.CAT.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Cat_Soldier_W_1_1.jpg", "CATSOLDIER.W.CATSOLDIER.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Cat_W_2_2.jpg", "CAT.W.CAT.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Cat_Warrior_G_2_2.jpg", "CATWARRIOR.G.CATWARRIOR.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Centaur_G_3_3.jpg", "CENTAUR.G.CENTAUR.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Centaur_G_3_3_Enchantment.jpg", "CENTAUR.G.CENTAUR.ENCHANTMENTCREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Centaur_G_3_3_protection.jpg", "CENTAUR.G.CENTAUR.CREATURE.3.3a.full.jpg");
|
||||
copyUrlToImage.put("Citizen_W_1_1.jpg", "CITIZEN.W.CITIZEN.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Cleric_WB_1_1.jpg", "CLERIC.WB.CLERIC.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Cleric_W_2_1.jpg", "CLERIC.W.CLERIC.CREATUREENCHANTMENT.2.1.full.jpg");
|
||||
copyUrlToImage.put("Cloud_Sprite_U_1_1.jpg", "CLOUDSPRITE.U.FAERIE.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Clue.jpg", "CLUE..CLUE.ARTIFACT.0.0.full.jpg");
|
||||
copyUrlToImage.put("Construct_1_1.jpg", "CONSTRUCT..CONSTRUCT.ARTIFACTCREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Construct_6_12.jpg", "CONSTRUCT..CONSTRUCT.CREATUREARTIFACT.6.12.full.jpg");
|
||||
copyUrlToImage.put("Demon_B_5_5.jpg", "DEMON.B.DEMON.CREATURE.5.5.full.jpg");
|
||||
copyUrlToImage.put("Demon_B_y_y.jpg", "DEMON.B.DEMON.CREATURE.S.S.full.jpg");
|
||||
copyUrlToImage.put("Devil_R_1_1.jpg", "DEVIL.R.DEVIL.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Djinn_5_5.jpg", "DJINN..DJINN.ARTIFACTCREATURE.5.5.full.jpg");
|
||||
copyUrlToImage.put("Djinn_Monk_U_2_2.jpg", "DJINNMONK.U.DJINNMONK.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Dragon_RG_1_1.jpg", "DRAGON.RG.DRAGON.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Dragon_R_2_2.jpg", "DRAGON.R.DRAGON.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Dragon_R_4_4.jpg", "DRAGON.R.DRAGON.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Dragon_R_5_5.jpg", "DRAGON.R.DRAGON.CREATURE.5.5.full.jpg");
|
||||
copyUrlToImage.put("Dragon_R_6_6.jpg", "DRAGON.R.DRAGON.CREATURE.6.6.full.jpg");
|
||||
copyUrlToImage.put("Dragon_Spirit_U_5_5.jpg", "DRAGONSPIRIT.U.DRAGONSPIRIT.CREATURE.5.5.full.jpg");
|
||||
copyUrlToImage.put("Drake_UG_2_2.jpg", "DRAKE.UG.DRAKE.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Drake_U_2_2.jpg", "DRAKE.U.DRAKE.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Eldrazi_10_10.jpg", "ELDRAZI..ELDRAZI.CREATURE.10.10.full.jpg");
|
||||
copyUrlToImage.put("Eldrazi_Scion_1_1.jpg", "ELDRAZISCION..ELDRAZISCION.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Eldrazi_Spawn_0_1.jpg", "ELDRAZISPAWN..ELDRAZISPAWN.CREATURE.0.1.full.jpg");
|
||||
copyUrlToImage.put("Elemental_BR_5_5.jpg", "ELEMENTAL.BR.ELEMENTAL.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Elemental_GW_y_y.jpg", "ELEMENTAL.WG.ELEMENTAL.CREATURE.S.S.full.jpg");
|
||||
copyUrlToImage.put("Elemental_G_2_2.jpg", "ELEMENTAL.G.ELEMENTAL.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Elemental_G_4_4.jpg", "ELEMENTAL.G.ELEMENTAL.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Elemental_G_5_3.jpg", "ELEMENTAL.G.ELEMENTAL.CREATURE.5.3.full.jpg");
|
||||
copyUrlToImage.put("Elemental_G_7_7.jpg", "ELEMENTAL.G.ELEMENTAL.CREATURE.7.7.full.jpg");
|
||||
copyUrlToImage.put("Elemental_R_7_1.jpg", "ELEMENTAL.R.ELEMENTAL.CREATURE.7.1.full.jpg");
|
||||
copyUrlToImage.put("Elemental_Shaman_R_3_1.jpg", "ELEMENTALSHAMAN.R.ELEMENTALSHAMAN.CREATURE.3.1.full.jpg");
|
||||
copyUrlToImage.put("Elephant_G_3_3.jpg", "ELEPHANT.G.ELEPHANT.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Elf_Druid_G_1_1.jpg", "ELFDRUID.G.ELFDRUID.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Elf_G_1_1.jpg", "ELFWARRIOR.G.ELFWARRIOR.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Elf_Warrior_GW_1_1.jpg", "ELFWARRIOR.WG.ELFWARRIOR.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Elf_Warrior_G_1_1.jpg", "ELFWARRIOR.G.ELFWARRIOR.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Faerie_Rogue_B_1_1.jpg", "FAERIEROGUE.B.FAERIEROGUE.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Faerie_Rogue_UB_1_1.jpg", "FAERIEROGUE.UB.FAERIEROGUE.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Faerie_U_1_1.jpg", "FAERIE.U.FAERIE.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Festering_Goblin_B_1_1.jpg", "FESTERINGGOBLIN.B.ZOMBIEGOBLIN.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Fish_U_3_3.jpg", "FISH.U.FISH.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Frog_Lizard_G_3_3.jpg", "FROGLIZARD.G.FROGLIZARD.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Gargoyle_3_4.jpg", "GARGOYLE..GARGOYLE.CREATUREARTIFACT.3.4.full.jpg");
|
||||
copyUrlToImage.put("Germ_B_0_0.jpg", "GERM.B.GERM.CREATURE.0.0.full.jpg");
|
||||
copyUrlToImage.put("Giant_R_4_4.jpg", "GIANT.R.GIANT.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Giant_Warrior_RG_4_4.jpg", "GIANTWARRIOR.RG.GIANTWARRIOR.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Giant_Warrior_W_5_5.jpg", "GIANTWARRIOR.W.GIANTWARRIOR.CREATURE.5.5.full.jpg");
|
||||
copyUrlToImage.put("Gnome_1_1.jpg", "GNOME..GNOME.ARTIFACTCREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Goat_W_0_1.jpg", "GOAT.W.GOAT.CREATURE.0.1.full.jpg");
|
||||
copyUrlToImage.put("Goblin_R_1_1.jpg", "GOBLIN.R.GOBLIN.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Goblin_R_2_1.jpg", "GOBLIN.R.GOBLIN.CREATURE.2.1.full.jpg");
|
||||
copyUrlToImage.put("Goblin_Rogue_B_1_1.jpg", "GOBLINROGUE.B.GOBLINROGUE.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Goblin_Scout_R_1_1.jpg", "GOBLINSCOUT.R.GOBLINSCOUT.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Goblin_Soldier_RW_1_1.jpg", "GOBLINSOLDIER.WR.GOBLINSOLDIER.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Goblin_Warrior_RG_1_1.jpg", "GOBLINWARRIOR.RG.GOBLINWARRIOR.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Gold_.jpg", "GOLD...ARTIFACT.0.0.full.jpg");
|
||||
copyUrlToImage.put("Goldmeadow_Harrier_W_1_1.jpg", "GOLDMEADOWHARRIER.W.KITHKINSOLDIER.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Golem_3_3.jpg", "GOLEM..GOLEM.ARTIFACTCREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Golem_3_3_Enchantment.jpg", "GOLEM..GOLEM.ENCHANTMENTARTIFACTCREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Golem_9_9.jpg", "GOLEM..GOLEM.ARTIFACTCREATURE.9.9.full.jpg");
|
||||
copyUrlToImage.put("Graveborn_BR_3_1.jpg", "GRAVEBORN.BR.GRAVEBORN.CREATURE.3.1.full.jpg");
|
||||
copyUrlToImage.put("Griffin_W_2_2.jpg", "GRIFFIN.W.GRIFFIN.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Harpy_B_1_1.jpg", "HARPY.B.HARPY.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Hellion_R_4_4.jpg", "HELLION.R.HELLION.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Hippo_G_1_1.jpg", "HIPPO.G.HIPPO.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Homunculus_U_0_1.jpg", "HOMUNCULUS.U.HOMUNCULUS.CREATUREARTIFACT.0.1.full.jpg");
|
||||
copyUrlToImage.put("Homunculus_U_2_2.jpg", "HOMUNCULUS.U.HOMUNCULUS.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Hornet_1_1.jpg", "HORNET..INSECT.ARTIFACTCREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Horror_B_4_4.jpg", "HORROR.B.HORROR.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Horror_B_X_X.jpg", "HORROR.B.HORROR.CREATURE.X.X.full.jpg");
|
||||
copyUrlToImage.put("Horror_UB_1_1.jpg", "HORROR.UB.HORROR.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Horror_X_X.jpg", "HORROR..HORROR.ARTIFACTCREATURE.X.X.full.jpg");
|
||||
copyUrlToImage.put("Hound_G_1_1.jpg", "HOUND.G.HOUND.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Human_Cleric_WB_1_1.jpg", "HUMANCLERIC.WB.HUMANCLERIC.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Human_R_1_1.jpg", "HUMAN.R.HUMAN.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Human_Soldier_W_1_1.jpg", "HUMANSOLDIER.W.HUMANSOLDIER.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Human_W_1_1.jpg", "HUMAN.W.HUMAN.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Hydra_G_X_X.jpg", "HYDRA.G.HYDRA.CREATURE.X.X.full.jpg");
|
||||
copyUrlToImage.put("Illusion_U_1_1.jpg", "ILLUSION.U.ILLUSION.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Illusion_U_2_2.jpg", "ILLUSION.U.ILLUSION.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Insect_G_1_1.jpg", "INSECT.G.INSECT.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Insect_G_6_1.jpg", "INSECT.G.INSECT.CREATURE.6.1.full.jpg");
|
||||
copyUrlToImage.put("Kaldra_4_4.jpg", "KALDRA..AVATAR.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Kavu_B_3_3.jpg", "KAVU.B.KAVU.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Kelp_U_0_1.jpg", "KELP.U.PLANTWALL.CREATURE.0.1.full.jpg");
|
||||
copyUrlToImage.put("Kithkin_Soldier_W_1_1.jpg", "KITHKINSOLDIER.W.KITHKINSOLDIER.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Knight_Ally_W_2_2.jpg", "KNIGHTALLY.W.KNIGHTALLY.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Knight_B_2_2.jpg", "KNIGHT.B.KNIGHT.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Knight_W_1_1.jpg", "KNIGHT.W.KNIGHT.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Knight_W_2_2.jpg", "KNIGHT.W.KNIGHT.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Kobolds_of_Kher_Keep_R_0_1.jpg", "KOBOLDSOFKHERKEEP.R.KOBOLD.CREATURE.0.1.full.jpg");
|
||||
copyUrlToImage.put("Kor_Ally_W_1_1.jpg", "KORALLY.W.KORALLY.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Kor_Soldier_W_1_1.jpg", "KORSOLDIER.W.KORSOLDIER.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Kraken_U_9_9.jpg", "KRAKEN.U.KRAKEN.CREATURE.9.9.full.jpg");
|
||||
copyUrlToImage.put("Landmine_.jpg", "LANDMINE...ARTIFACT.0.0.full.jpg");
|
||||
copyUrlToImage.put("Lightning_Ranger_R_5_1.jpg", "LIGHTNINGRAGER.R.ELEMENTAL.CREATURE.5.1.full.jpg");
|
||||
copyUrlToImage.put("Lizard_G_2_2.jpg", "LIZARD.G.LIZARD.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Llanowar_Elves_G_1_1.jpg", "LLANOWARELVES.G.ELFDRUID.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Marit_Lage_B_20_20.jpg", "MARITLAGE.B.AVATAR.CREATURE.20.20.full.jpg");
|
||||
copyUrlToImage.put("Merfolk_U_1_1.jpg", "MERFOLK.U.MERFOLK.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Merfolk_Wizard_U_1_1.jpg", "MERFOLKWIZARD.U.MERFOLKWIZARD.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Metallic_Sliver_1_1.jpg", "METALLICSLIVER..SLIVER.CREATUREARTIFACT.1.1.full.jpg");
|
||||
copyUrlToImage.put("Minion_B_1_1.jpg", "MINION.B.MINION.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Minion_B_X_X.jpg", "MINION.B.MINION.CREATURE.X.X.full.jpg");
|
||||
copyUrlToImage.put("Minor_Demon_BR_1_1.jpg", "MINORDEMON.BR.DEMON.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Minotaur_R_2_3.jpg", "MINOTAUR.R.MINOTAUR.CREATURE.2.3.full.jpg");
|
||||
copyUrlToImage.put("Monk_W_1_1.jpg", "MONK.W.MONK.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Myr_1_1.jpg", "MYR..MYR.CREATUREARTIFACT.1.1.full.jpg");
|
||||
copyUrlToImage.put("Octopus_U_8_8.jpg", "OCTOPUS.U.OCTOPUS.CREATURE.8.8.full.jpg");
|
||||
copyUrlToImage.put("Ogre_R_3_3.jpg", "OGRE.R.OGRE.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Ogre_R_4_4.jpg", "OGRE.R.OGRE.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Ooze_G_1_1.jpg", "OOZE.G.OOZE.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Ooze_G_2_2.jpg", "OOZE.G.OOZE.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Ooze_G_3_3.jpg", "OOZE.G.OOZE.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Orb_U_X_X.jpg", "ORB.U.ORB.CREATURE.X.X.jpg.full.jpg");
|
||||
copyUrlToImage.put("Pegasus_W_1_1.jpg", "PEGASUS.W.PEGASUS.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Pentavite_1_1.jpg", "PENTAVITE..PENTAVITE.ARTIFACTCREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Pest_0_1.jpg", "PEST..PEST.ARTIFACTCREATURE.0.1.full.jpg");
|
||||
copyUrlToImage.put("Pincher_2_2.jpg", "PINCHER..PINCHER.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Plant_G_0_1.jpg", "PLANT.G.PLANT.CREATURE.0.1.full.jpg");
|
||||
copyUrlToImage.put("Plant_G_1_1.jpg", "PLANT.G.PLANT.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Rat_B_1_1.jpg", "RAT.B.RAT.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Reflection_W_2_2.jpg", "REFLECTION.W.REFLECTION.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Rhino_G_4_4.jpg", "RHINO.G.RHINO.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Rukh_R_4_4.jpg", "BIRD.R.BIRD.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Sand_1_1.jpg", "SAND..SAND.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Sand_Warrior_RGW_1_1.jpg", "SANDWARRIOR.WRG.SANDWARRIOR.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Saporling_G_1_1.jpg", "SAPROLING.G.SAPROLING.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Satyr_RG_2_2.jpg", "SATYR.RG.SATYR.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Serf_B_0_1.jpg", "SERF.B.SERF.CREATURE.0.1.full.jpg");
|
||||
copyUrlToImage.put("Shapeshifter_1_1.jpg", "SHAPESHIFTER..SHAPESHIFTER.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Skeleton_B_1_1.jpg", "SKELETON.B.SKELETON.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Sliver_1_1.jpg", "SLIVER..SLIVER.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Snake_1_1.jpg", "SNAKE..SNAKE.ARTIFACTCREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Snake_B_1_1.jpg", "SNAKE.B.SNAKE.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Snake_GB_1_1.jpg", "SNAKE.BG.SNAKE.ENCHANTMENTCREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Snake_GU_1_1.jpg", "SNAKE.UG.SNAKE.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Snake_G_1_1.jpg", "SNAKE.G.SNAKE.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Soldier_Ally_W_1_1.jpg", "SOLDIERALLY.W.SOLDIERALLY.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Soldier_RW_1_1.jpg", "SOLDIER.WR.SOLDIER.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Soldier_R_1_1.jpg", "SOLDIER.R.SOLDIER.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Soldier_W_1_1.jpg", "SOLDIER.W.SOLDIER.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Soldier_W_1_1_Enchantment.jpg", "SOLDIER.W.SOLDIER.ENCHANTMENTCREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Spark_Elemental_R_3_1.jpg", "SPARKELEMENTAL.R.ELEMENTAL.CREATURE.3.1.full.jpg");
|
||||
copyUrlToImage.put("Spawn_2_2.jpg", "SPAWN..SPAWN.ARTIFACTCREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Sphinx_U_4_4.jpg", "SPHINX.U.SPHINX.CREATURE.4.4.full.jpg");
|
||||
copyUrlToImage.put("Spider_B_2_4.jpg", "SPIDER.B.SPIDER.CREATURE.2.4.full.jpg");
|
||||
copyUrlToImage.put("Spider_G_1_2.jpg", "SPIDER.G.SPIDER.CREATURE.1.2.full.jpg");
|
||||
copyUrlToImage.put("Spider_G_1_3.jpg", "SPIDER.G.SPIDER.ENCHANTMENTCREATURE.1.3.full.jpg");
|
||||
copyUrlToImage.put("Spike_G_1_1.jpg", "SPIKE.G.SPIKE.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Spirit_1_1.jpg", "SPIRIT..SPIRIT.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Spirit_U_1_1.jpg", "SPIRIT.U.SPIRIT.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Spirit_WB_1_1.jpg", "SPIRIT.WB.SPIRIT.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Spirit_WB_y_y.jpg", "SPIRIT.WB.SPIRIT.ENCHANTMENTCREATURE.S.S.full.jpg");
|
||||
copyUrlToImage.put("Spirit_W_1_1.jpg", "SPIRIT.W.SPIRIT.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Spirit_W_3_3.jpg", "SPIRIT.W.SPIRIT.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Spirit_Warror_BG_y_y.jpg", "SPIRITWARRIOR.BG.SPIRITWARRIOR.CREATURE.S.S.full.jpg");
|
||||
copyUrlToImage.put("Squid_U_1_1.jpg", "SQUID.U.SQUID.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Squirrel_G_1_1.jpg", "SQUIRREL.G.SQUIRREL.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Stoneforged_Blade_.jpg", "STONEFORGEDBLADE..EQUIPMENT.ARTIFACT.0.0.full.jpg");
|
||||
copyUrlToImage.put("Tetravite_1_1.jpg", "TETRAVITE..TETRAVITE.CREATUREARTIFACT.1.1.full.jpg");
|
||||
copyUrlToImage.put("Thopter_1_1.jpg", "THOPTER..THOPTER.ARTIFACTCREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Thopter_U_1_1.jpg", "THOPTER.U.THOPTER.CREATUREARTIFACT.1.1.full.jpg");
|
||||
copyUrlToImage.put("Thrull_B_0_1.jpg", "THRULL.B.THRULL.CREATURE.0.1.full.jpg");
|
||||
copyUrlToImage.put("Thrull_B_1_1.jpg", "THRULL.B.THRULL.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Treefolk_G_X_X.jpg", "TREEFOLK.G.TREEFOLK.CREATURE.X.X.full.jpg");
|
||||
copyUrlToImage.put("Treefolk_Shaman_G_2_5.jpg", "TREEFOLKSHAMAN.G.TREEFOLKSHAMAN.CREATURE.2.5.full.jpg");
|
||||
copyUrlToImage.put("Treefolk_Warrior_G_y_y.jpg", "TREEFOLKWARRIOR.G.TREEFOLKWARRIOR.CREATURE.S.S.full.jpg");
|
||||
copyUrlToImage.put("Triskelavite_1_1.jpg", "TRISKELAVITE..TRISKELAVITE.ARTIFACTCREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Tuktuk_the_Returned_5_5.jpg", "TUKTUKTHERETURNED..GOBLIN.ARTIFACTCREATURE.5.5.full.jpg");
|
||||
copyUrlToImage.put("Urami_B_5_5.jpg", "URAMI.B.DEMONSPIRIT.CREATURE.5.5.full.jpg");
|
||||
copyUrlToImage.put("Vampire_B_1_1.jpg", "VAMPIRE.B.VAMPIRE.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Vampire_B_2_2.jpg", "VAMPIRE.B.VAMPIRE.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Vampire_B_X_X.jpg", "VAMPIRE.B.VAMPIRE.CREATURE.X.X.full.jpg");
|
||||
copyUrlToImage.put("Vampire_Knight_B_1_1.jpg", "VAMPIREKNIGHT.B.VAMPIREKNIGHT.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Voja_GW_2_2.jpg", "VOJA.WG.WOLF.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Wall_U_5_5.jpg", "WALL.U.WALL.CREATURE.5.5.full.jpg");
|
||||
copyUrlToImage.put("Warrior_B_2_1.jpg", "WARRIOR.B.WARRIOR.CREATURE.2.1.full.jpg");
|
||||
copyUrlToImage.put("Warrior_R_1_1.jpg", "WARRIOR.R.WARRIOR.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Warrior_W_1_1.jpg", "WARRIOR.W.WARRIOR.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Wasp_1_1.jpg", "WASP..INSECT.ARTIFACTCREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Weird_U_3_3.jpg", "WEIRD.U.WEIRD.CREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Whale_U_6_6.jpg", "WHALE.U.WHALE.CREATURE.6.6.full.jpg");
|
||||
copyUrlToImage.put("Wirefly_2_2.jpg", "WIREFLY..INSECT.ARTIFACTCREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Wolf_G_2_2.jpg", "WOLF.G.WOLF.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Wood_G_0_1.jpg", "WOOD.G.WALL.CREATURE.0.1.full.jpg");
|
||||
copyUrlToImage.put("Worm_BG_1_1.jpg", "WORM.BG.WORM.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Wurm_3_3.jpg", "WURM..WURM.ARTIFACTCREATURE.3.3.full.jpg");
|
||||
copyUrlToImage.put("Wurm_B_6_6.jpg", "WURM.B.WURM.CREATURE.6.6.full.jpg");
|
||||
copyUrlToImage.put("Wurm_G_6_6.jpg", "WURM.G.WURM.CREATURE.6.6.full.jpg");
|
||||
copyUrlToImage.put("Zombie_B_2_2.jpg", "ZOMBIE.B.ZOMBIE.CREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Zombie_B_2_2_Enchantment.jpg", "ZOMBIE.B.ZOMBIE.ENCHANTMENTCREATURE.2.2.full.jpg");
|
||||
copyUrlToImage.put("Zombie_B_5_5.jpg", "ZOMBIEGIANT.B.ZOMBIEGIANT.CREATURE.5.5.full.jpg");
|
||||
copyUrlToImage.put("Zombie_B_X_X.jpg", "ZOMBIE.B.ZOMBIE.CREATURE.X.X.full.jpg");
|
||||
copyUrlToImage.put("Zombie_Horror_B_X_X.jpg", "ZOMBIEHORROR.B.ZOMBIEHORROR.CREATURE.X.X.full.jpg");
|
||||
copyUrlToImage.put("Zombie_U_X_X.jpg", "ZOMBIE.U.ZOMBIE.CREATURE.X.X.full.jpg");
|
||||
copyUrlToImage.put("Zombie_Wizard_UB_1_1.jpg", "ZOMBIEWIZARD.BG.ZOMBIEWIZARD.CREATURE.1.1.full.jpg");
|
||||
copyUrlToImage.put("Zombie_Wizard_UB_1_1.jpg", "ZOMBIEWIZARD.UB.ZOMBIEWIZARD.CREATURE.1.1.full.jpg");
|
||||
|
||||
for (String key : copyUrlToImage.keySet()) {
|
||||
copyUrlToImageDone.put(key, false);
|
||||
copyImageToUrl.put(copyUrlToImage.get(key), key);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateTokenUrl(CardDownloadData card) throws IOException {
|
||||
|
||||
if (copyUrlToImage == null) {
|
||||
setupLinks();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -234,4 +234,14 @@ public class MythicspoilerComSource implements CardImageSource {
|
|||
public Float getAverageSize() {
|
||||
return 50.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNextHttpImageUrl() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileForHttpImage(String httpImageUrl) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,6 +67,16 @@ public class TokensMtgImageSource implements CardImageSource {
|
|||
return 26.7f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNextHttpImageUrl() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileForHttpImage(String httpImageUrl) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateURL(CardDownloadData card) throws Exception {
|
||||
return null;
|
||||
|
|
|
@ -89,8 +89,10 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
setsAliases.put("8ED", "Eighth Edition");
|
||||
setsAliases.put("9ED", "Ninth Edition");
|
||||
setsAliases.put("AER", "Aether Revolt");
|
||||
setsAliases.put("AKH", "Amonkhet");
|
||||
setsAliases.put("ALA", "Shards of Alara");
|
||||
setsAliases.put("ALL", "Alliances");
|
||||
setsAliases.put("ANB", "Archenemy: Nicol Bolas");
|
||||
setsAliases.put("APC", "Apocalypse");
|
||||
setsAliases.put("ARB", "Alara Reborn");
|
||||
setsAliases.put("ARC", "Archenemy");
|
||||
|
@ -107,6 +109,7 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
setsAliases.put("C14", "Commander 2014");
|
||||
setsAliases.put("C15", "Commander 2015");
|
||||
setsAliases.put("C16", "Commander 2016");
|
||||
setsAliases.put("CMA", "Commander Anthology");
|
||||
setsAliases.put("CHK", "Champions of Kamigawa");
|
||||
setsAliases.put("CHR", "Chronicles");
|
||||
setsAliases.put("CMD", "Magic: The Gathering-Commander");
|
||||
|
@ -134,7 +137,8 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
setsAliases.put("DDO", "Duel Decks: Elspeth vs. Kiora");
|
||||
setsAliases.put("DDP", "Duel Decks: Zendikar vs. Eldrazi");
|
||||
setsAliases.put("DDQ", "Duel Decks: Blessed vs. Cursed");
|
||||
setsAliases.put("DDR", "Duel Decks: Nissa vs Ob Nixilis");
|
||||
setsAliases.put("DDR", "Duel Decks: Nissa vs. Ob Nixilis");
|
||||
setsAliases.put("DDS", "Duel Decks: Mind vs. Might");
|
||||
setsAliases.put("DGM", "Dragon's Maze");
|
||||
setsAliases.put("DIS", "Dissension");
|
||||
setsAliases.put("DKA", "Dark Ascension");
|
||||
|
@ -159,6 +163,7 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
setsAliases.put("H09", "Premium Deck Series: Slivers");
|
||||
setsAliases.put("HML", "Homelands");
|
||||
setsAliases.put("HOP", "Planechase");
|
||||
setsAliases.put("HOU", "Hour of Devastation");
|
||||
setsAliases.put("ICE", "Ice Age");
|
||||
setsAliases.put("INV", "Invasion");
|
||||
setsAliases.put("ISD", "Innistrad");
|
||||
|
@ -189,6 +194,7 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
setsAliases.put("MLP", "Launch Party");
|
||||
setsAliases.put("MMA", "Modern Masters");
|
||||
setsAliases.put("MM2", "Modern Masters 2015");
|
||||
setsAliases.put("MM3", "Modern Masters 2017");
|
||||
setsAliases.put("MMQ", "Mercadian Masques");
|
||||
setsAliases.put("MOR", "Morningtide");
|
||||
setsAliases.put("MPRP", "Magic Player Rewards");
|
||||
|
@ -260,6 +266,16 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
languageAliases.put("de", "German");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNextHttpImageUrl() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileForHttpImage(String httpImageUrl) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private Map<String, String> getSetLinks(String cardSet) {
|
||||
ConcurrentHashMap<String, String> setLinks = new ConcurrentHashMap<>();
|
||||
ExecutorService executor = Executors.newFixedThreadPool(10);
|
||||
|
|
|
@ -51,6 +51,7 @@ import mage.client.constants.Constants;
|
|||
import mage.client.dialog.PreferencesDialog;
|
||||
import mage.client.util.sets.ConstructedFormats;
|
||||
import mage.remote.Connection;
|
||||
import mage.util.RandomUtil;
|
||||
import net.java.truevfs.access.TFile;
|
||||
import net.java.truevfs.access.TFileOutputStream;
|
||||
import net.java.truevfs.access.TVFS;
|
||||
|
@ -58,6 +59,7 @@ import net.java.truevfs.kernel.spec.FsSyncException;
|
|||
import org.apache.log4j.Logger;
|
||||
import org.mage.plugins.card.dl.sources.CardImageSource;
|
||||
import org.mage.plugins.card.dl.sources.MagicCardsImageSource;
|
||||
import org.mage.plugins.card.dl.sources.MtgOnlTokensImageSource;
|
||||
import org.mage.plugins.card.dl.sources.MythicspoilerComSource;
|
||||
import org.mage.plugins.card.dl.sources.TokensMtgImageSource;
|
||||
import org.mage.plugins.card.dl.sources.WizardCardsImageSource;
|
||||
|
@ -67,7 +69,6 @@ import org.mage.plugins.card.utils.CardImageUtils;
|
|||
public class DownloadPictures extends DefaultBoundedRangeModel implements Runnable {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(DownloadPictures.class);
|
||||
private static final Random rnd = new Random();
|
||||
|
||||
private JProgressBar bar;
|
||||
private final JOptionPane dlg;
|
||||
|
@ -145,6 +146,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
|||
"wizards.com",
|
||||
"mythicspoiler.com",
|
||||
"tokens.mtg.onl", //"mtgimage.com (HQ)",
|
||||
"mtg.onl"
|
||||
//"mtgathering.ru HQ",
|
||||
//"mtgathering.ru MQ",
|
||||
//"mtgathering.ru LQ",
|
||||
|
@ -172,6 +174,9 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
|||
case 3:
|
||||
cardImageSource = TokensMtgImageSource.getInstance();
|
||||
break;
|
||||
case 4:
|
||||
cardImageSource = MtgOnlTokensImageSource.getInstance();
|
||||
break;
|
||||
}
|
||||
int count = DownloadPictures.this.cards.size();
|
||||
float mb = (count * cardImageSource.getAverageSize()) / 1024;
|
||||
|
@ -492,15 +497,30 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
|||
url = cardImageSource.generateURL(card);
|
||||
}
|
||||
|
||||
if (url != null) {
|
||||
Runnable task = new DownloadTask(card, new URL(url), cardsToDownload.size());
|
||||
if (url == null) {
|
||||
String imageRef = cardImageSource.getNextHttpImageUrl();
|
||||
String fileName = cardImageSource.getFileForHttpImage(imageRef);
|
||||
if (imageRef != null && fileName != null) {
|
||||
imageRef = cardImageSource.getSourceName() + imageRef;
|
||||
try {
|
||||
URL imageUrl = new URL(imageRef);
|
||||
|
||||
Runnable task = new DownloadTask(imageUrl, fileName, 1);
|
||||
executor.execute(task);
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
} else {
|
||||
if (card != null) {
|
||||
logger.info("Card not available on " + cardImageSource.getSourceName() + ": " + card.getName() + " (" + card.getSet() + ")");
|
||||
synchronized (sync) {
|
||||
update(cardIndex + 1, cardsToDownload.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (url != null) {
|
||||
Runnable task = new DownloadTask(card, new URL(url), cardsToDownload.size());
|
||||
executor.execute(task);
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
logger.error(ex, ex);
|
||||
|
@ -535,11 +555,23 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
|||
private final CardDownloadData card;
|
||||
private final URL url;
|
||||
private final int count;
|
||||
private final String actualFilename;
|
||||
private boolean useSpecifiedPaths;
|
||||
|
||||
public DownloadTask(CardDownloadData card, URL url, int count) {
|
||||
this.card = card;
|
||||
this.url = url;
|
||||
this.count = count;
|
||||
this.actualFilename = "";
|
||||
useSpecifiedPaths = false;
|
||||
}
|
||||
|
||||
public DownloadTask(URL url, String actualFilename, int count) {
|
||||
this.card = null;
|
||||
this.url = url;
|
||||
this.count = count;
|
||||
this.actualFilename = actualFilename;
|
||||
useSpecifiedPaths = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -549,9 +581,20 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
|||
TFile outputFile = null;
|
||||
try {
|
||||
filePath.append(Constants.IO.imageBaseDir);
|
||||
if (!useSpecifiedPaths && card != null) {
|
||||
filePath.append(card.hashCode()).append(".").append(card.getName().replace(":", "").replace("//", "-")).append(".jpg");
|
||||
temporaryFile = new File(filePath.toString());
|
||||
String imagePath = CardImageUtils.generateImagePath(card);
|
||||
}
|
||||
String imagePath;
|
||||
if (useSpecifiedPaths) {
|
||||
imagePath = CardImageUtils.getTokenBasePath(); // temporaryFile = plugins/images\NUM.jace, telepath unbound.jpg
|
||||
imagePath += actualFilename; // imagePath = d:\xmage_images\ORI.zip\ORI\Jace,telepathunbound.jpg
|
||||
String tmpFile = filePath + actualFilename + ".2";
|
||||
temporaryFile = new File(tmpFile.toString());
|
||||
} else {
|
||||
imagePath = CardImageUtils.generateImagePath(card);
|
||||
}
|
||||
|
||||
outputFile = new TFile(imagePath);
|
||||
if (!outputFile.exists()) {
|
||||
outputFile.getParentFile().mkdirs();
|
||||
|
@ -599,7 +642,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
|||
out.flush();
|
||||
out.close();
|
||||
|
||||
if (card.isTwoFacedCard()) {
|
||||
if (card != null && card.isTwoFacedCard()) {
|
||||
BufferedImage image = ImageIO.read(temporaryFile);
|
||||
if (image.getHeight() == 470) {
|
||||
BufferedImage renderedImage = new BufferedImage(265, 370, BufferedImage.TYPE_INT_RGB);
|
||||
|
@ -620,11 +663,13 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
|||
new TFile(temporaryFile).cp_rp(outputFile);
|
||||
}
|
||||
} else {
|
||||
if (card != null) {
|
||||
logger.warn("Image download for " + card.getName()
|
||||
+ (!card.getDownloadName().equals(card.getName()) ? " downloadname: " + card.getDownloadName() : "")
|
||||
+ "(" + card.getSet() + ") failed - responseCode: " + responseCode + " url: " + url.toString());
|
||||
}
|
||||
if (logger.isDebugEnabled()) { // Shows the returned html from the request to the web server
|
||||
logger.debug("Return ed HTML ERROR:\n" + convertStreamToString(((HttpURLConnection) httpConn).getErrorStream()));
|
||||
logger.debug("Returned HTML ERROR:\n" + convertStreamToString(((HttpURLConnection) httpConn).getErrorStream()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -644,7 +689,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
|||
|
||||
private void setUpConnection(URLConnection httpConn) {
|
||||
// images download from magiccards.info may not work with default 'User-Agent: Java/1.x.x' request header
|
||||
switch (rnd.nextInt(3)) {
|
||||
switch (RandomUtil.nextInt(3)) {
|
||||
// chrome
|
||||
case 0:
|
||||
httpConn.setRequestProperty("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
||||
|
|
|
@ -118,6 +118,17 @@ public class CardImageUtils {
|
|||
}
|
||||
}
|
||||
|
||||
public static String getTokenBasePath() {
|
||||
String useDefault = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_USE_DEFAULT, "true");
|
||||
String imagesPath = useDefault.equals("true") ? null : PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_PATH, null);
|
||||
|
||||
if (PreferencesDialog.isSaveImagesToZip()) {
|
||||
return imagesPath + TFile.separator + "TOK" + ".zip" + TFile.separator;
|
||||
} else {
|
||||
return imagesPath + TFile.separator + "TOK" + TFile.separator;
|
||||
}
|
||||
}
|
||||
|
||||
private static String getTokenDescriptorImagePath(CardDownloadData card) {
|
||||
String useDefault = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_USE_DEFAULT, "true");
|
||||
String imagesPath = useDefault.equals("true") ? null : PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_PATH, null);
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
|Generate|TOK:CN2|Assassin||
|
||||
|Generate|TOK:CN2|Beast||
|
||||
|Generate|TOK:CN2|Construct||
|
||||
|Generate|TOK:CN2|Dragon||
|
||||
|Generate|TOK:CN2|Goblin||
|
||||
|Generate|TOK:CN2|Insect||
|
||||
|Generate|TOK:CN2|Lizard||
|
||||
|Generate|TOK:CN2|Soldier|1|
|
||||
|Generate|TOK:CN2|Soldier|2|
|
||||
|Generate|TOK:CN2|Spirit||
|
||||
|Generate|TOK:CN2|Zombie||
|
||||
|
||||
|Generate|TOK:EMA|Carnivore||
|
||||
|Generate|TOK:EMA|Dragon||
|
||||
|Generate|TOK:EMA|Elemental|1|
|
||||
|
|
|
@ -74,6 +74,6 @@ dd3evg=ddaevg
|
|||
dd3gvl=ddagvl
|
||||
dd3jvc=ddajvc
|
||||
# Remove setname as soon as the images can be downloaded
|
||||
ignore.urls=TOK,AER,PCA,C16,V16,KLD,DDR,CN2
|
||||
ignore.urls=TOK,AER,PCA,C16,DDS,ANB,AKH,HOU,MM3
|
||||
# sets ordered by release time (newest goes first)
|
||||
token.lookup.order=DD3DVD,DD3EVG,DD3GVL,DD3JVC,H09,AER,PCA,C16,V16,KLD,DDR,CN2,EMN,EMA,SOI,DDQ,CP,CMA,ARENA,SUS,APAC,EURO,UGIN,C15,OGW,EXP,DDP,BFZ,DRB,V09,V10,V11,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC
|
||||
token.lookup.order=ANB,HOU,MM3,DDS,AKH,DD3DVD,DD3EVG,DD3GVL,DD3JVC,H09,AER,PCA,C16,V16,KLD,DDR,CN2,EMN,EMA,SOI,DDQ,CP,CMA,ARENA,SUS,APAC,EURO,UGIN,C15,OGW,EXP,DDP,BFZ,DRB,V09,V10,V11,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC
|
|
@ -14,6 +14,7 @@ import mage.cards.decks.Deck;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.interfaces.rate.RateCallback;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
* Builds deck from provided card pool.
|
||||
|
@ -205,7 +206,7 @@ public class DeckBuilder {
|
|||
ColoredManaSymbol bestColor = null;
|
||||
//Default to a color in the allowed colors
|
||||
if (allowedColors != null && !allowedColors.isEmpty()) {
|
||||
bestColor = allowedColors.get(new Random().nextInt(allowedColors.size()));
|
||||
bestColor = allowedColors.get(RandomUtil.nextInt(allowedColors.size()));
|
||||
}
|
||||
int lowestRatio = Integer.MAX_VALUE;
|
||||
for (final ColoredManaSymbol color : ColoredManaSymbol.values()) {
|
||||
|
|
|
@ -475,6 +475,7 @@ public class CardView extends SimpleCardView {
|
|||
this.manaCost = token.getManaCost().getSymbols();
|
||||
this.rarity = Rarity.NA;
|
||||
this.type = token.getTokenType();
|
||||
this.tokenDescriptor = token.getTokenDescriptor();
|
||||
this.tokenSetCode = token.getOriginalExpansionSetCode();
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import java.util.Map;
|
|||
import java.util.UUID;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameState;
|
||||
|
@ -58,8 +58,7 @@ public class PlayerView implements Serializable {
|
|||
private final UUID playerId;
|
||||
private final String name;
|
||||
private final int life;
|
||||
private final int poison;
|
||||
private final int experience;
|
||||
private final Counters counters;
|
||||
private final int wins;
|
||||
private final int winsNeeded;
|
||||
private final long deckHashCode;
|
||||
|
@ -90,8 +89,7 @@ public class PlayerView implements Serializable {
|
|||
this.playerId = player.getId();
|
||||
this.name = player.getName();
|
||||
this.life = player.getLife();
|
||||
this.poison = player.getCounters().getCount(CounterType.POISON);
|
||||
this.experience = player.getCounters().getCount(CounterType.EXPERIENCE);
|
||||
this.counters = player.getCounters();
|
||||
this.wins = player.getMatchPlayer().getWins();
|
||||
this.winsNeeded = player.getMatchPlayer().getWinsNeeded();
|
||||
// If match ended immediately before, deck can be set to null so check is necessarry here
|
||||
|
@ -195,12 +193,8 @@ public class PlayerView implements Serializable {
|
|||
return this.life;
|
||||
}
|
||||
|
||||
public int getPoison() {
|
||||
return this.poison;
|
||||
}
|
||||
|
||||
public int getExperience() {
|
||||
return this.experience;
|
||||
public Counters getCounters() {
|
||||
return this.counters;
|
||||
}
|
||||
|
||||
public int getLibraryCount() {
|
||||
|
|
|
@ -56,6 +56,7 @@ import mage.game.permanent.token.EmptyToken;
|
|||
import mage.game.turn.TurnMod;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -135,7 +136,6 @@ class MomirEmblem extends Emblem {
|
|||
|
||||
class MomirEffect extends OneShotEffect {
|
||||
|
||||
private static final Random rnd = new Random();
|
||||
|
||||
public MomirEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
|
@ -158,7 +158,7 @@ class MomirEffect extends OneShotEffect {
|
|||
CardCriteria criteria = new CardCriteria().types(CardType.CREATURE).convertedManaCost(value);
|
||||
List<CardInfo> options = CardRepository.instance.findCards(criteria);
|
||||
if (options != null && !options.isEmpty()) {
|
||||
Card card = options.get(rnd.nextInt(options.size())).getCard();
|
||||
Card card = options.get(RandomUtil.nextInt(options.size())).getCard();
|
||||
EmptyToken token = new EmptyToken();
|
||||
CardUtil.copyTo(token).from(card);
|
||||
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), false, false);
|
||||
|
|
|
@ -104,6 +104,7 @@ import mage.players.Player;
|
|||
import mage.target.Target;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.Targets;
|
||||
import mage.util.RandomUtil;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
|
@ -128,7 +129,6 @@ public class ComputerPlayer6 extends ComputerPlayer /*implements Player*/ {
|
|||
protected Set<String> actionCache;
|
||||
private static final List<TreeOptimizer> optimizers = new ArrayList<>();
|
||||
protected int lastLoggedTurn = 0;
|
||||
Random random = new Random();
|
||||
protected static final String BLANKS = "...............................................";
|
||||
|
||||
static {
|
||||
|
@ -631,7 +631,7 @@ public class ComputerPlayer6 extends ComputerPlayer /*implements Player*/ {
|
|||
if (depth == maxDepth && action instanceof PassAbility) {
|
||||
val = val - PASSIVITY_PENALTY; // passivity penalty
|
||||
}
|
||||
if (val > alpha || (depth == maxDepth && val == alpha && random.nextBoolean())) { // Adding random for equal value to get change sometimes
|
||||
if (val > alpha || (depth == maxDepth && val == alpha && RandomUtil.nextBoolean())) { // Adding random for equal value to get change sometimes
|
||||
alpha = val;
|
||||
bestNode = newNode;
|
||||
bestNode.setScore(val);
|
||||
|
|
|
@ -42,7 +42,6 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
import java.util.UUID;
|
||||
|
@ -138,10 +137,7 @@ import mage.target.common.TargetDiscard;
|
|||
import mage.target.common.TargetOpponent;
|
||||
import mage.target.common.TargetPermanentOrPlayer;
|
||||
import mage.target.common.TargetSpellOrPermanent;
|
||||
import mage.util.Copier;
|
||||
import mage.util.MessageToClient;
|
||||
import mage.util.TournamentUtil;
|
||||
import mage.util.TreeNode;
|
||||
import mage.util.*;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
|
@ -165,7 +161,6 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
private transient List<ColoredManaSymbol> chosenColors;
|
||||
|
||||
private transient ManaCost currentUnpaidMana;
|
||||
private final Random random = new Random();
|
||||
|
||||
public ComputerPlayer(String name, RangeOfInfluence range) {
|
||||
super(name, range);
|
||||
|
@ -1258,7 +1253,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
public int announceXCost(int min, int max, String message, Game game, Ability ability, VariableCost variablCost) {
|
||||
log.debug("announceXMana");
|
||||
//TODO: improve this
|
||||
int value = new Random().nextInt(max + 1);
|
||||
int value = RandomUtil.nextInt(max + 1);
|
||||
if (value < max) {
|
||||
value++;
|
||||
}
|
||||
|
@ -1276,11 +1271,11 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
|
||||
@Override
|
||||
public boolean chooseUse(Outcome outcome, String message, Ability source, Game game) {
|
||||
return this.chooseUse(outcome, new MessageToClient(message), source, game);
|
||||
return this.chooseUse(outcome, message, null, null, null, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean chooseUse(Outcome outcome, MessageToClient message, Ability source, Game game) {
|
||||
public boolean chooseUse(Outcome outcome, String message, String secondMessage, String trueText, String falseText, Ability source, Game game) {
|
||||
log.debug("chooseUse: " + outcome.isGood());
|
||||
// Be proactive! Always use abilities, the evaluation function will decide if it's good or not
|
||||
// Otherwise some abilities won't be used by AI like LoseTargetEffect that has "bad" outcome
|
||||
|
@ -1558,7 +1553,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
}
|
||||
//TODO: improve this
|
||||
if (min < max && min == 0) {
|
||||
return new Random().nextInt(max + 1);
|
||||
return RandomUtil.nextInt(max + 1);
|
||||
}
|
||||
return min;
|
||||
}
|
||||
|
@ -1587,7 +1582,6 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
}
|
||||
|
||||
private static void addBasicLands(Deck deck, String landName, int number) {
|
||||
Random random = new Random();
|
||||
Set<String> landSets = TournamentUtil.getLandSetCodeForDeckSets(deck.getExpansionSetCodes());
|
||||
|
||||
CardCriteria criteria = new CardCriteria();
|
||||
|
@ -1605,7 +1599,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
}
|
||||
|
||||
for (int i = 0; i < number; i++) {
|
||||
Card land = cards.get(random.nextInt(cards.size())).getCard();
|
||||
Card land = cards.get(RandomUtil.nextInt(cards.size())).getCard();
|
||||
deck.getCards().add(land);
|
||||
}
|
||||
}
|
||||
|
@ -2239,7 +2233,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
UUID randomOpponentId = game.getOpponents(abilityControllerId).iterator().next();
|
||||
Set<UUID> opponents = game.getOpponents(abilityControllerId);
|
||||
if (opponents.size() > 1) {
|
||||
int rand = random.nextInt(opponents.size());
|
||||
int rand = RandomUtil.nextInt(opponents.size());
|
||||
int count = 0;
|
||||
for (UUID currentId : opponents) {
|
||||
if (count == rand) {
|
||||
|
|
|
@ -54,6 +54,7 @@ import mage.players.Player;
|
|||
import mage.target.Target;
|
||||
import mage.target.TargetAmount;
|
||||
import mage.target.TargetCard;
|
||||
import mage.util.RandomUtil;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
|
@ -65,7 +66,6 @@ import org.apache.log4j.Logger;
|
|||
public class SimulatedPlayerMCTS extends MCTSPlayer {
|
||||
|
||||
private boolean isSimulatedPlayer;
|
||||
private static Random rnd = new Random();
|
||||
private int actionCount = 0;
|
||||
private static final Logger logger = Logger.getLogger(SimulatedPlayerMCTS.class);
|
||||
|
||||
|
@ -115,21 +115,21 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
if (playables.size() == 1) {
|
||||
ability = playables.get(0);
|
||||
} else {
|
||||
ability = playables.get(rnd.nextInt(playables.size()));
|
||||
ability = playables.get(RandomUtil.nextInt(playables.size()));
|
||||
}
|
||||
List<Ability> options = getPlayableOptions(ability, game);
|
||||
if (!options.isEmpty()) {
|
||||
if (options.size() == 1) {
|
||||
ability = options.get(0);
|
||||
} else {
|
||||
ability = options.get(rnd.nextInt(options.size()));
|
||||
ability = options.get(RandomUtil.nextInt(options.size()));
|
||||
}
|
||||
}
|
||||
if (ability.getManaCosts().getVariableCosts().size() > 0) {
|
||||
int amount = getAvailableManaProducers(game).size() - ability.getManaCosts().convertedManaCost();
|
||||
if (amount > 0) {
|
||||
ability = ability.copy();
|
||||
ability.getManaCostsToPay().add(new GenericManaCost(rnd.nextInt(amount)));
|
||||
ability.getManaCostsToPay().add(new GenericManaCost(RandomUtil.nextInt(amount)));
|
||||
}
|
||||
}
|
||||
// check if ability kills player, if not then it's ok to play
|
||||
|
@ -163,7 +163,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
if (options.size() == 1) {
|
||||
ability = options.get(0);
|
||||
} else {
|
||||
ability = options.get(rnd.nextInt(options.size()));
|
||||
ability = options.get(RandomUtil.nextInt(options.size()));
|
||||
}
|
||||
}
|
||||
if (ability.isUsesStack()) {
|
||||
|
@ -192,7 +192,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
List<Permanent> attackersList = super.getAvailableAttackers(defenderId, game);
|
||||
//use binary digits to calculate powerset of attackers
|
||||
int powerElements = (int) Math.pow(2, attackersList.size());
|
||||
int value = rnd.nextInt(powerElements);
|
||||
int value = RandomUtil.nextInt(powerElements);
|
||||
StringBuilder binary = new StringBuilder();
|
||||
binary.append(Integer.toBinaryString(value));
|
||||
while (binary.length() < attackersList.size()) {
|
||||
|
@ -219,7 +219,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
|
||||
List<Permanent> blockers = getAvailableBlockers(game);
|
||||
for (Permanent blocker : blockers) {
|
||||
int check = rnd.nextInt(numGroups + 1);
|
||||
int check = RandomUtil.nextInt(numGroups + 1);
|
||||
if (check < numGroups) {
|
||||
CombatGroup group = game.getCombat().getGroups().get(check);
|
||||
if (group.getAttackers().size() > 0) {
|
||||
|
@ -245,7 +245,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
return true;
|
||||
}
|
||||
Iterator<UUID> it = possibleTargets.iterator();
|
||||
int targetNum = rnd.nextInt(possibleTargets.size());
|
||||
int targetNum = RandomUtil.nextInt(possibleTargets.size());
|
||||
UUID targetId = it.next();
|
||||
for (int i = 0; i < targetNum; i++) {
|
||||
targetId = it.next();
|
||||
|
@ -260,7 +260,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
return false;
|
||||
}
|
||||
if (!target.isRequired(source)) {
|
||||
if (rnd.nextInt(possibleTargets.size() + 1) == 0) {
|
||||
if (RandomUtil.nextInt(possibleTargets.size() + 1) == 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
return true;
|
||||
}
|
||||
Iterator<UUID> it = possibleTargets.iterator();
|
||||
int targetNum = rnd.nextInt(possibleTargets.size());
|
||||
int targetNum = RandomUtil.nextInt(possibleTargets.size());
|
||||
UUID targetId = it.next();
|
||||
for (int i = 0; i < targetNum; i++) {
|
||||
targetId = it.next();
|
||||
|
@ -305,7 +305,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
return false;
|
||||
}
|
||||
Iterator<UUID> it = possibleTargets.iterator();
|
||||
int targetNum = rnd.nextInt(possibleTargets.size());
|
||||
int targetNum = RandomUtil.nextInt(possibleTargets.size());
|
||||
UUID targetId = it.next();
|
||||
for (int i = 0; i < targetNum; i++) {
|
||||
targetId = it.next();
|
||||
|
@ -338,7 +338,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
return !target.isRequired(source);
|
||||
}
|
||||
if (!target.isRequired(source)) {
|
||||
if (rnd.nextInt(possibleTargets.size() + 1) == 0) {
|
||||
if (RandomUtil.nextInt(possibleTargets.size() + 1) == 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -347,24 +347,24 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
return true;
|
||||
}
|
||||
Iterator<UUID> it = possibleTargets.iterator();
|
||||
int targetNum = rnd.nextInt(possibleTargets.size());
|
||||
int targetNum = RandomUtil.nextInt(possibleTargets.size());
|
||||
UUID targetId = it.next();
|
||||
for (int i = 0; i < targetNum; i++) {
|
||||
targetId = it.next();
|
||||
}
|
||||
target.addTarget(targetId, rnd.nextInt(target.getAmountRemaining()) + 1, source, game);
|
||||
target.addTarget(targetId, RandomUtil.nextInt(target.getAmountRemaining()) + 1, source, game);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean chooseMulligan(Game game) {
|
||||
return rnd.nextBoolean();
|
||||
return RandomUtil.nextBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean chooseUse(Outcome outcome, String message, Ability source, Game game) {
|
||||
if (this.isHuman()) {
|
||||
return rnd.nextBoolean();
|
||||
return RandomUtil.nextBoolean();
|
||||
}
|
||||
return super.chooseUse(outcome, message, source, game);
|
||||
}
|
||||
|
@ -372,7 +372,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
@Override
|
||||
public boolean choosePile(Outcome outcome, String message, List<? extends Card> pile1, List<? extends Card> pile2, Game game) {
|
||||
if (this.isHuman()) {
|
||||
return rnd.nextBoolean();
|
||||
return RandomUtil.nextBoolean();
|
||||
}
|
||||
return super.choosePile(outcome, message, pile1, pile2, game);
|
||||
}
|
||||
|
@ -382,7 +382,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
if (this.isHuman()) {
|
||||
Iterator<String> it = choice.getChoices().iterator();
|
||||
String sChoice = it.next();
|
||||
int choiceNum = rnd.nextInt(choice.getChoices().size());
|
||||
int choiceNum = RandomUtil.nextInt(choice.getChoices().size());
|
||||
for (int i = 0; i < choiceNum; i++) {
|
||||
sChoice = it.next();
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
@Override
|
||||
public int chooseReplacementEffect(Map<String, String> rEffects, Game game) {
|
||||
if (this.isHuman()) {
|
||||
return rnd.nextInt(rEffects.size());
|
||||
return RandomUtil.nextInt(rEffects.size());
|
||||
}
|
||||
return super.chooseReplacementEffect(rEffects, game);
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
@Override
|
||||
public TriggeredAbility chooseTriggeredAbility(List<TriggeredAbility> abilities, Game game) {
|
||||
if (this.isHuman()) {
|
||||
return abilities.get(rnd.nextInt(abilities.size()));
|
||||
return abilities.get(RandomUtil.nextInt(abilities.size()));
|
||||
}
|
||||
return super.chooseTriggeredAbility(abilities, game);
|
||||
}
|
||||
|
@ -416,7 +416,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
if (modes.size() == 1) {
|
||||
return mode;
|
||||
}
|
||||
int modeNum = rnd.nextInt(modes.getAvailableModes(source, game).size());
|
||||
int modeNum = RandomUtil.nextInt(modes.getAvailableModes(source, game).size());
|
||||
for (int i = 0; i < modeNum; i++) {
|
||||
mode = it.next();
|
||||
}
|
||||
|
@ -428,7 +428,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
@Override
|
||||
public UUID chooseAttackerOrder(List<Permanent> attackers, Game game) {
|
||||
if (this.isHuman()) {
|
||||
return attackers.get(rnd.nextInt(attackers.size())).getId();
|
||||
return attackers.get(RandomUtil.nextInt(attackers.size())).getId();
|
||||
}
|
||||
return super.chooseAttackerOrder(attackers, game);
|
||||
}
|
||||
|
@ -436,7 +436,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
@Override
|
||||
public UUID chooseBlockerOrder(List<Permanent> blockers, CombatGroup combatGroup, List<UUID> blockerOrder, Game game) {
|
||||
if (this.isHuman()) {
|
||||
return blockers.get(rnd.nextInt(blockers.size())).getId();
|
||||
return blockers.get(RandomUtil.nextInt(blockers.size())).getId();
|
||||
}
|
||||
return super.chooseBlockerOrder(blockers, combatGroup, blockerOrder, game);
|
||||
}
|
||||
|
@ -452,8 +452,8 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
targetId = targets.get(0);
|
||||
amount = remainingDamage;
|
||||
} else {
|
||||
targetId = targets.get(rnd.nextInt(targets.size()));
|
||||
amount = rnd.nextInt(damage + 1);
|
||||
targetId = targets.get(RandomUtil.nextInt(targets.size()));
|
||||
amount = RandomUtil.nextInt(damage + 1);
|
||||
}
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
|
@ -476,7 +476,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
@Override
|
||||
public int getAmount(int min, int max, String message, Game game) {
|
||||
if (this.isHuman()) {
|
||||
return rnd.nextInt(max - min) + min;
|
||||
return RandomUtil.nextInt(max - min) + min;
|
||||
}
|
||||
return super.getAmount(min, max, message, game);
|
||||
}
|
||||
|
|
|
@ -177,17 +177,25 @@ public class HumanPlayer extends PlayerImpl {
|
|||
|
||||
@Override
|
||||
public boolean chooseUse(Outcome outcome, String message, Ability source, Game game) {
|
||||
return this.chooseUse(outcome, new MessageToClient(message), source, game);
|
||||
return this.chooseUse(outcome, message, null, null, null, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean chooseUse(Outcome outcome, MessageToClient message, Ability source, Game game) {
|
||||
public boolean chooseUse(Outcome outcome, String message, String secondMessage, String trueText, String falseText, Ability source, Game game) {
|
||||
MessageToClient messageToClient = new MessageToClient(message, secondMessage);
|
||||
Map<String, Serializable> options = new HashMap<>(2);
|
||||
if (trueText != null) {
|
||||
options.put("UI.left.btn.text", trueText);
|
||||
}
|
||||
if (falseText != null) {
|
||||
options.put("UI.right.btn.text", falseText);
|
||||
}
|
||||
if (source != null) {
|
||||
Boolean answer = requestAutoAnswerId.get(source.getOriginalId() + "#" + message.getMessage());
|
||||
Boolean answer = requestAutoAnswerId.get(source.getOriginalId() + "#" + message);
|
||||
if (answer != null) {
|
||||
return answer;
|
||||
} else {
|
||||
answer = requestAutoAnswerText.get(message.getMessage());
|
||||
answer = requestAutoAnswerText.get(message);
|
||||
if (answer != null) {
|
||||
return answer;
|
||||
}
|
||||
|
@ -195,10 +203,10 @@ public class HumanPlayer extends PlayerImpl {
|
|||
}
|
||||
updateGameStatePriority("chooseUse", game);
|
||||
do {
|
||||
if (message.getSecondMessage() == null) {
|
||||
message.setSecondMessage(getRelatedObjectName(source, game));
|
||||
if (messageToClient.getSecondMessage() == null) {
|
||||
messageToClient.setSecondMessage(getRelatedObjectName(source, game));
|
||||
}
|
||||
game.fireAskPlayerEvent(playerId, message, source);
|
||||
game.fireAskPlayerEvent(playerId, messageToClient, source, options);
|
||||
waitForResponse(game);
|
||||
} while (response.getBoolean() == null && !abort);
|
||||
if (!abort) {
|
||||
|
|
|
@ -6,6 +6,7 @@ import mage.cards.repository.CardRepository;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
|
@ -95,10 +96,9 @@ public class SystemUtil {
|
|||
continue;
|
||||
}
|
||||
|
||||
Random random = new Random();
|
||||
Set<Card> cardsToLoad = new HashSet<>();
|
||||
for (int i = 0; i < amount; i++) {
|
||||
CardInfo cardInfo = cards.get(random.nextInt(cards.size()));
|
||||
CardInfo cardInfo = cards.get(RandomUtil.nextInt(cards.size()));
|
||||
Card card = cardInfo != null ? cardInfo.getCard() : null;
|
||||
if (card != null) {
|
||||
cardsToLoad.add(card);
|
||||
|
|
56
Mage.Sets/src/mage/sets/Amonkhet.java
Normal file
56
Mage.Sets/src/mage/sets/Amonkhet.java
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Copyright 2011 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;
|
||||
|
||||
import java.util.GregorianCalendar;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class Amonkhet extends ExpansionSet {
|
||||
|
||||
private static final Amonkhet fINSTANCE = new Amonkhet();
|
||||
|
||||
public static Amonkhet getInstance() {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
private Amonkhet() {
|
||||
super("Amonkhet", "AKH", "mage.sets.amonkhet", new GregorianCalendar(2017, 4, 28).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Amonkhet";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 8;
|
||||
}
|
||||
}
|
52
Mage.Sets/src/mage/sets/ArchenemyNicolBolas.java
Normal file
52
Mage.Sets/src/mage/sets/ArchenemyNicolBolas.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;
|
||||
|
||||
import java.util.GregorianCalendar;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class ArchenemyNicolBolas extends ExpansionSet {
|
||||
|
||||
private static final ArchenemyNicolBolas fINSTANCE = new ArchenemyNicolBolas();
|
||||
|
||||
public static ArchenemyNicolBolas getInstance() {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
private ArchenemyNicolBolas() {
|
||||
super("Archenemy: Nicol Bolas", "ANB", "mage.sets.archenemynicolbolas", new GregorianCalendar(2017, 6, 16).getTime(), SetType.SUPPLEMENTAL);
|
||||
this.blockName = "Command Zone";
|
||||
}
|
||||
|
||||
}
|
50
Mage.Sets/src/mage/sets/CommanderAnthology.java
Normal file
50
Mage.Sets/src/mage/sets/CommanderAnthology.java
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright 2011 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;
|
||||
|
||||
import java.util.GregorianCalendar;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class CommanderAnthology extends ExpansionSet {
|
||||
private static final CommanderAnthology fINSTANCE = new CommanderAnthology();
|
||||
|
||||
public static CommanderAnthology getInstance() {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
private CommanderAnthology() {
|
||||
super("Commander Anthology", "CMA", "mage.sets.commanderanthology", new GregorianCalendar(2017, 6, 9).getTime(), SetType.SUPPLEMENTAL);
|
||||
this.blockName = "Commander Anthology";
|
||||
this.hasBasicLands = false;
|
||||
}
|
||||
}
|
60
Mage.Sets/src/mage/sets/HourOfDevastation.java
Normal file
60
Mage.Sets/src/mage/sets/HourOfDevastation.java
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
import java.util.GregorianCalendar;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class HourOfDevastation extends ExpansionSet {
|
||||
|
||||
private static final HourOfDevastation fINSTANCE = new HourOfDevastation();
|
||||
|
||||
public static HourOfDevastation getInstance() {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
private HourOfDevastation() {
|
||||
super("Hour of Devastation", "HOU", "mage.sets.hourofdevastation", new GregorianCalendar(2017, 7, 14).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Amonkhet";
|
||||
this.parentSet = Amonkhet.getInstance();
|
||||
this.hasBasicLands = false;
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 8;
|
||||
}
|
||||
|
||||
}
|
|
@ -58,5 +58,11 @@ public class Kaladesh extends ExpansionSet {
|
|||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 8;
|
||||
/* There are additional cards, numbered 265–270, that don't appear in Kaladesh
|
||||
booster packs. These are new cards that are exclusive in the Planeswalker
|
||||
Decks supplemental product, which are replacing Intro Packs.
|
||||
These additional cards have a Kaladesh expansion symbol and are legal in all
|
||||
formats in which Kaladesh is legal. */
|
||||
this.maxCardNumberInBooster = 264;
|
||||
}
|
||||
}
|
||||
|
|
30
Mage.Sets/src/mage/sets/MindVsMight.java
Normal file
30
Mage.Sets/src/mage/sets/MindVsMight.java
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package mage.sets;
|
||||
|
||||
import java.util.GregorianCalendar;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
|
||||
public class MindVsMight extends ExpansionSet {
|
||||
private static final MindVsMight fINSTANCE = new MindVsMight();
|
||||
|
||||
public static MindVsMight getInstance() {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
private MindVsMight() {
|
||||
super("Duel Decks: Mind vs. Might", "DDS", "mage.sets.mindvsmight", new GregorianCalendar(2017, 3, 31).getTime(), SetType.SUPPLEMENTAL);
|
||||
this.blockName = "Duel Decks";
|
||||
this.hasBasicLands = false;
|
||||
}
|
||||
}
|
61
Mage.Sets/src/mage/sets/ModernMasters2017.java
Normal file
61
Mage.Sets/src/mage/sets/ModernMasters2017.java
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
import java.util.GregorianCalendar;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.SetType;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class ModernMasters2017 extends ExpansionSet {
|
||||
|
||||
private static final ModernMasters2017 fINSTANCE = new ModernMasters2017();
|
||||
|
||||
public static ModernMasters2017 getInstance() {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
private ModernMasters2017() {
|
||||
super("Modern Masters 2017", "MM3", "mage.sets.modernmasters2017", new GregorianCalendar(2017, 3, 17).getTime(), SetType.SUPPLEMENTAL);
|
||||
this.blockName = "Reprint";
|
||||
this.hasBasicLands = false;
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 8;
|
||||
}
|
||||
|
||||
}
|
|
@ -38,6 +38,7 @@ import mage.cards.repository.CardInfo;
|
|||
import mage.cards.repository.CardRepository;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SetType;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -73,7 +74,7 @@ public class ShadowsOverInnistrad extends ExpansionSet {
|
|||
public void addDoubleFace(List<Card> booster) {
|
||||
for (int i = 0; i < numBoosterDoubleFaced; i++) {
|
||||
List<CardInfo> doubleFacedCards;
|
||||
if (rnd.nextInt(15) < 10) {
|
||||
if (RandomUtil.nextInt(15) < 10) {
|
||||
doubleFacedCards = getDoubleFacedCardsByRarity(Rarity.COMMON);
|
||||
} else {
|
||||
doubleFacedCards = getDoubleFacedCardsByRarity(Rarity.UNCOMMON);
|
||||
|
@ -99,14 +100,14 @@ public class ShadowsOverInnistrad extends ExpansionSet {
|
|||
@Override
|
||||
public int getNumberOfSpecialCommons() {
|
||||
// Then about an eighth of the packs will have a second double-faced card, which will be a rare or mythic rare.
|
||||
return rnd.nextInt(8) == 0 ? 1 : 0;
|
||||
return RandomUtil.nextInt(8) == 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addSpecialCommon(List<Card> booster, int number) {
|
||||
// number is here always 1
|
||||
List<CardInfo> doubleFacedCards;
|
||||
if (rnd.nextInt(8) > 0) {
|
||||
if (RandomUtil.nextInt(8) > 0) {
|
||||
doubleFacedCards = getDoubleFacedCardsByRarity(Rarity.RARE);
|
||||
} else {
|
||||
doubleFacedCards = getDoubleFacedCardsByRarity(Rarity.MYTHIC);
|
||||
|
|
|
@ -94,7 +94,7 @@ class ZombieWizardToken extends Token {
|
|||
ZombieWizardToken() {
|
||||
super("Zombie Wizard", "a 1/1 blue and black Zombie Wizard creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
color.setBlue(true);
|
||||
color.setBlack(true);
|
||||
subtype.add("Zombie");
|
||||
subtype.add("Wizard");
|
||||
|
|
|
@ -48,6 +48,7 @@ import mage.players.Player;
|
|||
import mage.players.PlayerList;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -76,7 +77,6 @@ public class WhimsOfTheFates extends CardImpl {
|
|||
|
||||
class WhimsOfTheFateEffect extends OneShotEffect {
|
||||
|
||||
protected static Random rnd = new Random();
|
||||
|
||||
public WhimsOfTheFateEffect() {
|
||||
super(Outcome.Detriment);
|
||||
|
@ -173,7 +173,7 @@ class WhimsOfTheFateEffect extends OneShotEffect {
|
|||
Player player = game.getPlayer(playerPiles.getKey());
|
||||
if (player != null) {
|
||||
// decide which pile to sacrifice
|
||||
int sacrificePile = rnd.nextInt(3) + 1; // random number from 1 - 3
|
||||
int sacrificePile = RandomUtil.nextInt(3) + 1; // random number from 1 - 3
|
||||
game.informPlayers(new StringBuilder(player.getLogName()).append(" sacrifices pile number ").append(sacrificePile).toString());
|
||||
for (UUID permanentId : playerPiles.getValue().get(sacrificePile)) {
|
||||
Permanent permanent = game.getPermanent(permanentId);
|
||||
|
|
|
@ -91,6 +91,7 @@ public class LivingArmor extends CardImpl {
|
|||
if (creature != null) {
|
||||
int amount = creature.getConvertedManaCost();
|
||||
creature.addCounters(new BoostCounter(0, 1, amount), game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -98,10 +99,9 @@ class RuhanOfTheFomoriEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Random random = new Random();
|
||||
List<UUID> opponents = new ArrayList<>();
|
||||
opponents.addAll(game.getOpponents(controller.getId()));
|
||||
Player opponent = game.getPlayer(opponents.get(random.nextInt(opponents.size())));
|
||||
Player opponent = game.getPlayer(opponents.get(RandomUtil.nextInt(opponents.size())));
|
||||
if (opponent != null) {
|
||||
ContinuousEffect effect = new AttacksIfAbleTargetPlayerSourceEffect();
|
||||
effect.setTargetPointer(new FixedTarget(opponent.getId()));
|
||||
|
|
|
@ -49,6 +49,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -102,10 +103,9 @@ class RavingDeadEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Random random = new Random();
|
||||
List<UUID> opponents = new ArrayList<>();
|
||||
opponents.addAll(game.getOpponents(controller.getId()));
|
||||
Player opponent = game.getPlayer(opponents.get(random.nextInt(opponents.size())));
|
||||
Player opponent = game.getPlayer(opponents.get(RandomUtil.nextInt(opponents.size())));
|
||||
if (opponent != null) {
|
||||
ContinuousEffect effect = new AttacksIfAbleTargetPlayerSourceEffect();
|
||||
effect.setTargetPointer(new FixedTarget(opponent.getId()));
|
||||
|
|
|
@ -50,7 +50,6 @@ import mage.players.Player;
|
|||
import mage.target.common.TargetCardInGraveyard;
|
||||
import mage.target.common.TargetCardInOpponentsGraveyard;
|
||||
import mage.target.common.TargetOpponent;
|
||||
import mage.util.MessageToClient;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -157,10 +156,14 @@ class DawnbreakReclaimerEffect extends OneShotEffect {
|
|||
cards.add(controllerCreatureCard);
|
||||
}
|
||||
if (!cards.isEmpty()) {
|
||||
MessageToClient message = new MessageToClient("Return those cards to the battlefield under their owners' control?",
|
||||
"Opponent's creature card: " + (cardOpponentGraveyard == null ? "none" : cardOpponentGraveyard.getLogName())
|
||||
+ ", your creature card: " + (controllerCreatureCard == null ? "none" : controllerCreatureCard.getLogName()));
|
||||
if (controller.chooseUse(outcome, message, source, game)) {
|
||||
if (controller.chooseUse(
|
||||
outcome,
|
||||
"Return those cards to the battlefield under their owners' control?",
|
||||
"Opponent's creature card: " + (cardOpponentGraveyard == null ? "none" : cardOpponentGraveyard.getLogName()) + ", your creature card: " + (controllerCreatureCard == null ? "none" : controllerCreatureCard.getLogName()),
|
||||
null,
|
||||
null,
|
||||
source,
|
||||
game)) {
|
||||
controller.moveCards(cards, Zone.BATTLEFIELD, source, game, false, false, true, null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ import mage.cards.CardImpl;
|
|||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -98,8 +99,7 @@ class HauntedFengrafEffect extends OneShotEffect {
|
|||
if (player != null) {
|
||||
Card[] cards = player.getGraveyard().getCards(new FilterCreatureCard(), game).toArray(new Card[0]);
|
||||
if (cards.length > 0) {
|
||||
Random rnd = new Random();
|
||||
Card card = cards[rnd.nextInt(cards.length)];
|
||||
Card card = cards[RandomUtil.nextInt(cards.length)];
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, true);
|
||||
game.informPlayers(card.getName() + " returned to the hand of " + player.getLogName());
|
||||
return true;
|
||||
|
|
|
@ -78,7 +78,7 @@ class SkywiseTeachingsToken extends Token {
|
|||
SkywiseTeachingsToken() {
|
||||
super("Djinn Monk", "a 2/2 blue Djinn Monk creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
color.setBlue(true);
|
||||
this.subtype.add("Djinn");
|
||||
this.subtype.add("Monk");
|
||||
power = new MageInt(2);
|
||||
|
|
|
@ -43,7 +43,6 @@ import mage.game.Game;
|
|||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetOpponent;
|
||||
import mage.util.MessageToClient;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -102,8 +101,7 @@ class FortunesFavorEffect extends OneShotEffect {
|
|||
cards.removeAll(target.getTargets());
|
||||
controller.revealCards(sourceObject.getIdName() + " - cards in face-up pile", cards, game);
|
||||
game.informPlayers(targetOpponent.getLogName() + " puts " + faceDownPile.size() + " card(s) into the face-down pile");
|
||||
MessageToClient message = new MessageToClient("Put the face-down pile into your hand?", "(If you say yes, the face-up pile goes to the graveyard.)");
|
||||
if (controller.chooseUse(outcome, message, source, game)) {
|
||||
if (controller.chooseUse(outcome, "Choose a pile to put in your hand.", null, "Face-down", "Face-up", source, game)) {
|
||||
controller.moveCards(faceDownPile, Zone.HAND, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
} else {
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
*/
|
||||
package mage.sets.eldritchmoon;
|
||||
|
||||
import mage.sets.EldritchMoon;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
|
|
|
@ -52,8 +52,8 @@ public class OrcishSpy1 extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {tap}: Look at the top three cards of target player's library.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.LIBRARY, new LookLibraryTopCardTargetPlayerEffect(3), new TapSourceCost());
|
||||
// {T}: Look at the top three cards of target player's library.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryTopCardTargetPlayerEffect(3), new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
79
Mage.Sets/src/mage/sets/fifthedition/TheBrute.java
Normal file
79
Mage.Sets/src/mage/sets/fifthedition/TheBrute.java
Normal file
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* 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.fifthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.RegenerateAttachedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Derpthemeus
|
||||
*/
|
||||
public class TheBrute extends CardImpl {
|
||||
|
||||
public TheBrute(UUID ownerId) {
|
||||
super(ownerId, 272, "The Brute", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");
|
||||
this.expansionSetCode = "5ED";
|
||||
this.subtype.add("Aura");
|
||||
|
||||
// Enchant creature
|
||||
TargetCreaturePermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||
EnchantAbility ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Enchanted creature gets +1/+0.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0)));
|
||||
|
||||
// {R}{R}{R}: Regenerate enchanted creature.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateAttachedEffect(AttachmentType.AURA), new ManaCostsImpl("{R}{R}{R}")));
|
||||
}
|
||||
|
||||
public TheBrute(final TheBrute card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheBrute copy() {
|
||||
return new TheBrute(this);
|
||||
}
|
||||
}
|
52
Mage.Sets/src/mage/sets/fourthedition/TheBrute.java
Normal file
52
Mage.Sets/src/mage/sets/fourthedition/TheBrute.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.fourthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Derpthemeus
|
||||
*/
|
||||
public class TheBrute extends mage.sets.fifthedition.TheBrute {
|
||||
|
||||
public TheBrute(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = "244";
|
||||
this.expansionSetCode = "4ED";
|
||||
}
|
||||
|
||||
public TheBrute(final TheBrute card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheBrute copy() {
|
||||
return new TheBrute(this);
|
||||
}
|
||||
}
|
|
@ -29,11 +29,9 @@ package mage.sets.guildpact;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -46,6 +44,11 @@ import mage.constants.Zone;
|
|||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.filter.predicate.permanent.EnchantedPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -55,7 +58,8 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public class NecromancersMagemark extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures you control that are enchanted");
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control that are enchanted");
|
||||
|
||||
static {
|
||||
filter.add(new EnchantedPredicate());
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
|
@ -72,13 +76,13 @@ public class NecromancersMagemark extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Creatures you control that are enchanted get +1/+1.
|
||||
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1,1, Duration.WhileOnBattlefield, filter, false));
|
||||
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false));
|
||||
this.addAbility(ability);
|
||||
|
||||
// If a creature you control that's enchanted would die, return it to its owner's hand instead.
|
||||
Effect effect = new ReturnToHandSourceEffect();
|
||||
ability = new DiesCreatureTriggeredAbility(effect,false);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NecromancersMagemarkEffect()));
|
||||
}
|
||||
|
||||
public NecromancersMagemark(final NecromancersMagemark card) {
|
||||
|
@ -90,3 +94,61 @@ public class NecromancersMagemark extends CardImpl {
|
|||
return new NecromancersMagemark(this);
|
||||
}
|
||||
}
|
||||
|
||||
class NecromancersMagemarkEffect extends ReplacementEffectImpl {
|
||||
|
||||
public NecromancersMagemarkEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "If a creature you control that's enchanted would die, return it to its owner's hand instead";
|
||||
}
|
||||
|
||||
public NecromancersMagemarkEffect(final NecromancersMagemarkEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NecromancersMagemarkEffect copy() {
|
||||
return new NecromancersMagemarkEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
|
||||
if (permanent != null) {
|
||||
controller.moveCards(permanent, Zone.HAND, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType().equals(GameEvent.EventType.ZONE_CHANGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
if (zEvent.getFromZone().equals(Zone.BATTLEFIELD) && zEvent.getToZone().equals(Zone.GRAVEYARD)) {
|
||||
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
|
||||
if (permanent != null && permanent.getControllerId().equals(source.getControllerId())) {
|
||||
for (UUID attachmentId : permanent.getAttachments()) {
|
||||
Permanent attachment = game.getPermanentOrLKIBattlefield(attachmentId);
|
||||
if (attachment != null && attachment.getSubtype(game).contains("Aura")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.players.Player;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -114,8 +115,7 @@ class CharmbreakerDevilsEffect extends OneShotEffect {
|
|||
new CardTypePredicate(CardType.SORCERY)));
|
||||
Card[] cards = player.getGraveyard().getCards(filter, game).toArray(new Card[0]);
|
||||
if (cards.length > 0) {
|
||||
Random rnd = new Random();
|
||||
Card card = cards[rnd.nextInt(cards.length)];
|
||||
Card card = cards[RandomUtil.nextInt(cards.length)];
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, true);
|
||||
game.informPlayers(new StringBuilder("Charmbreaker Devils: ").append(card.getName()).append(" returned to the hand of ").append(player.getLogName()).toString());
|
||||
return true;
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.filter.FilterCard;
|
|||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -96,8 +97,7 @@ class GhoulraiserEffect extends OneShotEffect {
|
|||
filter.add(new SubtypePredicate("Zombie"));
|
||||
Card[] cards = player.getGraveyard().getCards(filter, game).toArray(new Card[0]);
|
||||
if (cards.length > 0) {
|
||||
Random rnd = new Random();
|
||||
Card card = cards[rnd.nextInt(cards.length)];
|
||||
Card card = cards[RandomUtil.nextInt(cards.length)];
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, true);
|
||||
game.informPlayers(card.getName() + "returned to the hand of" + player.getLogName());
|
||||
return true;
|
||||
|
|
|
@ -45,6 +45,7 @@ import mage.cards.CardImpl;
|
|||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -116,7 +117,7 @@ class MoldgrafMonstrosityEffect extends OneShotEffect {
|
|||
return null;
|
||||
}
|
||||
int i = 0;
|
||||
int pick = new Random().nextInt(cards.size());
|
||||
int pick = RandomUtil.nextInt(cards.size());
|
||||
for (Card card : cards) {
|
||||
if (i == pick) {
|
||||
return card;
|
||||
|
|
|
@ -45,6 +45,7 @@ import mage.cards.CardImpl;
|
|||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -101,8 +102,7 @@ class WoodlandSleuthEffect extends OneShotEffect {
|
|||
if (player != null) {
|
||||
Card[] cards = player.getGraveyard().getCards(new FilterCreatureCard(), game).toArray(new Card[0]);
|
||||
if (cards.length > 0) {
|
||||
Random rnd = new Random();
|
||||
Card card = cards[rnd.nextInt(cards.length)];
|
||||
Card card = cards[RandomUtil.nextInt(cards.length)];
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, true);
|
||||
game.informPlayers(card.getName() + " returned to the hand of " + player.getLogName());
|
||||
return true;
|
||||
|
|
52
Mage.Sets/src/mage/sets/kaladesh/AEtherTradewinds.java
Normal file
52
Mage.Sets/src/mage/sets/kaladesh/AEtherTradewinds.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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class AEtherTradewinds extends mage.sets.worldwake.AEtherTradewinds {
|
||||
|
||||
public AEtherTradewinds(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = "38";
|
||||
this.expansionSetCode = "KLD";
|
||||
}
|
||||
|
||||
public AEtherTradewinds(final AEtherTradewinds card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AEtherTradewinds copy() {
|
||||
return new AEtherTradewinds(this);
|
||||
}
|
||||
}
|
72
Mage.Sets/src/mage/sets/kaladesh/BloomingMarsh.java
Normal file
72
Mage.Sets/src/mage/sets/kaladesh/BloomingMarsh.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.BlackManaAbility;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class BloomingMarsh extends CardImpl {
|
||||
|
||||
public BloomingMarsh(UUID ownerId) {
|
||||
super(ownerId, 243, "Blooming Marsh", Rarity.RARE, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// Blooming Marsh enters the battlefield tapped unless you control two or fewer other lands.
|
||||
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 3));
|
||||
String abilityText = "tapped unless you control fewer than 3 lands";
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
|
||||
// {T}: Add {B} or {G} to your mana pool.
|
||||
this.addAbility(new BlackManaAbility());
|
||||
this.addAbility(new GreenManaAbility());
|
||||
}
|
||||
|
||||
public BloomingMarsh(final BloomingMarsh card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BloomingMarsh copy() {
|
||||
return new BloomingMarsh(this);
|
||||
}
|
||||
}
|
67
Mage.Sets/src/mage/sets/kaladesh/BomatBazaarBarge.java
Normal file
67
Mage.Sets/src/mage/sets/kaladesh/BomatBazaarBarge.java
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.keyword.CrewAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class BomatBazaarBarge extends CardImpl {
|
||||
|
||||
public BomatBazaarBarge(UUID ownerId) {
|
||||
super(ownerId, 198, "Bomat Bazaar Barge", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Vehicle");
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// When Bomat Bazaar Barge enters the battlefield, draw a card.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
|
||||
|
||||
// Crew 3
|
||||
this.addAbility(new CrewAbility(3));
|
||||
}
|
||||
|
||||
public BomatBazaarBarge(final BomatBazaarBarge card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BomatBazaarBarge copy() {
|
||||
return new BomatBazaarBarge(this);
|
||||
}
|
||||
}
|
72
Mage.Sets/src/mage/sets/kaladesh/BotanicalSanctum.java
Normal file
72
Mage.Sets/src/mage/sets/kaladesh/BotanicalSanctum.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class BotanicalSanctum extends CardImpl {
|
||||
|
||||
public BotanicalSanctum(UUID ownerId) {
|
||||
super(ownerId, 244, "Botanical Sanctum", Rarity.RARE, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// Botanical Sanctum enters the battlefield tapped unless you control two or fewer other lands.
|
||||
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 3));
|
||||
String abilityText = "tapped unless you control fewer than 3 lands";
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
|
||||
// {T}: Add {G} or {U} to your mana pool.
|
||||
this.addAbility(new GreenManaAbility());
|
||||
this.addAbility(new BlueManaAbility());
|
||||
}
|
||||
|
||||
public BotanicalSanctum(final BotanicalSanctum card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BotanicalSanctum copy() {
|
||||
return new BotanicalSanctum(this);
|
||||
}
|
||||
}
|
188
Mage.Sets/src/mage/sets/kaladesh/CataclysmicGearhulk.java
Normal file
188
Mage.Sets/src/mage/sets/kaladesh/CataclysmicGearhulk.java
Normal file
|
@ -0,0 +1,188 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledEnchantmentPermanent;
|
||||
import mage.filter.common.FilterControlledPlaneswalkerPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class CataclysmicGearhulk extends CardImpl {
|
||||
|
||||
public CataclysmicGearhulk(UUID ownerId) {
|
||||
super(ownerId, 9, "Cataclysmic Gearhulk", Rarity.MYTHIC, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{W}{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Construct");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// When Cataclysmic Gearhulk enters the battlefield, each player chooses from among the non-land permanents he or she controls an artifact, a creature,
|
||||
// an enchantment, and a planeswalker, then sacrifices the rest.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CataclysmicGearhulkEffect(), false));
|
||||
}
|
||||
|
||||
public CataclysmicGearhulk(final CataclysmicGearhulk card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CataclysmicGearhulk copy() {
|
||||
return new CataclysmicGearhulk(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CataclysmicGearhulkEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterControlledArtifactPermanent filterArtifact = new FilterControlledArtifactPermanent("artifact");
|
||||
private static final FilterControlledCreaturePermanent filterCreature = new FilterControlledCreaturePermanent("creature");
|
||||
private static final FilterControlledEnchantmentPermanent filterEnchantment = new FilterControlledEnchantmentPermanent("enchantment");
|
||||
private static final FilterControlledPlaneswalkerPermanent filterPlaneswalker = new FilterControlledPlaneswalkerPermanent("planeswalker");
|
||||
|
||||
static {
|
||||
filterArtifact.add(Predicates.and(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
Predicates.not(new CardTypePredicate(CardType.LAND))));
|
||||
filterCreature.add(Predicates.and(
|
||||
new CardTypePredicate(CardType.CREATURE),
|
||||
Predicates.not(new CardTypePredicate(CardType.LAND))));
|
||||
filterEnchantment.add(Predicates.and(
|
||||
new CardTypePredicate(CardType.ENCHANTMENT),
|
||||
Predicates.not(new CardTypePredicate(CardType.LAND))));
|
||||
filterPlaneswalker.add(Predicates.and(
|
||||
new CardTypePredicate(CardType.PLANESWALKER),
|
||||
Predicates.not(new CardTypePredicate(CardType.LAND))));
|
||||
}
|
||||
|
||||
public CataclysmicGearhulkEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
staticText = "Each player chooses from among the non-land permanents he or she controls an artifact, a creature, an enchantment, and a planeswalker, "
|
||||
+ "then sacrifices the rest";
|
||||
}
|
||||
|
||||
public CataclysmicGearhulkEffect(CataclysmicGearhulkEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
List<Card> chosen = new ArrayList<>();
|
||||
|
||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
|
||||
Target target1 = new TargetControlledPermanent(1, 1, filterArtifact, true);
|
||||
Target target2 = new TargetControlledPermanent(1, 1, filterCreature, true);
|
||||
Target target3 = new TargetControlledPermanent(1, 1, filterEnchantment, true);
|
||||
Target target4 = new TargetControlledPermanent(1, 1, filterPlaneswalker, true);
|
||||
|
||||
if (target1.canChoose(player.getId(), game)) {
|
||||
while (player.canRespond() && !target1.isChosen() && target1.canChoose(player.getId(), game)) {
|
||||
player.chooseTarget(Outcome.Benefit, target1, source, game);
|
||||
}
|
||||
Permanent artifact = game.getPermanent(target1.getFirstTarget());
|
||||
if (artifact != null) {
|
||||
chosen.add(artifact);
|
||||
}
|
||||
target1.clearChosen();
|
||||
}
|
||||
|
||||
if (target2.canChoose(player.getId(), game)) {
|
||||
while (player.canRespond() && !target2.isChosen() && target2.canChoose(player.getId(), game)) {
|
||||
player.chooseTarget(Outcome.Benefit, target2, source, game);
|
||||
}
|
||||
Permanent creature = game.getPermanent(target2.getFirstTarget());
|
||||
if (creature != null) {
|
||||
chosen.add(creature);
|
||||
}
|
||||
target2.clearChosen();
|
||||
}
|
||||
|
||||
if (target3.canChoose(player.getId(), game)) {
|
||||
while (player.canRespond() && !target3.isChosen() && target3.canChoose(player.getId(), game)) {
|
||||
player.chooseTarget(Outcome.Benefit, target3, source, game);
|
||||
}
|
||||
Permanent enchantment = game.getPermanent(target3.getFirstTarget());
|
||||
if (enchantment != null) {
|
||||
chosen.add(enchantment);
|
||||
}
|
||||
target3.clearChosen();
|
||||
}
|
||||
|
||||
if (target4.canChoose(player.getId(), game)) {
|
||||
while (player.canRespond() && !target4.isChosen() && target4.canChoose(player.getId(), game)) {
|
||||
player.chooseTarget(Outcome.Benefit, target4, source, game);
|
||||
}
|
||||
Permanent planeswalker = game.getPermanent(target4.getFirstTarget());
|
||||
if (planeswalker != null) {
|
||||
chosen.add(planeswalker);
|
||||
}
|
||||
target4.clearChosen();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents()) {
|
||||
if (!chosen.contains(permanent) && !permanent.getCardType().contains(CardType.LAND)) {
|
||||
permanent.sacrifice(source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CataclysmicGearhulkEffect copy() {
|
||||
return new CataclysmicGearhulkEffect(this);
|
||||
}
|
||||
}
|
85
Mage.Sets/src/mage/sets/kaladesh/ChandraPyrogenius.java
Normal file
85
Mage.Sets/src/mage/sets/kaladesh/ChandraPyrogenius.java
Normal file
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.Effects;
|
||||
import mage.abilities.effects.common.DamageAllControlledTargetEffect;
|
||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class ChandraPyrogenius extends CardImpl {
|
||||
|
||||
public ChandraPyrogenius(UUID ownerId) {
|
||||
super(ownerId, 265, "Chandra, Pyrogenius", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{4}{R}{R}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Chandra");
|
||||
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5));
|
||||
|
||||
// +2: Chandra, Pyrogenius deals 2 damage to each opponent.
|
||||
this.addAbility(new LoyaltyAbility(new DamagePlayersEffect(Outcome.Damage, new StaticValue(2), TargetController.OPPONENT), 2));
|
||||
|
||||
// -3: Chandra, Pyrogenius deals 4 damage to target creature.
|
||||
LoyaltyAbility ability = new LoyaltyAbility(new DamageTargetEffect(4), -3);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// -10: Chandra, Pyrogenius deals 6 damage to target player and each creature he or she controls.
|
||||
Effects effects = new Effects();
|
||||
effects.add(new DamageTargetEffect(6));
|
||||
effects.add(new DamageAllControlledTargetEffect(6, new FilterCreaturePermanent()));
|
||||
ability = new LoyaltyAbility(effects, -10);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public ChandraPyrogenius(final ChandraPyrogenius card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChandraPyrogenius copy() {
|
||||
return new ChandraPyrogenius(this);
|
||||
}
|
||||
}
|
146
Mage.Sets/src/mage/sets/kaladesh/ChandraTorchOfDefiance.java
Normal file
146
Mage.Sets/src/mage/sets/kaladesh/ChandraTorchOfDefiance.java
Normal file
|
@ -0,0 +1,146 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.GetEmblemEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.Emblem;
|
||||
import mage.players.Library;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class ChandraTorchOfDefiance extends CardImpl {
|
||||
|
||||
public ChandraTorchOfDefiance(UUID ownerId) {
|
||||
super(ownerId, 110, "Chandra, Torch of Defiance", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{R}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Chandra");
|
||||
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4));
|
||||
|
||||
// +1: Exile the top card of your library. You may cast that card. If you don't, Chandra, Torch of Defiance deals 2 damage to each opponent.
|
||||
LoyaltyAbility ability = new LoyaltyAbility(new ChandraTorchOfDefianceEffect(), 1);
|
||||
this.addAbility(ability);
|
||||
|
||||
// +1: Add {R}{R} to your mana pool.
|
||||
this.addAbility(new LoyaltyAbility(new BasicManaEffect(Mana.RedMana(2)), +1));
|
||||
|
||||
// -3: Chandra, Torch of Defiance deals 4 damage to target creature.
|
||||
ability = new LoyaltyAbility(new DamageTargetEffect(4), -3);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// -7: You get an emblem with "Whenever you cast a spell, this emblem deals 5 damage to target creature or player."
|
||||
this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new ChandraTorchOfDefianceEmblem()), -6));
|
||||
}
|
||||
|
||||
public ChandraTorchOfDefiance(final ChandraTorchOfDefiance card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChandraTorchOfDefiance copy() {
|
||||
return new ChandraTorchOfDefiance(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ChandraTorchOfDefianceEffect extends OneShotEffect {
|
||||
|
||||
public ChandraTorchOfDefianceEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "Exile the top card of your library. You may cast that card. If you don't, Chandra, Torch of Defiance deals 2 damage to each opponent";
|
||||
}
|
||||
|
||||
public ChandraTorchOfDefianceEffect(final ChandraTorchOfDefianceEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChandraTorchOfDefianceEffect copy() {
|
||||
return new ChandraTorchOfDefianceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (controller != null && sourceObject != null && controller.getLibrary().size() > 0) {
|
||||
Library library = controller.getLibrary();
|
||||
Card card = library.removeFromTop(game);
|
||||
if (card != null) {
|
||||
controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, true);
|
||||
if (controller.chooseUse(Outcome.Benefit, "Cast the card? (You still pay the costs)", source, game) && !card.getCardType().contains(CardType.LAND)) {
|
||||
controller.cast(card.getSpellAbility(), game, false);
|
||||
} else {
|
||||
new DamagePlayersEffect(Outcome.Damage, new StaticValue(2), TargetController.OPPONENT).apply(game, source);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class ChandraTorchOfDefianceEmblem extends Emblem {
|
||||
|
||||
// You get an emblem with "Whenever you cast a spell, this emblem deals 5 damage to target creature or player."
|
||||
public ChandraTorchOfDefianceEmblem() {
|
||||
this.setName("Emblem - Chandra, Torch of Defiance");
|
||||
Effect effect = new DamageTargetEffect(5);
|
||||
effect.setText("this emblem deals 5 damage to target creature or player");
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, effect, new FilterSpell("a spell"), false, false);
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
getAbilities().add(ability);
|
||||
}
|
||||
}
|
72
Mage.Sets/src/mage/sets/kaladesh/ConcealedCourtyard.java
Normal file
72
Mage.Sets/src/mage/sets/kaladesh/ConcealedCourtyard.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.BlackManaAbility;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class ConcealedCourtyard extends CardImpl {
|
||||
|
||||
public ConcealedCourtyard(UUID ownerId) {
|
||||
super(ownerId, 245, "Concealed Courtyard", Rarity.RARE, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// Concealed Courtyard enters the battlefield tapped unless you control two or fewer other lands.
|
||||
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 3));
|
||||
String abilityText = "tapped unless you control fewer than 3 lands";
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
|
||||
// {T}: Add {W} or {B} to your mana pool.this.addAbility(new BlackManaAbility());
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
this.addAbility(new BlackManaAbility());
|
||||
}
|
||||
|
||||
public ConcealedCourtyard(final ConcealedCourtyard card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConcealedCourtyard copy() {
|
||||
return new ConcealedCourtyard(this);
|
||||
}
|
||||
}
|
72
Mage.Sets/src/mage/sets/kaladesh/CultivatorOfBlades.java
Normal file
72
Mage.Sets/src/mage/sets/kaladesh/CultivatorOfBlades.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.keyword.FabricateAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class CultivatorOfBlades extends CardImpl {
|
||||
|
||||
public CultivatorOfBlades(UUID ownerId) {
|
||||
super(ownerId, 151, "Cultivator of Blades", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Elf");
|
||||
this.subtype.add("Artificer");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Fabricate 2
|
||||
this.addAbility(new FabricateAbility(2));
|
||||
|
||||
// Whenever Cultivator of Blades attacks, you may have other attacking creatures get +X/+X until end of turn, where X is Cultivator of Blades's power.
|
||||
this.addAbility(new AttacksTriggeredAbility(new BoostControlledEffect(new SourcePermanentPowerCount(), new SourcePermanentPowerCount(), Duration.EndOfTurn, new FilterAttackingCreature(), true, true),
|
||||
true, "Whenever Cultivator of Blades attacks, you may have other attacking creatures get +X/+X until end of turn, where X is Cultivator of Blades's power."));
|
||||
}
|
||||
|
||||
public CultivatorOfBlades(final CultivatorOfBlades card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CultivatorOfBlades copy() {
|
||||
return new CultivatorOfBlades(this);
|
||||
}
|
||||
}
|
58
Mage.Sets/src/mage/sets/kaladesh/CurioVendor.java
Normal file
58
Mage.Sets/src/mage/sets/kaladesh/CurioVendor.java
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class CurioVendor extends CardImpl {
|
||||
|
||||
public CurioVendor(UUID ownerId) {
|
||||
super(ownerId, 42, "Curio Vendor", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Vedalken");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
}
|
||||
|
||||
public CurioVendor(final CurioVendor card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurioVendor copy() {
|
||||
return new CurioVendor(this);
|
||||
}
|
||||
}
|
68
Mage.Sets/src/mage/sets/kaladesh/FiligreeFamiliar.java
Normal file
68
Mage.Sets/src/mage/sets/kaladesh/FiligreeFamiliar.java
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class FiligreeFamiliar extends CardImpl {
|
||||
|
||||
public FiligreeFamiliar(UUID ownerId) {
|
||||
super(ownerId, 212, "Filigree Familiar", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Fox");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Filigree Familiar enters the battlefield, you gain 2 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(2), false));
|
||||
|
||||
// When Filigree Familiar dies, draw a card.
|
||||
this.addAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(1), false));
|
||||
}
|
||||
|
||||
public FiligreeFamiliar(final FiligreeFamiliar card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FiligreeFamiliar copy() {
|
||||
return new FiligreeFamiliar(this);
|
||||
}
|
||||
}
|
73
Mage.Sets/src/mage/sets/kaladesh/FortuitousFind.java
Normal file
73
Mage.Sets/src/mage/sets/kaladesh/FortuitousFind.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterArtifactCard;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class FortuitousFind extends CardImpl {
|
||||
|
||||
public FortuitousFind(UUID ownerId) {
|
||||
super(ownerId, 81, "Fortuitous Find", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// Choose one or both —
|
||||
this.getSpellAbility().getModes().setMinModes(1);
|
||||
this.getSpellAbility().getModes().setMaxModes(2);
|
||||
|
||||
// Return target artifact card from your graveyard to your hand.;
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterArtifactCard("artifact card from your graveyard")));
|
||||
|
||||
// or Return target creature card from your graveyard to your hand.
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new ReturnToHandTargetEffect());
|
||||
mode.getTargets().add(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
|
||||
this.getSpellAbility().addMode(mode);
|
||||
}
|
||||
|
||||
public FortuitousFind(final FortuitousFind card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FortuitousFind copy() {
|
||||
return new FortuitousFind(this);
|
||||
}
|
||||
}
|
60
Mage.Sets/src/mage/sets/kaladesh/FuriousReprisal.java
Normal file
60
Mage.Sets/src/mage/sets/kaladesh/FuriousReprisal.java
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class FuriousReprisal extends CardImpl {
|
||||
|
||||
public FuriousReprisal(UUID ownerId) {
|
||||
super(ownerId, 115, "Furious Reprisal", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{R}");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// Furious Reprisal deals 2 damage to each of two target creatures and/or players.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(2, true, "each of two target creatures and/or players"));
|
||||
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(2, 2));
|
||||
}
|
||||
|
||||
public FuriousReprisal(final FuriousReprisal card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FuriousReprisal copy() {
|
||||
return new FuriousReprisal(this);
|
||||
}
|
||||
}
|
80
Mage.Sets/src/mage/sets/kaladesh/GhirapurGuide.java
Normal file
80
Mage.Sets/src/mage/sets/kaladesh/GhirapurGuide.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedByAllTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class GhirapurGuide extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less");
|
||||
|
||||
static {
|
||||
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3));
|
||||
}
|
||||
|
||||
public GhirapurGuide(UUID ownerId) {
|
||||
super(ownerId, 156, "Ghirapur Guide", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Elf");
|
||||
this.subtype.add("Scout");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {2}{G}: Target creature you control can't be blocked by creatures with power 2 or less this turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedByAllTargetEffect(filter, Duration.EndOfTurn), new ManaCostsImpl("{2}{G}"));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public GhirapurGuide(final GhirapurGuide card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GhirapurGuide copy() {
|
||||
return new GhirapurGuide(this);
|
||||
}
|
||||
}
|
63
Mage.Sets/src/mage/sets/kaladesh/GlintSleeveArtisan.java
Normal file
63
Mage.Sets/src/mage/sets/kaladesh/GlintSleeveArtisan.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.FabricateAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class GlintSleeveArtisan extends CardImpl {
|
||||
|
||||
public GlintSleeveArtisan(UUID ownerId) {
|
||||
super(ownerId, 017, "Glint-Sleeve Artisan", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Dwarf");
|
||||
this.subtype.add("Artificer");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Fabricate 1
|
||||
this.addAbility(new FabricateAbility(1));
|
||||
}
|
||||
|
||||
public GlintSleeveArtisan(final GlintSleeveArtisan card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GlintSleeveArtisan copy() {
|
||||
return new GlintSleeveArtisan(this);
|
||||
}
|
||||
}
|
72
Mage.Sets/src/mage/sets/kaladesh/InspiringVantage.java
Normal file
72
Mage.Sets/src/mage/sets/kaladesh/InspiringVantage.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class InspiringVantage extends CardImpl {
|
||||
|
||||
public InspiringVantage(UUID ownerId) {
|
||||
super(ownerId, 246, "Inspiring Vantage", Rarity.RARE, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// Inspiring Vantage enters the battlefield tapped unless you control two or fewer other lands.
|
||||
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 3));
|
||||
String abilityText = "tapped unless you control fewer than 3 lands";
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
|
||||
// {T}: Add {R} or {W} to your mana pool.
|
||||
this.addAbility(new RedManaAbility());
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
}
|
||||
|
||||
public InspiringVantage(final InspiringVantage card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InspiringVantage copy() {
|
||||
return new InspiringVantage(this);
|
||||
}
|
||||
}
|
131
Mage.Sets/src/mage/sets/kaladesh/InventorsFair.java
Normal file
131
Mage.Sets/src/mage/sets/kaladesh/InventorsFair.java
Normal file
|
@ -0,0 +1,131 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class InventorsFair extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("artifact");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public InventorsFair(UUID ownerId) {
|
||||
super(ownerId, 247, "Inventors' Fair", Rarity.RARE, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.supertype.add("Legendary");
|
||||
|
||||
// At the beginning of your upkeep, if you control three or more artifacts, you gain 1 life.
|
||||
this.addAbility(new InventorsFairAbility());
|
||||
|
||||
// {t}: Add {C} to your mana pool.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {4}, {T}, Sacrifice Inventors' Fair: Search your library for an artifact card, reveal it, put it into your hand, then shuffle your library.
|
||||
// Activate this ability only if you control threeor more artifacts.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(1, filter), true),
|
||||
new GenericManaCost(4), MetalcraftCondition.getInstance());
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public InventorsFair(final InventorsFair card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InventorsFair copy() {
|
||||
return new InventorsFair(this);
|
||||
}
|
||||
}
|
||||
|
||||
class InventorsFairAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private FilterArtifactPermanent filter = new FilterArtifactPermanent();
|
||||
|
||||
public InventorsFairAbility() {
|
||||
super(Zone.BATTLEFIELD, new GainLifeEffect(1));
|
||||
}
|
||||
|
||||
public InventorsFairAbility(final InventorsFairAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InventorsFairAbility copy() {
|
||||
return new InventorsFairAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.UPKEEP_STEP_PRE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return event.getPlayerId().equals(this.controllerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkInterveningIfClause(Game game) {
|
||||
return game.getBattlefield().countAll(filter, this.controllerId, game) >= 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "At the beginning of your upkeep, if you control three or more artifacts, you gain 1 life.";
|
||||
}
|
||||
}
|
83
Mage.Sets/src/mage/sets/kaladesh/MasterTrinketcrafter.java
Normal file
83
Mage.Sets/src/mage/sets/kaladesh/MasterTrinketcrafter.java
Normal file
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.ServoToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class MasterTrinketcrafter extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Servo and Thopter creatures");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new SubtypePredicate("Servo"),
|
||||
new SubtypePredicate("Thopter")));
|
||||
}
|
||||
|
||||
public MasterTrinketcrafter(UUID ownerId) {
|
||||
super(ownerId, 21, "Master Trinketcrafter", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Dwarf");
|
||||
this.subtype.add("Artificer");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Servo and Thopter creatures you control get +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, false)));
|
||||
|
||||
// {3}{W}: Create a 1/1 colorless Servo artifact creature token.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ServoToken(), 1), new ManaCostsImpl("{3}{W}")));
|
||||
}
|
||||
|
||||
public MasterTrinketcrafter(final MasterTrinketcrafter card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MasterTrinketcrafter copy() {
|
||||
return new MasterTrinketcrafter(this);
|
||||
}
|
||||
}
|
75
Mage.Sets/src/mage/sets/kaladesh/MorbidCuriosity.java
Normal file
75
Mage.Sets/src/mage/sets/kaladesh/MorbidCuriosity.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.dynamicvalue.common.SacrificeCostConvertedMana;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class MorbidCuriosity extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact or creature");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.CREATURE)));
|
||||
}
|
||||
|
||||
public MorbidCuriosity(UUID ownerId) {
|
||||
super(ownerId, 94, "Morbid Curiosity", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{B}{B}");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// As an additional cost to cast Morbid Curiosity, sacrifice an artifact or creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
|
||||
// Draw cards equal to the converted mana cost of the sacrificed permanent.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new SacrificeCostConvertedMana("permanent")));
|
||||
}
|
||||
|
||||
public MorbidCuriosity(final MorbidCuriosity card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MorbidCuriosity copy() {
|
||||
return new MorbidCuriosity(this);
|
||||
}
|
||||
}
|
131
Mage.Sets/src/mage/sets/kaladesh/NissaNaturesArtisan.java
Normal file
131
Mage.Sets/src/mage/sets/kaladesh/NissaNaturesArtisan.java
Normal file
|
@ -0,0 +1,131 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class NissaNaturesArtisan extends CardImpl {
|
||||
|
||||
public NissaNaturesArtisan(UUID ownerId) {
|
||||
super(ownerId, 270, "Nissa, Nature's Artisan", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{4}{G}{G}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Nissa");
|
||||
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5));
|
||||
|
||||
// +3: You gain 3 life.
|
||||
this.addAbility(new LoyaltyAbility(new GainLifeEffect(3), 3));
|
||||
|
||||
// -4: Reveal the top two cards of your library. Put all land cards from among them onto the battlefield and the rest into your hand.
|
||||
this.addAbility(new LoyaltyAbility(new NissaNaturesArtisanEffect(), -4));
|
||||
|
||||
// -12: Creatures you control get +5/+5 and gain trample until end of turn.
|
||||
Effect effect = new BoostControlledEffect(5, 5, Duration.EndOfTurn);
|
||||
effect.setText("Creature you control get +5/+5");
|
||||
LoyaltyAbility ability = new LoyaltyAbility(effect, -12);
|
||||
ability.addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public NissaNaturesArtisan(final NissaNaturesArtisan card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NissaNaturesArtisan copy() {
|
||||
return new NissaNaturesArtisan(this);
|
||||
}
|
||||
}
|
||||
|
||||
class NissaNaturesArtisanEffect extends OneShotEffect {
|
||||
|
||||
public NissaNaturesArtisanEffect() {
|
||||
super(Outcome.PutCardInPlay);
|
||||
staticText = "Reveal the top two cards of your library. Put all land cards from among them onto the battlefield and the rest into your hand";
|
||||
}
|
||||
|
||||
public NissaNaturesArtisanEffect(final NissaNaturesArtisanEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (controller == null || sourceObject == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl();
|
||||
cards.addAll(controller.getLibrary().getTopCards(game, 2));
|
||||
if (cards.size() > 0) {
|
||||
controller.revealCards(sourceObject.getIdName(), cards, game);
|
||||
Set<Card> toBattlefield = new LinkedHashSet<>();
|
||||
for (Card card : cards.getCards(new FilterLandCard(), source.getSourceId(), source.getControllerId(), game)) {
|
||||
cards.remove(card);
|
||||
toBattlefield.add(card);
|
||||
}
|
||||
controller.moveCards(toBattlefield, Zone.BATTLEFIELD, source, game, false, false, true, null);
|
||||
controller.moveCards(cards, Zone.HAND, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NissaNaturesArtisanEffect copy() {
|
||||
return new NissaNaturesArtisanEffect(this);
|
||||
}
|
||||
|
||||
}
|
123
Mage.Sets/src/mage/sets/kaladesh/NissaVitalForce.java
Normal file
123
Mage.Sets/src/mage/sets/kaladesh/NissaVitalForce.java
Normal file
|
@ -0,0 +1,123 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.GetEmblemEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.effects.common.UntapTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterPermanentCard;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.command.Emblem;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class NissaVitalForce extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public NissaVitalForce(UUID ownerId) {
|
||||
super(ownerId, 163, "Nissa, Vital Force", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{3}{G}{G}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Nissa");
|
||||
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5));
|
||||
|
||||
// +1: Untap target land you control. Until your next turn, it becomes a 5/5 Elemental creature with haste. It's still a land.
|
||||
LoyaltyAbility ability = new LoyaltyAbility(new UntapTargetEffect(), 1);
|
||||
ability.addEffect(new BecomesCreatureTargetEffect(new NissaVitalForceToken(), false, true, Duration.UntilYourNextTurn));
|
||||
ability.addTarget(new TargetLandPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
// -3: Return target permanent card from your graveyard to your hand.
|
||||
ability = new LoyaltyAbility(new ReturnToHandTargetEffect(), -3);
|
||||
ability.addTarget(new TargetCardInYourGraveyard(new FilterPermanentCard("permanent card from your graveyard")));
|
||||
this.addAbility(ability);
|
||||
|
||||
// -6: You get an emblem with "Whenever a land enters the battlefield under your control, you may draw a card."
|
||||
this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new NissaVitalForceEmblem()), -6));
|
||||
}
|
||||
|
||||
public NissaVitalForce(final NissaVitalForce card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NissaVitalForce copy() {
|
||||
return new NissaVitalForce(this);
|
||||
}
|
||||
}
|
||||
|
||||
class NissaVitalForceToken extends Token {
|
||||
|
||||
public NissaVitalForceToken() {
|
||||
super("", "5/5 Elemental creature with haste");
|
||||
this.cardType.add(CardType.CREATURE);
|
||||
|
||||
this.subtype.add("Elemental");
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
}
|
||||
|
||||
class NissaVitalForceEmblem extends Emblem {
|
||||
|
||||
// You get an emblem with "Whenever a land enters the battlefield under your control, you may draw a card."
|
||||
public NissaVitalForceEmblem() {
|
||||
this.setName("Emblem - Nissa, Vital Force");
|
||||
Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.COMMAND, new DrawCardSourceControllerEffect(1), new FilterControlledLandPermanent("a land"),
|
||||
true, null, true);
|
||||
getAbilities().add(ability);
|
||||
}
|
||||
}
|
75
Mage.Sets/src/mage/sets/kaladesh/OvalchaseDaredevil.java
Normal file
75
Mage.Sets/src/mage/sets/kaladesh/OvalchaseDaredevil.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class OvalchaseDaredevil extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterArtifactPermanent("an artifact");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public OvalchaseDaredevil(UUID ownerId) {
|
||||
super(ownerId, 97, "Ovalchase Daredevil", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Pilot");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever an artifact enters the battlefield under your control, you may return Ovalchase Daredevil from your graveyard to your hand.
|
||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.GRAVEYARD, new ReturnToHandSourceEffect(), filter, true));
|
||||
}
|
||||
|
||||
public OvalchaseDaredevil(final OvalchaseDaredevil card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OvalchaseDaredevil copy() {
|
||||
return new OvalchaseDaredevil(this);
|
||||
}
|
||||
}
|
66
Mage.Sets/src/mage/sets/kaladesh/PropellerPioneer.java
Normal file
66
Mage.Sets/src/mage/sets/kaladesh/PropellerPioneer.java
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.FabricateAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class PropellerPioneer extends CardImpl {
|
||||
|
||||
public PropellerPioneer(UUID ownerId) {
|
||||
super(ownerId, 24, "Propeller Pioneer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Artificer");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Fabricate 1
|
||||
this.addAbility(new FabricateAbility(1));
|
||||
}
|
||||
|
||||
public PropellerPioneer(final PropellerPioneer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PropellerPioneer copy() {
|
||||
return new PropellerPioneer(this);
|
||||
}
|
||||
}
|
65
Mage.Sets/src/mage/sets/kaladesh/SkySkiff.java
Normal file
65
Mage.Sets/src/mage/sets/kaladesh/SkySkiff.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.CrewAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class SkySkiff extends CardImpl {
|
||||
|
||||
public SkySkiff(UUID ownerId) {
|
||||
super(ownerId, 233, "Sky Skiff", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Vehicle");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Crew 1
|
||||
this.addAbility(new CrewAbility(1));
|
||||
}
|
||||
|
||||
public SkySkiff(final SkySkiff card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SkySkiff copy() {
|
||||
return new SkySkiff(this);
|
||||
}
|
||||
}
|
79
Mage.Sets/src/mage/sets/kaladesh/SkyshipStalker.java
Normal file
79
Mage.Sets/src/mage/sets/kaladesh/SkyshipStalker.java
Normal file
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class SkyshipStalker extends CardImpl {
|
||||
|
||||
public SkyshipStalker(UUID ownerId) {
|
||||
super(ownerId, 130, "Skyship Stalker", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Dragon");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// {R}: Skyship Stalker gains +1/+0 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}")));
|
||||
|
||||
// {R}: Skyship Stalker gains first strike until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}")));
|
||||
|
||||
// {R}: Skyship Stalker gains haste until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}")));
|
||||
}
|
||||
|
||||
public SkyshipStalker(final SkyshipStalker card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SkyshipStalker copy() {
|
||||
return new SkyshipStalker(this);
|
||||
}
|
||||
}
|
72
Mage.Sets/src/mage/sets/kaladesh/SpirebluffCanal.java
Normal file
72
Mage.Sets/src/mage/sets/kaladesh/SpirebluffCanal.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class SpirebluffCanal extends CardImpl {
|
||||
|
||||
public SpirebluffCanal(UUID ownerId) {
|
||||
super(ownerId, 249, "Spirebluff Canal", Rarity.RARE, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// Spirebluff Canal enters the battlefield tapped unless you control two or fewer other lands.
|
||||
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 3));
|
||||
String abilityText = "tapped unless you control fewer than 3 lands";
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
|
||||
// {T}: Add {U} or {R} to your mana pool.
|
||||
this.addAbility(new BlueManaAbility());
|
||||
this.addAbility(new RedManaAbility());
|
||||
}
|
||||
|
||||
public SpirebluffCanal(final SpirebluffCanal card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpirebluffCanal copy() {
|
||||
return new SpirebluffCanal(this);
|
||||
}
|
||||
}
|
58
Mage.Sets/src/mage/sets/kaladesh/TasseledDromedary.java
Normal file
58
Mage.Sets/src/mage/sets/kaladesh/TasseledDromedary.java
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class TasseledDromedary extends CardImpl {
|
||||
|
||||
public TasseledDromedary(UUID ownerId) {
|
||||
super(ownerId, 30, "Tasseled Dromedary", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Camel");
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(4);
|
||||
}
|
||||
|
||||
public TasseledDromedary(final TasseledDromedary card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TasseledDromedary copy() {
|
||||
return new TasseledDromedary(this);
|
||||
}
|
||||
}
|
58
Mage.Sets/src/mage/sets/kaladesh/TerrorOfTheFairgrounds.java
Normal file
58
Mage.Sets/src/mage/sets/kaladesh/TerrorOfTheFairgrounds.java
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class TerrorOfTheFairgrounds extends CardImpl {
|
||||
|
||||
public TerrorOfTheFairgrounds(UUID ownerId) {
|
||||
super(ownerId, 137, "Terror of the Fairgrounds", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Gremlin");
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(2);
|
||||
}
|
||||
|
||||
public TerrorOfTheFairgrounds(final TerrorOfTheFairgrounds card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerrorOfTheFairgrounds copy() {
|
||||
return new TerrorOfTheFairgrounds(this);
|
||||
}
|
||||
}
|
81
Mage.Sets/src/mage/sets/kaladesh/VerdurousGearhulk.java
Normal file
81
Mage.Sets/src/mage/sets/kaladesh/VerdurousGearhulk.java
Normal file
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.counter.DistributeCountersEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class VerdurousGearhulk extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public VerdurousGearhulk(UUID ownerId) {
|
||||
super(ownerId, 172, "Verdurous Gearhulk", Rarity.MYTHIC, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{G}{G}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Construct");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// When Verdurous Gearhulk enters the battlefield, distribute four +1/+1 counters among any number of target creatures you control.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect(CounterType.P1P1, 4, false, "any number of target creatures you control"), false);
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(4, filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public VerdurousGearhulk(final VerdurousGearhulk card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VerdurousGearhulk copy() {
|
||||
return new VerdurousGearhulk(this);
|
||||
}
|
||||
}
|
66
Mage.Sets/src/mage/sets/kaladesh/Whirlermaker.java
Normal file
66
Mage.Sets/src/mage/sets/kaladesh/Whirlermaker.java
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.permanent.token.ThopterColorlessToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class Whirlermaker extends CardImpl {
|
||||
|
||||
public Whirlermaker(UUID ownerId) {
|
||||
super(ownerId, 239, "Whirlermaker", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// {4}, {T}: Create a 1/1 colorless Thopter artifact creature token with flying.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ThopterColorlessToken()), new GenericManaCost(4));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public Whirlermaker(final Whirlermaker card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Whirlermaker copy() {
|
||||
return new Whirlermaker(this);
|
||||
}
|
||||
}
|
149
Mage.Sets/src/mage/sets/kaladesh/WispweaverAngel.java
Normal file
149
Mage.Sets/src/mage/sets/kaladesh/WispweaverAngel.java
Normal file
|
@ -0,0 +1,149 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ExileTargetForSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.cards.MeldCard;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class WispweaverAngel extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public WispweaverAngel(UUID ownerId) {
|
||||
super(ownerId, 35, "Wispweaver Angel", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{W}{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Angel");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// When Wispweaver Angel enters the battlefield, you may exile another target creature you control, then return that card to the battlefield under its owner's control.
|
||||
Effect effect = new ExileTargetForSourceEffect();
|
||||
effect.setApplyEffectsAfter();
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(effect, true);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(1, 1, filter, false));
|
||||
ability.addEffect(new WispweaverAngelEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public WispweaverAngel(final WispweaverAngel card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WispweaverAngel copy() {
|
||||
return new WispweaverAngel(this);
|
||||
}
|
||||
}
|
||||
|
||||
class WispweaverAngelEffect extends OneShotEffect {
|
||||
|
||||
WispweaverAngelEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "return that card to the battlefield under its owner's control";
|
||||
}
|
||||
|
||||
WispweaverAngelEffect(final WispweaverAngelEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WispweaverAngelEffect copy() {
|
||||
return new WispweaverAngelEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Cards cardsToBattlefield = new CardsImpl();
|
||||
UUID exileZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
||||
if (exileZoneId != null) {
|
||||
ExileZone exileZone = game.getExile().getExileZone(exileZoneId);
|
||||
if (exileZone != null) {
|
||||
for (UUID targetId : this.getTargetPointer().getTargets(game, source)) {
|
||||
if (exileZone.contains(targetId)) {
|
||||
cardsToBattlefield.add(targetId);
|
||||
}
|
||||
else {
|
||||
Card card = game.getCard(targetId);
|
||||
if (card != null && card instanceof MeldCard) {
|
||||
MeldCard meldCard = (MeldCard) card;
|
||||
Card topCard = meldCard.getTopHalfCard();
|
||||
Card bottomCard = meldCard.getBottomHalfCard();
|
||||
if (topCard.getZoneChangeCounter(game) == meldCard.getTopLastZoneChangeCounter() && exileZone.contains(topCard.getId())) {
|
||||
cardsToBattlefield.add(topCard);
|
||||
}
|
||||
if (bottomCard.getZoneChangeCounter(game) == meldCard.getBottomLastZoneChangeCounter() && exileZone.contains(bottomCard.getId())) {
|
||||
cardsToBattlefield.add(bottomCard);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!cardsToBattlefield.isEmpty()) {
|
||||
controller.moveCards(cardsToBattlefield.getCards(game), Zone.BATTLEFIELD, source, game, false, false, true, null);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
76
Mage.Sets/src/mage/sets/kaladesh/WoodweaversPuzzleknot.java
Normal file
76
Mage.Sets/src/mage/sets/kaladesh/WoodweaversPuzzleknot.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* 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.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class WoodweaversPuzzleknot extends CardImpl {
|
||||
|
||||
public WoodweaversPuzzleknot(UUID ownerId) {
|
||||
super(ownerId, 240, "Woodweaver's Puzzleknot", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// When Woodweaver's Puzzleknot enters the battlefield, you gain 3 life and get {E}{E}{E}.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3));
|
||||
Effect effect = new GetEnergyCountersControllerEffect(3);
|
||||
effect.setText("and get {E}{E}{E}");
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(ability);
|
||||
|
||||
// {2}{G}, Sacrifice Woodweaver's Puzzleknot: You gain 3 life and get {E}{E}{E}.
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(3), new ManaCostsImpl<>("{2}{G}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public WoodweaversPuzzleknot(final WoodweaversPuzzleknot card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WoodweaversPuzzleknot copy() {
|
||||
return new WoodweaversPuzzleknot(this);
|
||||
}
|
||||
}
|
52
Mage.Sets/src/mage/sets/legends/TheBrute.java
Normal file
52
Mage.Sets/src/mage/sets/legends/TheBrute.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.legends;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Derpthemeus
|
||||
*/
|
||||
public class TheBrute extends mage.sets.fifthedition.TheBrute {
|
||||
|
||||
public TheBrute(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = "164";
|
||||
this.expansionSetCode = "LEG";
|
||||
}
|
||||
|
||||
public TheBrute(final TheBrute card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheBrute copy() {
|
||||
return new TheBrute(this);
|
||||
}
|
||||
}
|
|
@ -44,6 +44,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -115,8 +116,7 @@ class CapriciousEfreetEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
if (!targetPermanents.isEmpty()) {
|
||||
Random random = new Random();
|
||||
permanent = targetPermanents.get(random.nextInt(targetPermanents.size()));
|
||||
permanent = targetPermanents.get(RandomUtil.nextInt(targetPermanents.size()));
|
||||
permanent.destroy(source.getSourceId(), game, false);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.PlayerList;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -81,11 +82,10 @@ class ScrambleverseEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Random random = new Random();
|
||||
PlayerList players = game.getState().getPlayersInRange(source.getControllerId(), game);
|
||||
int count = players.size();
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterNonlandPermanent(), source.getControllerId(), source.getSourceId(), game)) {
|
||||
ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, true, players.get(random.nextInt(count)));
|
||||
ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, true, players.get(RandomUtil.nextInt(count)));
|
||||
effect.setTargetPointer(new FixedTarget(permanent.getId()));
|
||||
game.addEffect(effect, source);
|
||||
permanent.untap(game);
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.constants.Zone;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.players.Player;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -106,7 +107,7 @@ class ElementalToken extends Token {
|
|||
public ElementalToken() {
|
||||
super("Elemental", "1/1 red Elemental creature");
|
||||
this.setOriginalExpansionSetCode("M14");
|
||||
this.setTokenType(new Random().nextInt(2) + 1);
|
||||
this.setTokenType(RandomUtil.nextInt(2) + 1);
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Elemental");
|
||||
|
|
78
Mage.Sets/src/mage/sets/mercadianmasques/FountainWatch.java
Normal file
78
Mage.Sets/src/mage/sets/mercadianmasques/FountainWatch.java
Normal file
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* 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.mercadianmasques;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.ShroudAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class FountainWatch extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("Artifacts and Enchantments");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public FountainWatch(UUID ownerId) {
|
||||
super(ownerId, 19, "Fountain Watch", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
|
||||
this.expansionSetCode = "MMQ";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Cleric");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Artifacts and enchantments you control have shroud.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield, filter, false)));
|
||||
}
|
||||
|
||||
public FountainWatch(final FountainWatch card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FountainWatch copy() {
|
||||
return new FountainWatch(this);
|
||||
}
|
||||
}
|
69
Mage.Sets/src/mage/sets/mercadianmasques/IronLance.java
Normal file
69
Mage.Sets/src/mage/sets/mercadianmasques/IronLance.java
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* 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.mercadianmasques;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Derpthemeus
|
||||
*/
|
||||
public class IronLance extends CardImpl {
|
||||
|
||||
public IronLance(UUID ownerId) {
|
||||
super(ownerId, 300, "Iron Lance", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
this.expansionSetCode = "MMQ";
|
||||
|
||||
// {3}, {tap}: Target creature gains first strike until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{3}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public IronLance(final IronLance card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IronLance copy() {
|
||||
return new IronLance(this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* 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.mercadianmasques;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Derpthemeus
|
||||
*/
|
||||
public class RushwoodElemental extends CardImpl {
|
||||
|
||||
public RushwoodElemental(UUID ownerId) {
|
||||
super(ownerId, 264, "Rushwood Elemental", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{G}{G}{G}{G}{G}");
|
||||
this.expansionSetCode = "MMQ";
|
||||
this.subtype.add("Elemental");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
// At the beginning of your upkeep, you may put a +1/+1 counter on Rushwood Elemental.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), TargetController.YOU, true));
|
||||
}
|
||||
|
||||
public RushwoodElemental(final RushwoodElemental card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RushwoodElemental copy() {
|
||||
return new RushwoodElemental(this);
|
||||
}
|
||||
}
|
60
Mage.Sets/src/mage/sets/mercadianmasques/SoothingBalm.java
Normal file
60
Mage.Sets/src/mage/sets/mercadianmasques/SoothingBalm.java
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* 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.mercadianmasques;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.GainLifeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Derpthemeus
|
||||
*/
|
||||
public class SoothingBalm extends CardImpl {
|
||||
|
||||
public SoothingBalm(UUID ownerId) {
|
||||
super(ownerId, 48, "Soothing Balm", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{W}");
|
||||
this.expansionSetCode = "MMQ";
|
||||
|
||||
// Target player gains 5 life.
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().addEffect(new GainLifeTargetEffect(5));
|
||||
}
|
||||
|
||||
public SoothingBalm(final SoothingBalm card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoothingBalm copy() {
|
||||
return new SoothingBalm(this);
|
||||
}
|
||||
}
|
74
Mage.Sets/src/mage/sets/mercadianmasques/TonicPeddler.java
Normal file
74
Mage.Sets/src/mage/sets/mercadianmasques/TonicPeddler.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* 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.mercadianmasques;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.GainLifeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Derpthemeus
|
||||
*/
|
||||
public class TonicPeddler extends CardImpl {
|
||||
|
||||
public TonicPeddler(UUID ownerId) {
|
||||
super(ownerId, 54, "Tonic Peddler", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||
this.expansionSetCode = "MMQ";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Spellshaper");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {W}, {tap}, Discard a card: Target player gains 3 life.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeTargetEffect(3), new ManaCostsImpl("{W}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new DiscardCardCost());
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public TonicPeddler(final TonicPeddler card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TonicPeddler copy() {
|
||||
return new TonicPeddler(this);
|
||||
}
|
||||
}
|
|
@ -41,6 +41,7 @@ import mage.constants.Zone;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -83,7 +84,7 @@ class KrarksThumbEffect extends ReplacementEffectImpl {
|
|||
Player player = game.getPlayer(event.getPlayerId());
|
||||
if (player != null) {
|
||||
// because second flip is ignored it may not be done by the player method
|
||||
boolean secondCoinFlip = new Random().nextBoolean();
|
||||
boolean secondCoinFlip = RandomUtil.nextBoolean();
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers("[Flip a coin] " + player.getLogName() + (secondCoinFlip ? " won (head)." : " lost (tail)."));
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ class KalitasTraitorOfGhetEffect extends ReplacementEffectImpl {
|
|||
if (((ZoneChangeEvent) event).getFromZone().equals(Zone.BATTLEFIELD)) {
|
||||
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
|
||||
if (permanent != null) {
|
||||
controller.moveCardToExileWithInfo(permanent, null, null, source.getSourceId(), game, Zone.BATTLEFIELD, true);
|
||||
controller.moveCards(permanent, Zone.EXILED, source, game);
|
||||
new CreateTokenEffect(new ZombieToken()).apply(game, source);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,6 @@ import mage.game.permanent.Permanent;
|
|||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
import mage.util.MessageToClient;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -95,26 +94,22 @@ class RemorselessPunishmentEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (opponent != null) {
|
||||
handleBaseEffect(game, source, opponent, 1);
|
||||
handleBaseEffect(game, source, opponent, 2);
|
||||
handleBaseEffect(game, source, opponent, "1st");
|
||||
handleBaseEffect(game, source, opponent, "2nd");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void handleBaseEffect(Game game, Ability source, Player opponent, int iteration) {
|
||||
private void handleBaseEffect(Game game, Ability source, Player opponent, String iteration) {
|
||||
if (opponent.getHand().size() > 1) {
|
||||
MessageToClient mtc = new MessageToClient("Discards two cards to prevent to lose 5 life?",
|
||||
"If you want to sacrifice a creature or planeswalker instead click \"No\". (Iteration " + iteration + ")");
|
||||
if (opponent.chooseUse(outcome, mtc, source, game)) {
|
||||
if (opponent.chooseUse(outcome, "Choose your " + iteration + " punishment.", null, "Discard two cards", "Choose another option", source, game)) {
|
||||
opponent.discard(2, false, source, game);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (game.getBattlefield().contains(filter, opponent.getId(), 1, game)) {
|
||||
MessageToClient mtc = new MessageToClient("Sacrifice a creature or planeswalker?",
|
||||
"If you don't sacrifice a creature or planeswalker, you lose 5 life instead. (Iteration " + iteration + ")");
|
||||
if (opponent.chooseUse(outcome, mtc, source, game)) {
|
||||
if (opponent.chooseUse(outcome, "Choose your " + iteration + " punishment.", null, "Sacrifice a creature or planeswalker", "Lose 5 life", source, game)) {
|
||||
TargetPermanent target = new TargetPermanent(1, 1, filter, true);
|
||||
if (target.choose(Outcome.Sacrifice, opponent.getId(), source.getId(), game)) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
|
|
74
Mage.Sets/src/mage/sets/onslaught/RunWild.java
Normal file
74
Mage.Sets/src/mage/sets/onslaught/RunWild.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* 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.onslaught;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Derpthemeus
|
||||
*/
|
||||
public class RunWild extends CardImpl {
|
||||
|
||||
public RunWild(UUID ownerId) {
|
||||
super(ownerId, 279, "Run Wild", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{G}");
|
||||
this.expansionSetCode = "ONS";
|
||||
|
||||
// Until end of turn, target creature gains trample and "{G}: Regenerate this creature."
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
Effect effect1 = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect1.setText("Until end of turn, target creature gains trample");
|
||||
this.getSpellAbility().addEffect(effect1);
|
||||
|
||||
Effect effect2 = new GainAbilityTargetEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{G}")), Duration.EndOfTurn);
|
||||
effect2.setText("and \"{G}: Regenerate this creature\"");
|
||||
this.getSpellAbility().addEffect(effect2);
|
||||
|
||||
}
|
||||
|
||||
public RunWild(final RunWild card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RunWild copy() {
|
||||
return new RunWild(this);
|
||||
}
|
||||
}
|
|
@ -42,6 +42,7 @@ import mage.filter.FilterCard;
|
|||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -93,8 +94,7 @@ class SurrealMemoirEffect extends OneShotEffect {
|
|||
filter.add(new CardTypePredicate(CardType.INSTANT));
|
||||
Card[] cards = player.getGraveyard().getCards(filter, game).toArray(new Card[0]);
|
||||
if (cards.length > 0) {
|
||||
Random rnd = new Random();
|
||||
Card card = cards[rnd.nextInt(cards.length)];
|
||||
Card card = cards[RandomUtil.nextInt(cards.length)];
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, true);
|
||||
game.informPlayers(card.getName() + "returned to the hand of" + player.getLogName());
|
||||
return true;
|
||||
|
|
|
@ -47,6 +47,7 @@ import mage.game.events.GameEvent.EventType;
|
|||
import mage.game.stack.StackObject;
|
||||
import mage.target.Target;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -154,7 +155,7 @@ class GripOfChaosEffect extends OneShotEffect {
|
|||
Set<UUID> possibleTargets = target.possibleTargets(source.getSourceId(), source.getControllerId(), game);
|
||||
if (possibleTargets.size() > 0) {
|
||||
int i = 0;
|
||||
int rnd = new Random().nextInt(possibleTargets.size());
|
||||
int rnd = RandomUtil.nextInt(possibleTargets.size());
|
||||
Iterator<UUID> it = possibleTargets.iterator();
|
||||
while (i < rnd) {
|
||||
it.next();
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -98,8 +99,8 @@ class WildSwingEffect extends OneShotEffect {
|
|||
if (!source.getTargets().isEmpty() && sourceObject != null) {
|
||||
Target target = source.getTargets().get(0);
|
||||
if (target != null && !target.getTargets().isEmpty()) {
|
||||
Random rnd = new Random();
|
||||
Permanent targetPermanent = game.getPermanent(target.getTargets().get(rnd.nextInt(target.getTargets().size())));
|
||||
|
||||
Permanent targetPermanent = game.getPermanent(target.getTargets().get(RandomUtil.nextInt(target.getTargets().size())));
|
||||
if (targetPermanent != null) {
|
||||
game.informPlayers(sourceObject.getLogName() + ": The randomly chosen target to destroy is " + targetPermanent.getLogName());
|
||||
targetPermanent.destroy(source.getSourceId(), game, false);
|
||||
|
|
|
@ -72,4 +72,32 @@ public class PutToGraveyardTest extends CardTestPlayerBase {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Oracle of Dust does not seem to actually move cards from exile into the
|
||||
* opponent's graveyard, even though every other part of the ability works
|
||||
* just fine.
|
||||
*/
|
||||
@Test
|
||||
public void testExileToGraveyard2() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 3);
|
||||
// Devoid
|
||||
// {2}, Put a card an opponent owns from exile into that player's graveyard: Draw a card, then discard a card.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Oracle of Dust", 1); // {4}{U}
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
|
||||
// Exile target creature. Its controller gains life equal to its power.
|
||||
addCard(Zone.HAND, playerA, "Swords to Plowshares");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Swords to Plowshares", "Silvercoat Lion");
|
||||
|
||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{2}");
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, "Swords to Plowshares", 1);
|
||||
assertGraveyardCount(playerB, "Silvercoat Lion", 1);
|
||||
assertGraveyardCount(playerA, 2);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue