mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
commit
ffb50331ad
3302 changed files with 17687 additions and 6026 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -18,6 +18,7 @@ Mage.Server.Plugins/Mage.Deck.Limited/target
|
|||
Mage.Server.Plugins/Mage.Game.CommanderDuel/target
|
||||
Mage.Server.Plugins/Mage.Game.FreeForAll/target
|
||||
Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/target
|
||||
Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/target
|
||||
Mage.Server.Plugins/Mage.Player.AI/target
|
||||
Mage.Server.Plugins/Mage.Player.AIMinimax/target
|
||||
Mage.Server.Plugins/Mage.Player.AI.MA/target
|
||||
|
@ -82,4 +83,7 @@ Mage.Server.Plugins/Mage.Draft.8PlayerBooster/target
|
|||
|
||||
/Mage.Server/config/ai.please.cast.this.txt
|
||||
/Mage.Stats/target/
|
||||
/Utils/*_unimplemented.txt
|
||||
/Utils/*_unimplemented.txt
|
||||
*.netbeans_automatic_build
|
||||
*.txt
|
||||
Mage.Client/serverlist.txt
|
|
@ -30,6 +30,10 @@
|
|||
<artifactId>jspf-core</artifactId>
|
||||
<version>0.9.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
|
@ -100,7 +104,7 @@
|
|||
<artifactId>truevfs-profile-base</artifactId>
|
||||
<groupId>net.java.truevfs</groupId>
|
||||
<type>jar</type>
|
||||
<version>0.10.6</version>
|
||||
<version>0.10.8</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>truevfs-access-swing</artifactId>
|
||||
|
@ -142,15 +146,11 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<version>2.5.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
|
|
|
@ -443,7 +443,7 @@ public class ConnectDialog extends MageDialog {
|
|||
try {
|
||||
in = new BufferedReader(new InputStreamReader(serverListURL.openConnection(p).getInputStream()));
|
||||
} catch (FileNotFoundException| UnknownHostException ex ) {
|
||||
logger.info("Could not read serverlist from: " + serverListURL.toString());
|
||||
logger.warn("Could not read serverlist from: " + serverListURL.toString());
|
||||
File f = new File("serverlist.txt");
|
||||
if (f.exists() && !f.isDirectory()) {
|
||||
logger.info("Using buffered serverlist: serverlist.txt");
|
||||
|
@ -465,7 +465,7 @@ public class ConnectDialog extends MageDialog {
|
|||
|
||||
String inputLine;
|
||||
while ((inputLine = in.readLine()) != null) {
|
||||
logger.info("Found server: " + inputLine);
|
||||
logger.debug("Found server: " + inputLine);
|
||||
servers.add(inputLine);
|
||||
if (output != null) {
|
||||
output.append(inputLine).append('\n');
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.client.game;
|
||||
|
||||
import com.sun.java.swing.plaf.windows.WindowsBorders;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
|
@ -606,7 +607,14 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
else {
|
||||
this.txtStep.setText("");
|
||||
}
|
||||
this.txtPhasesBottomInfo.setText(" " + (game.getSpellsCastCurrentTurn() > 0 ? Integer.toString(game.getSpellsCastCurrentTurn()):""));
|
||||
if (game.getSpellsCastCurrentTurn() > 0) {
|
||||
this.phasesBottomPanel.setVisible(true);
|
||||
this.txtPhasesBottomInfo.setText(Integer.toString(game.getSpellsCastCurrentTurn()));
|
||||
} else {
|
||||
this.phasesBottomPanel.setVisible(false);
|
||||
this.txtPhasesBottomInfo.setText("");
|
||||
}
|
||||
|
||||
this.txtActivePlayer.setText(game.getActivePlayerName());
|
||||
this.txtPriority.setText(game.getPriorityPlayerName());
|
||||
this.txtTurn.setText(Integer.toString(game.getTurn()));
|
||||
|
@ -1508,8 +1516,9 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
phasesContainer.add(empty1, ratio);
|
||||
phasesContainer.add(jPhases);
|
||||
|
||||
JPanel phasesBottomPanel = new JPanel();
|
||||
phasesBottomPanel.setBackground(new Color(0, 0, 0, 0));
|
||||
phasesBottomPanel = new JPanel();
|
||||
phasesBottomPanel.setBackground(Color.LIGHT_GRAY);
|
||||
phasesBottomPanel.setBorder(new LineBorder(Color.DARK_GRAY, 2));
|
||||
phasesBottomPanel.add(txtPhasesBottomInfo);
|
||||
phasesContainer.add(phasesBottomPanel);
|
||||
|
||||
|
@ -1862,6 +1871,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
private javax.swing.JSplitPane jSplitPane2;
|
||||
private JPanel jPhases;
|
||||
private JPanel phasesContainer;
|
||||
private JPanel phasesBottomPanel;
|
||||
private javax.swing.JLabel txtPhasesBottomInfo;
|
||||
|
||||
private HoverButton currentStep;
|
||||
|
|
|
@ -27,7 +27,7 @@ public class ConstructedFormats {
|
|||
|
||||
private static final String[] constructedFormats = {
|
||||
ALL, STANDARD, EXTENDED, MODERN,
|
||||
"* Khans of Tarkir Block", "Khans of Tarkir", "Fate Reforged", /*"Dragons of Tarkir"*/
|
||||
"* Khans of Tarkir Block", "Khans of Tarkir", "Fate Reforged", "Dragons of Tarkir",
|
||||
"* Theros Block", "Journey into Nyx", "Born of the Gods", "Theros",
|
||||
"* Return to Ravnica Block", "Dragon's Maze", "Gatecrash", "Return to Ravnica",
|
||||
"* Innistrad Block", "Avacyn Restored", "Dark Ascension", "Innistrad",
|
||||
|
@ -113,7 +113,10 @@ public class ConstructedFormats {
|
|||
|
||||
public static List<String> getSetsByFormat(String format) {
|
||||
if (format.equals("* Khans of Tarkir Block")) {
|
||||
return Arrays.asList("KTK", "FRF");
|
||||
return Arrays.asList("KTK", "FRF","DTK");
|
||||
}
|
||||
if (format.equals("Dragons of Tarkir")) {
|
||||
return Arrays.asList("DTK");
|
||||
}
|
||||
if (format.equals("Fate Reforged")) {
|
||||
return Arrays.asList("FRF");
|
||||
|
|
|
@ -44,8 +44,7 @@ public class GathererSets implements Iterable<DownloadJob> {
|
|||
"MMA",
|
||||
"THS", "BNG", "JOU",
|
||||
"CNS", "VMA",
|
||||
"KTK", "FRF"
|
||||
};
|
||||
"KTK", "FRF", "DTK"};
|
||||
private static final HashMap<String, String> symbolsReplacements = new HashMap<>();
|
||||
|
||||
static {
|
||||
|
|
|
@ -16,6 +16,7 @@ public class MagicCardsImageSource implements CardImageSource {
|
|||
|
||||
private static final Map<String, String> setNameTokenReplacement = new HashMap<String, String>() {
|
||||
{
|
||||
put("DTK", "dragons-of-tarkir");
|
||||
put("GRC","wpngateway");
|
||||
put("MBP","media-inserts");
|
||||
put("MLP", "launch-party");
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
|
||||
package org.mage.plugins.card.dl.sources;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import mage.cards.SplitCard;
|
||||
import org.mage.plugins.card.images.CardDownloadData;
|
||||
|
||||
/**
|
||||
|
@ -56,7 +54,7 @@ public class MtgImageSource implements CardImageSource {
|
|||
throw new Exception("Wrong parameters for image: collector id: " + collectorId + ",card set: " + cardSet);
|
||||
}
|
||||
StringBuilder url = new StringBuilder("http://mtgimage.com/set/");
|
||||
url.append(cardSet.toUpperCase()).append("/");
|
||||
url.append(cardSet.toUpperCase()).append("/");
|
||||
|
||||
if (card.isSplitCard()) {
|
||||
url.append(card.getDownloadName().replaceAll(" // ", ""));
|
||||
|
|
|
@ -1,203 +1,204 @@
|
|||
package org.mage.plugins.card.dl.sources;
|
||||
|
||||
import org.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.select.Elements;
|
||||
import org.mage.plugins.card.images.CardDownloadData;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class WizardCardsImageSource implements CardImageSource {
|
||||
|
||||
private static CardImageSource instance;
|
||||
private static Map<String, String> setsAliases;
|
||||
private final Map<String, Map<String, String>> sets;
|
||||
|
||||
public static CardImageSource getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new WizardCardsImageSource();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public WizardCardsImageSource() {
|
||||
sets = new HashMap<>();
|
||||
setsAliases = new HashMap<>();
|
||||
setsAliases.put("FRF", "fatereforged/cig");
|
||||
setsAliases.put("C14", "commander2014/cig");
|
||||
setsAliases.put("KTK", "khansoftarkir/cig");
|
||||
setsAliases.put("M15", "magic2015coreset/cig");
|
||||
setsAliases.put("CNS", "vintagemasters/cig");
|
||||
setsAliases.put("CNS", "conspiracy/cig");
|
||||
setsAliases.put("JOU", "journeyintonyx/cig");
|
||||
setsAliases.put("BNG", "bornofthegods/cig");
|
||||
setsAliases.put("C13", "commander2013/cig");
|
||||
setsAliases.put("THS", "theros/cig");
|
||||
setsAliases.put("M14", "magic2014coreset/cig");
|
||||
setsAliases.put("MMA", "modernmasters/cig");
|
||||
setsAliases.put("DGM", "dragonsmaze/cig");
|
||||
setsAliases.put("GTC", "gatecrash/cig");
|
||||
setsAliases.put("RTR", "returntoravnica/cig");
|
||||
setsAliases.put("M13", "magic2013/cig");
|
||||
setsAliases.put("AVR", "avacynrestored/cig");
|
||||
setsAliases.put("DKA", "darkascension/cig");
|
||||
setsAliases.put("ISD", "innistrad/cig");
|
||||
setsAliases.put("M12", "magic2012/cig");
|
||||
setsAliases.put("CMD", "commander/cig");
|
||||
setsAliases.put("NPH", "newphyrexia/spoiler");
|
||||
setsAliases.put("MBS", "mirrodinbesieged/spoiler");
|
||||
setsAliases.put("SOM", "scarsofmirrodin/spoiler");
|
||||
setsAliases.put("M11", "magic2011/spoiler");
|
||||
setsAliases.put("ROE", "riseoftheeldrazi/spoiler");
|
||||
setsAliases.put("WWK", "worldwake/spoiler");
|
||||
setsAliases.put("ZEN", "zendikar/spoiler");
|
||||
setsAliases.put("M10", "magic2010/spoiler");
|
||||
setsAliases.put("ARB", "alarareborn/spoiler");
|
||||
setsAliases.put("CON", "conflux/spoiler");
|
||||
setsAliases.put("ALA", "shardsofalara/spoiler");
|
||||
setsAliases.put("PC2", "planechase2012edition/cig");
|
||||
setsAliases.put("PTK", "portalthreekingdoms/cig");
|
||||
setsAliases.put("EVG", "elvesvsgoblins/cig");
|
||||
setsAliases.put("DD2", "jacevschandra/cig");
|
||||
setsAliases.put("DDC", "divinevsdemonic/cig");
|
||||
setsAliases.put("DDD", "garrukvsliliana/cig");
|
||||
setsAliases.put("DDE", "phyrexiavsthecoalition/cig");
|
||||
setsAliases.put("DDF", "elspethvstezzeret/cig");
|
||||
setsAliases.put("DDG", "knightsvsdragons/cig");
|
||||
setsAliases.put("DDH", "ajanivsnicolbolas/cig");
|
||||
setsAliases.put("DDI", "venservskoth/cig");
|
||||
setsAliases.put("DDJ", "izzetvsgolgari/cig");
|
||||
setsAliases.put("DDK", "sorinvstibalt/cig");
|
||||
setsAliases.put("DDL", "heroesvsmonsters/cig");
|
||||
setsAliases.put("DDM", "jacevsvraska/cig");
|
||||
setsAliases.put("DDN", "speedvscunning/cig");
|
||||
}
|
||||
|
||||
private Map<String, String> getSetLinks(String cardSet) {
|
||||
Map<String, String> setLinks = new HashMap<>();
|
||||
try {
|
||||
String urlDocument;
|
||||
if (cardSet.equals("M15")) {
|
||||
urlDocument = "http://magic.wizards.com/en/content/magic-2015-core-set-card-set-archive-products-game-info";
|
||||
Document doc = Jsoup.connect(urlDocument).get();
|
||||
Elements cardsImages = doc.select("div.advanced-card img");
|
||||
for (int i = 0; i < cardsImages.size(); i++) {
|
||||
String cardName = normalizeName(cardsImages.get(i).attr("alt"));
|
||||
if (cardName != null && !cardName.isEmpty()) {
|
||||
if (cardName.equals("Forest") || cardName.equals("Swamp") || cardName.equals("Mountain") || cardName.equals("Island") || cardName.equals("Plains")) {
|
||||
int landNumber = 1;
|
||||
while (setLinks.get((cardName + landNumber).toLowerCase()) != null) {
|
||||
landNumber++;
|
||||
}
|
||||
cardName += landNumber;
|
||||
}
|
||||
setLinks.put(cardName.toLowerCase(), cardsImages.get(i).attr("src"));
|
||||
} else {
|
||||
setLinks.put(Integer.toString(i), cardsImages.get(i).attr("src"));
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
urlDocument = "http://www.wizards.com/magic/tcg/article.aspx?x=mtg/tcg/" + setsAliases.get(cardSet);
|
||||
Document doc = Jsoup.connect(urlDocument).get();
|
||||
Elements cardsImages = doc.select("img[height$=370]");
|
||||
for (int i = 0; i < cardsImages.size(); i++) {
|
||||
String cardName = normalizeName(cardsImages.get(i).attr("title"));
|
||||
if (cardName != null && !cardName.isEmpty()) {
|
||||
if (cardName.equals("Forest") || cardName.equals("Swamp") || cardName.equals("Mountain") || cardName.equals("Island") || cardName.equals("Plains")) {
|
||||
int landNumber = 1;
|
||||
while (setLinks.get((cardName + landNumber).toLowerCase()) != null) {
|
||||
landNumber++;
|
||||
}
|
||||
cardName += landNumber;
|
||||
}
|
||||
setLinks.put(cardName.toLowerCase(), cardsImages.get(i).attr("src"));
|
||||
} else {
|
||||
setLinks.put(Integer.toString(i), cardsImages.get(i).attr("src"));
|
||||
}
|
||||
}
|
||||
|
||||
cardsImages = doc.select("img[height$=470]");
|
||||
for (int i = 0; i < cardsImages.size(); i++) {
|
||||
String cardName = normalizeName(cardsImages.get(i).attr("title"));
|
||||
|
||||
if (cardName != null && !cardName.isEmpty()) {
|
||||
String[] cardNames = cardName.replace(")", "").split(" \\(");
|
||||
for (String name : cardNames) {
|
||||
setLinks.put(name.toLowerCase(), cardsImages.get(i).attr("src"));
|
||||
}
|
||||
} else {
|
||||
setLinks.put(Integer.toString(i), cardsImages.get(i).attr("src"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
System.out.println("Exception when parsing the wizards page: " + ex.getMessage());
|
||||
}
|
||||
return setLinks;
|
||||
}
|
||||
|
||||
private String normalizeName(String name) {
|
||||
return name.replace("\u2014", "-").replace("\u2019", "'")
|
||||
.replace("\u00C6", "AE").replace("\u00E6", "ae")
|
||||
.replace("\u00C1", "A").replace("\u00E1", "a")
|
||||
.replace("\u00C2", "A").replace("\u00E2", "a")
|
||||
.replace("\u00D6", "O").replace("\u00F6", "o")
|
||||
.replace("\u00DB", "U").replace("\u00FB", "u")
|
||||
.replace("\u00DC", "U").replace("\u00FC", "u")
|
||||
.replace("\u00E9", "e").replace("&", "//")
|
||||
.replace("Hintreland Scourge", "Hinterland Scourge");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateURL(CardDownloadData card) throws Exception {
|
||||
Integer collectorId = card.getCollectorId();
|
||||
String cardSet = card.getSet();
|
||||
if (collectorId == null || cardSet == null) {
|
||||
throw new Exception("Wrong parameters for image: collector id: " + collectorId + ",card set: " + cardSet);
|
||||
}
|
||||
if (card.isFlippedSide()) { //doesn't support rotated images
|
||||
return null;
|
||||
}
|
||||
if (setsAliases.get(cardSet) != null) {
|
||||
Map<String, String> setLinks = sets.get(cardSet);
|
||||
if (setLinks == null) {
|
||||
setLinks = getSetLinks(cardSet);
|
||||
sets.put(cardSet, setLinks);
|
||||
}
|
||||
String link = setLinks.get(card.getDownloadName().toLowerCase());
|
||||
if (link == null) {
|
||||
if (setLinks.size() >= collectorId) {
|
||||
link = setLinks.get(Integer.toString(collectorId - 1));
|
||||
} else {
|
||||
link = setLinks.get(Integer.toString(collectorId - 21));
|
||||
if (link != null) {
|
||||
link = link.replace(Integer.toString(collectorId - 20), (Integer.toString(collectorId - 20) + "a"));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (link != null && !link.startsWith("http://")) {
|
||||
link = "http://www.wizards.com" + link;
|
||||
}
|
||||
return link;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateTokenUrl(CardDownloadData card) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float getAverageSize() {
|
||||
return 60.0f;
|
||||
}
|
||||
}
|
||||
package org.mage.plugins.card.dl.sources;
|
||||
|
||||
import org.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.select.Elements;
|
||||
import org.mage.plugins.card.images.CardDownloadData;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class WizardCardsImageSource implements CardImageSource {
|
||||
|
||||
private static CardImageSource instance;
|
||||
private static Map<String, String> setsAliases;
|
||||
private final Map<String, Map<String, String>> sets;
|
||||
|
||||
public static CardImageSource getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new WizardCardsImageSource();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public WizardCardsImageSource() {
|
||||
sets = new HashMap<>();
|
||||
setsAliases = new HashMap<>();
|
||||
setsAliases.put("DTK", "dragonsoftarkir/cig");
|
||||
setsAliases.put("FRF", "fatereforged/cig");
|
||||
setsAliases.put("C14", "commander2014/cig");
|
||||
setsAliases.put("KTK", "khansoftarkir/cig");
|
||||
setsAliases.put("M15", "magic2015coreset/cig");
|
||||
setsAliases.put("CNS", "vintagemasters/cig");
|
||||
setsAliases.put("CNS", "conspiracy/cig");
|
||||
setsAliases.put("JOU", "journeyintonyx/cig");
|
||||
setsAliases.put("BNG", "bornofthegods/cig");
|
||||
setsAliases.put("C13", "commander2013/cig");
|
||||
setsAliases.put("THS", "theros/cig");
|
||||
setsAliases.put("M14", "magic2014coreset/cig");
|
||||
setsAliases.put("MMA", "modernmasters/cig");
|
||||
setsAliases.put("DGM", "dragonsmaze/cig");
|
||||
setsAliases.put("GTC", "gatecrash/cig");
|
||||
setsAliases.put("RTR", "returntoravnica/cig");
|
||||
setsAliases.put("M13", "magic2013/cig");
|
||||
setsAliases.put("AVR", "avacynrestored/cig");
|
||||
setsAliases.put("DKA", "darkascension/cig");
|
||||
setsAliases.put("ISD", "innistrad/cig");
|
||||
setsAliases.put("M12", "magic2012/cig");
|
||||
setsAliases.put("CMD", "commander/cig");
|
||||
setsAliases.put("NPH", "newphyrexia/spoiler");
|
||||
setsAliases.put("MBS", "mirrodinbesieged/spoiler");
|
||||
setsAliases.put("SOM", "scarsofmirrodin/spoiler");
|
||||
setsAliases.put("M11", "magic2011/spoiler");
|
||||
setsAliases.put("ROE", "riseoftheeldrazi/spoiler");
|
||||
setsAliases.put("WWK", "worldwake/spoiler");
|
||||
setsAliases.put("ZEN", "zendikar/spoiler");
|
||||
setsAliases.put("M10", "magic2010/spoiler");
|
||||
setsAliases.put("ARB", "alarareborn/spoiler");
|
||||
setsAliases.put("CON", "conflux/spoiler");
|
||||
setsAliases.put("ALA", "shardsofalara/spoiler");
|
||||
setsAliases.put("PC2", "planechase2012edition/cig");
|
||||
setsAliases.put("PTK", "portalthreekingdoms/cig");
|
||||
setsAliases.put("EVG", "elvesvsgoblins/cig");
|
||||
setsAliases.put("DD2", "jacevschandra/cig");
|
||||
setsAliases.put("DDC", "divinevsdemonic/cig");
|
||||
setsAliases.put("DDD", "garrukvsliliana/cig");
|
||||
setsAliases.put("DDE", "phyrexiavsthecoalition/cig");
|
||||
setsAliases.put("DDF", "elspethvstezzeret/cig");
|
||||
setsAliases.put("DDG", "knightsvsdragons/cig");
|
||||
setsAliases.put("DDH", "ajanivsnicolbolas/cig");
|
||||
setsAliases.put("DDI", "venservskoth/cig");
|
||||
setsAliases.put("DDJ", "izzetvsgolgari/cig");
|
||||
setsAliases.put("DDK", "sorinvstibalt/cig");
|
||||
setsAliases.put("DDL", "heroesvsmonsters/cig");
|
||||
setsAliases.put("DDM", "jacevsvraska/cig");
|
||||
setsAliases.put("DDN", "speedvscunning/cig");
|
||||
}
|
||||
|
||||
private Map<String, String> getSetLinks(String cardSet) {
|
||||
Map<String, String> setLinks = new HashMap<>();
|
||||
try {
|
||||
String urlDocument;
|
||||
if (cardSet.equals("M15")) {
|
||||
urlDocument = "http://magic.wizards.com/en/content/magic-2015-core-set-card-set-archive-products-game-info";
|
||||
Document doc = Jsoup.connect(urlDocument).get();
|
||||
Elements cardsImages = doc.select("div.advanced-card img");
|
||||
for (int i = 0; i < cardsImages.size(); i++) {
|
||||
String cardName = normalizeName(cardsImages.get(i).attr("alt"));
|
||||
if (cardName != null && !cardName.isEmpty()) {
|
||||
if (cardName.equals("Forest") || cardName.equals("Swamp") || cardName.equals("Mountain") || cardName.equals("Island") || cardName.equals("Plains")) {
|
||||
int landNumber = 1;
|
||||
while (setLinks.get((cardName + landNumber).toLowerCase()) != null) {
|
||||
landNumber++;
|
||||
}
|
||||
cardName += landNumber;
|
||||
}
|
||||
setLinks.put(cardName.toLowerCase(), cardsImages.get(i).attr("src"));
|
||||
} else {
|
||||
setLinks.put(Integer.toString(i), cardsImages.get(i).attr("src"));
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
urlDocument = "http://www.wizards.com/magic/tcg/article.aspx?x=mtg/tcg/" + setsAliases.get(cardSet);
|
||||
Document doc = Jsoup.connect(urlDocument).get();
|
||||
Elements cardsImages = doc.select("img[height$=370]");
|
||||
for (int i = 0; i < cardsImages.size(); i++) {
|
||||
String cardName = normalizeName(cardsImages.get(i).attr("title"));
|
||||
if (cardName != null && !cardName.isEmpty()) {
|
||||
if (cardName.equals("Forest") || cardName.equals("Swamp") || cardName.equals("Mountain") || cardName.equals("Island") || cardName.equals("Plains")) {
|
||||
int landNumber = 1;
|
||||
while (setLinks.get((cardName + landNumber).toLowerCase()) != null) {
|
||||
landNumber++;
|
||||
}
|
||||
cardName += landNumber;
|
||||
}
|
||||
setLinks.put(cardName.toLowerCase(), cardsImages.get(i).attr("src"));
|
||||
} else {
|
||||
setLinks.put(Integer.toString(i), cardsImages.get(i).attr("src"));
|
||||
}
|
||||
}
|
||||
|
||||
cardsImages = doc.select("img[height$=470]");
|
||||
for (int i = 0; i < cardsImages.size(); i++) {
|
||||
String cardName = normalizeName(cardsImages.get(i).attr("title"));
|
||||
|
||||
if (cardName != null && !cardName.isEmpty()) {
|
||||
String[] cardNames = cardName.replace(")", "").split(" \\(");
|
||||
for (String name : cardNames) {
|
||||
setLinks.put(name.toLowerCase(), cardsImages.get(i).attr("src"));
|
||||
}
|
||||
} else {
|
||||
setLinks.put(Integer.toString(i), cardsImages.get(i).attr("src"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
System.out.println("Exception when parsing the wizards page: " + ex.getMessage());
|
||||
}
|
||||
return setLinks;
|
||||
}
|
||||
|
||||
private String normalizeName(String name) {
|
||||
return name.replace("\u2014", "-").replace("\u2019", "'")
|
||||
.replace("\u00C6", "AE").replace("\u00E6", "ae")
|
||||
.replace("\u00C1", "A").replace("\u00E1", "a")
|
||||
.replace("\u00C2", "A").replace("\u00E2", "a")
|
||||
.replace("\u00D6", "O").replace("\u00F6", "o")
|
||||
.replace("\u00DB", "U").replace("\u00FB", "u")
|
||||
.replace("\u00DC", "U").replace("\u00FC", "u")
|
||||
.replace("\u00E9", "e").replace("&", "//")
|
||||
.replace("Hintreland Scourge", "Hinterland Scourge");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateURL(CardDownloadData card) throws Exception {
|
||||
Integer collectorId = card.getCollectorId();
|
||||
String cardSet = card.getSet();
|
||||
if (collectorId == null || cardSet == null) {
|
||||
throw new Exception("Wrong parameters for image: collector id: " + collectorId + ",card set: " + cardSet);
|
||||
}
|
||||
if (card.isFlippedSide()) { //doesn't support rotated images
|
||||
return null;
|
||||
}
|
||||
if (setsAliases.get(cardSet) != null) {
|
||||
Map<String, String> setLinks = sets.get(cardSet);
|
||||
if (setLinks == null) {
|
||||
setLinks = getSetLinks(cardSet);
|
||||
sets.put(cardSet, setLinks);
|
||||
}
|
||||
String link = setLinks.get(card.getDownloadName().toLowerCase());
|
||||
if (link == null) {
|
||||
if (setLinks.size() >= collectorId) {
|
||||
link = setLinks.get(Integer.toString(collectorId - 1));
|
||||
} else {
|
||||
link = setLinks.get(Integer.toString(collectorId - 21));
|
||||
if (link != null) {
|
||||
link = link.replace(Integer.toString(collectorId - 20), (Integer.toString(collectorId - 20) + "a"));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (link != null && !link.startsWith("http://")) {
|
||||
link = "http://www.wizards.com" + link;
|
||||
}
|
||||
return link;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateTokenUrl(CardDownloadData card) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float getAverageSize() {
|
||||
return 60.0f;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
$|Generate|TOK:DTK|Djinn Monk|
|
||||
|
||||
#|Generate|TOK:GRC|Bird|
|
||||
#|Generate|TOK:GRC|Golem|
|
||||
#|Generate|TOK:GRC|Human|
|
||||
|
|
|
@ -65,6 +65,6 @@ ddd=gvl
|
|||
unh=uh
|
||||
dde=pvc
|
||||
# Remove setname as soon as the images can be downloaded
|
||||
ignore.urls=TOK
|
||||
ignore.urls=TOK,DTK
|
||||
# sets ordered by release time (newest goes first)
|
||||
token.lookup.order=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=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
|
|
@ -50,6 +50,7 @@ import mage.target.Targets;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
@ -116,21 +117,27 @@ public class CardView extends SimpleCardView {
|
|||
protected boolean canAttack;
|
||||
|
||||
public CardView(Card card) {
|
||||
this(card, null, false);
|
||||
this(card, null, null, false);
|
||||
}
|
||||
|
||||
public CardView(Card card, UUID cardId) {
|
||||
this(card, null, false);
|
||||
this(card, null, null, false);
|
||||
this.id = cardId;
|
||||
}
|
||||
|
||||
public CardView(Card card, Game game, UUID cardId) {
|
||||
this(card, game, null, false);
|
||||
this.id = cardId;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param card
|
||||
* @param game
|
||||
* @param cardId
|
||||
* @param controlled is the card view created for the card controller - used for morph / face down cards to know which player may see information for the card
|
||||
*/
|
||||
public CardView(Card card, UUID cardId, boolean controlled) {
|
||||
public CardView(Card card, Game game, UUID cardId, boolean controlled) {
|
||||
super(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.isFaceDown(), card.getUsesVariousArt(), card.getTokenSetCode());
|
||||
this.morphCard = card.isMorphCard();
|
||||
// no information available for face down cards as long it's not a controlled face down morph card
|
||||
|
@ -241,9 +248,9 @@ public class CardView extends SimpleCardView {
|
|||
this.rarity = card.getRarity();
|
||||
this.isToken = false;
|
||||
}
|
||||
if (card.getCounters() != null && !card.getCounters().isEmpty()) {
|
||||
if (game != null && card.getCounters(game) != null && !card.getCounters(game).isEmpty()) {
|
||||
counters = new ArrayList<>();
|
||||
for (Counter counter: card.getCounters().values()) {
|
||||
for (Counter counter: card.getCounters(game).values()) {
|
||||
counters.add(new CounterView(counter));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,10 +84,14 @@ public class GameView implements Serializable {
|
|||
|
||||
|
||||
public GameView(GameState state, Game game, UUID createdForPlayerId, UUID watcherUserId) {
|
||||
Player createdForPlayer = null;
|
||||
this.isPlayer = createdForPlayerId != null;
|
||||
this.priorityTime = game.getPriorityTime();
|
||||
for (Player player: state.getPlayers().values()) {
|
||||
players.add(new PlayerView(player, state, game, createdForPlayerId, watcherUserId));
|
||||
if (player.getId().equals(createdForPlayerId)) {
|
||||
createdForPlayer = player;
|
||||
}
|
||||
}
|
||||
for (StackObject stackObject: state.getStack()) {
|
||||
if (stackObject instanceof StackAbility) {
|
||||
|
@ -132,7 +136,7 @@ public class GameView implements Serializable {
|
|||
}
|
||||
else {
|
||||
// Spell
|
||||
stack.put(stackObject.getId(), new CardView((Spell)stackObject, null, stackObject.getControllerId().equals(createdForPlayerId)));
|
||||
stack.put(stackObject.getId(), new CardView((Spell)stackObject, game, null, stackObject.getControllerId().equals(createdForPlayerId)));
|
||||
checkPaid(stackObject.getId(), (Spell)stackObject);
|
||||
}
|
||||
//stackOrder.add(stackObject.getId());
|
||||
|
@ -161,7 +165,15 @@ public class GameView implements Serializable {
|
|||
for (CombatGroup combatGroup: state.getCombat().getGroups()) {
|
||||
combat.add(new CombatGroupView(combatGroup, game));
|
||||
}
|
||||
this.special = state.getSpecialActions().getControlledBy(state.getPriorityPlayerId()).size() > 0;
|
||||
if (isPlayer) {
|
||||
// has only to be set for active palyer with priority (e.g. pay mana by delve or Quenchable Fire special action)
|
||||
if (state.getPriorityPlayerId() == createdForPlayerId && createdForPlayer != null) {
|
||||
this.special = state.getSpecialActions().getControlledBy(state.getPriorityPlayerId(), createdForPlayer.isInPayManaMode()).size() > 0;
|
||||
}
|
||||
} else {
|
||||
this.special = false;
|
||||
}
|
||||
|
||||
CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get("CastSpellLastTurnWatcher");
|
||||
if (watcher != null) {
|
||||
spellsCastCurrentTurn = watcher.getAmountOfSpellsAllPlayersCastOnCurrentTurn();
|
||||
|
|
|
@ -62,7 +62,7 @@ public class PermanentView extends CardView {
|
|||
private final boolean attachedToPermanent;
|
||||
|
||||
public PermanentView(Permanent permanent, Card card, UUID createdForPlayerId, Game game) {
|
||||
super(permanent, null, permanent.getControllerId().equals(createdForPlayerId));
|
||||
super(permanent, game, null, permanent.getControllerId().equals(createdForPlayerId));
|
||||
this.controlled = permanent.getControllerId().equals(createdForPlayerId);
|
||||
this.rules = permanent.getRules();
|
||||
this.tapped = permanent.isTapped();
|
||||
|
|
|
@ -0,0 +1,213 @@
|
|||
/*
|
||||
* 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.deck;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import mage.abilities.common.CanBeYourCommanderAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.decks.Deck;
|
||||
import mage.cards.decks.DeckValidator;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterMana;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JRHerlehy
|
||||
*/
|
||||
public class TinyLeaders extends DeckValidator {
|
||||
|
||||
protected List<String> banned = new ArrayList<>();
|
||||
protected List<String> bannedCommander = new ArrayList<>();
|
||||
|
||||
public TinyLeaders() {
|
||||
this("Tiny Leaders");
|
||||
//Banned list from tinyleaders.blodspot.ca/p/ban-list.html
|
||||
//Ban list updated as of 11/08/14
|
||||
banned.add("Ancestral Recall");
|
||||
banned.add("Balance");
|
||||
banned.add("Black Lotus");
|
||||
banned.add("Channel");
|
||||
banned.add("Counterbalance");
|
||||
banned.add("Demonic Tutor");
|
||||
banned.add("Earthcraft");
|
||||
banned.add("Edric, Spymaster of Trest");
|
||||
banned.add("Fastbond");
|
||||
banned.add("Goblin Recruiter");
|
||||
banned.add("Hermit Druid");
|
||||
banned.add("Imperial Seal");
|
||||
banned.add("Library of Alexandria");
|
||||
banned.add("Karakas");
|
||||
banned.add("Mana Crypt");
|
||||
banned.add("Mana Drain");
|
||||
banned.add("Mana Vault");
|
||||
banned.add("metalworker");
|
||||
banned.add("Mind Twist");
|
||||
banned.add("Mishra's Workshop");
|
||||
banned.add("Mox Emerald");
|
||||
banned.add("Mox Jet");
|
||||
banned.add("Mox Pearl");
|
||||
banned.add("Mox Ruby");
|
||||
banned.add("Mox Sapphire");
|
||||
banned.add("Necropotence");
|
||||
banned.add("Painter's Servant");
|
||||
banned.add("Shahrazad");
|
||||
banned.add("Skullclamp");
|
||||
banned.add("Sol Ring");
|
||||
banned.add("Strip Mine");
|
||||
banned.add("Survival of the Fittest");
|
||||
banned.add("Sword of Body and Mind");
|
||||
banned.add("Time Vault");
|
||||
banned.add("Time Walk");
|
||||
banned.add("Timetwister");
|
||||
banned.add("Tolarian Academy");
|
||||
banned.add("Umezawa's Jitte");
|
||||
banned.add("Vampiric Tutor");
|
||||
banned.add("Yawgmoth's Will");
|
||||
|
||||
//Additionally, these Legendary creatures cannot be used as Commanders
|
||||
bannedCommander.add("Erayo, Soratami Ascendant");
|
||||
bannedCommander.add("Rofellos, Llanowar Emissary");
|
||||
bannedCommander.add("Derevi, Empyrical Tactician");
|
||||
}
|
||||
|
||||
public TinyLeaders(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param deck
|
||||
* @return - True if deck is valid
|
||||
*/
|
||||
@Override
|
||||
public boolean validate(Deck deck) {
|
||||
boolean valid = true;
|
||||
|
||||
if (deck.getCards().size() != 49) {
|
||||
invalid.put("Deck", "Must contain 49 cards: has " + deck.getCards().size() + " cards");
|
||||
valid = false;
|
||||
}
|
||||
|
||||
List<String> basicLandNames = new ArrayList<>(Arrays.asList("Forest", "Island", "Mountain", "Swamp", "Plains",
|
||||
"Snow-Covered Forest", "Snow-Covered Island", "Snow-Covered Mountain", "Snow-Covered Swamp", "Snow-Covered Plains"));
|
||||
Map<String, Integer> counts = new HashMap<>();
|
||||
countCards(counts, deck.getCards());
|
||||
countCards(counts, deck.getSideboard());
|
||||
for (Map.Entry<String, Integer> entry : counts.entrySet()) {
|
||||
if (entry.getValue() > 1) {
|
||||
if (!basicLandNames.contains(entry.getKey()) && !entry.getKey().equals("Relentless Rats") && !entry.getKey().equals("Shadowborn Apostle")) {
|
||||
invalid.put(entry.getKey(), "Too many: " + entry.getValue());
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (String bannedCard : banned) {
|
||||
if (counts.containsKey(bannedCard)) {
|
||||
invalid.put(bannedCard, "Banned");
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (deck.getSideboard().size() <= 11) {
|
||||
Card commander = null;
|
||||
|
||||
for (Card card : deck.getSideboard()) {
|
||||
if (card.getName().equalsIgnoreCase(deck.getName())) {
|
||||
commander = card;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 905.5b - Each card must have a converted mana cost of three of less.
|
||||
* Cards with {X} in their mana cost count X as zero.
|
||||
* Split and double-face cards are legal only if both of their halves would be legal independently.
|
||||
*/
|
||||
|
||||
if (commander == null || commander.getManaCost().convertedManaCost() > 3) {
|
||||
if (commander == null) {
|
||||
invalid.put("Leader", "Please be sure to set your leader in the NAME field in the DECK EDITOR");
|
||||
}
|
||||
if (commander != null && commander.getManaCost().convertedManaCost() > 3) {
|
||||
invalid.put("Leader", "Commander CMC is Greater than 3");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if ((commander.getCardType().contains(CardType.CREATURE) && commander.getSupertype().contains("Legendary"))
|
||||
|| (commander.getCardType().contains(CardType.PLANESWALKER) && commander.getAbilities().contains(CanBeYourCommanderAbility.getInstance()))) {
|
||||
if (!bannedCommander.contains(commander.getName())) {
|
||||
FilterMana color = CardUtil.getColorIdentity(commander);
|
||||
for (Card card : deck.getCards()) {
|
||||
if (!cardHasValideColor(color, card)) {
|
||||
invalid.put(card.getName(), "Invalid color (" + commander.getName() + ")");
|
||||
valid = false;
|
||||
}
|
||||
|
||||
//905.5b - Converted mana cost must be 3 or less
|
||||
if (card.getManaCost().convertedManaCost() > 3) {
|
||||
invalid.put(card.getName(), "Invalid cost (" + card.getManaCost().convertedManaCost() + ")");
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
invalid.put("Commander", "Commander banned (" + commander.getName() + ")");
|
||||
valid = false;
|
||||
}
|
||||
} else {
|
||||
invalid.put("Commander", "Commander invalide (" + commander.getName() + ")");
|
||||
valid = false;
|
||||
}
|
||||
} else {
|
||||
invalid.put("Commander", "Sideboard must contain only the commander and a maximum of 10 sideboard cards");
|
||||
valid = false;
|
||||
}
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param commander FilterMana object with Color Identity of Commander set
|
||||
* @param card Card to validate
|
||||
* @return True if card has a valid color identity
|
||||
*/
|
||||
public boolean cardHasValideColor(FilterMana commander, Card card) {
|
||||
FilterMana cardColor = CardUtil.getColorIdentity(card);
|
||||
return !(cardColor.isBlack() && !commander.isBlack()
|
||||
|| cardColor.isBlue() && !commander.isBlue()
|
||||
|| cardColor.isGreen() && !commander.isGreen()
|
||||
|| cardColor.isRed() && !commander.isRed()
|
||||
|| cardColor.isWhite() && !commander.isWhite());
|
||||
}
|
||||
|
||||
}
|
|
@ -28,8 +28,8 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
|
50
Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml
Normal file
50
Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml
Normal file
|
@ -0,0 +1,50 @@
|
|||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-game-tinyleadersduel</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>Mage Game Tiny Leaders Two Player</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>mage</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
||||
<finalName>mage-game-tinyleadersduel</finalName>
|
||||
</build>
|
||||
|
||||
<properties/>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* 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.game;
|
||||
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
import mage.game.match.MatchType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JRHerlehy
|
||||
*/
|
||||
public class TinyLeadersDuel extends GameTinyLeadersImpl {
|
||||
|
||||
public TinyLeadersDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, int freeMulligans, int startLife) {
|
||||
super(attackOption, range, freeMulligans, startLife);
|
||||
}
|
||||
|
||||
public TinyLeadersDuel(final TinyLeadersDuel game) {
|
||||
super(game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MatchType getGameType() {
|
||||
return new TinyLeadersDuelType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumPlayers() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TinyLeadersDuel copy() {
|
||||
return new TinyLeadersDuel(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -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.game;
|
||||
|
||||
import mage.game.match.MatchImpl;
|
||||
import mage.game.match.MatchOptions;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JRHerlehy
|
||||
*/
|
||||
public class TinyLeadersDuelMatch extends MatchImpl {
|
||||
|
||||
public TinyLeadersDuelMatch(MatchOptions options) {
|
||||
super(options);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startGame() throws GameException {
|
||||
//Tiny Leaders Play Rule 13: Players begin the game with 25 life.
|
||||
int startLife = 25;
|
||||
|
||||
TinyLeadersDuel game = new TinyLeadersDuel(options.getAttackOption(), options.getRange(), options.getFreeMulligans(), startLife);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
|
||||
//Tucking a Tiny Leader is legal
|
||||
game.setAlsoLibrary(false);
|
||||
this.initGame(game);
|
||||
games.add(game);
|
||||
}
|
||||
|
||||
}
|
|
@ -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.game;
|
||||
|
||||
import mage.game.match.MatchType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JRHerlehy
|
||||
*/
|
||||
public class TinyLeadersDuelType extends MatchType {
|
||||
|
||||
public TinyLeadersDuelType() {
|
||||
this.name = "Tiny Leaders Two Player Duel";
|
||||
this.maxPlayers = 2;
|
||||
this.minPlayers = 2;
|
||||
this.numTeams = 0;
|
||||
this.useAttackOption = false;
|
||||
this.useRange = false;
|
||||
this.sideboardingAllowed = true;
|
||||
}
|
||||
|
||||
protected TinyLeadersDuelType(final TinyLeadersDuelType matchType){
|
||||
super(matchType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TinyLeadersDuelType copy() {
|
||||
return new TinyLeadersDuelType(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -35,7 +35,7 @@ import mage.abilities.costs.VariableCost;
|
|||
import mage.abilities.costs.mana.*;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
|
||||
import mage.abilities.keyword.*;
|
||||
import mage.abilities.mana.ManaAbility;
|
||||
import mage.abilities.mana.ManaOptions;
|
||||
|
@ -75,6 +75,9 @@ import java.io.IOException;
|
|||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.predicate.other.PlayerIdPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1011,7 +1014,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean playMana(ManaCost unpaid, Game game) {
|
||||
public boolean playMana(ManaCost unpaid, String promptText, Game game) {
|
||||
payManaMode = true;
|
||||
boolean result = playManaHandling(unpaid, game);
|
||||
payManaMode = false;
|
||||
|
@ -1283,6 +1286,9 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
if (card != null) {
|
||||
target.addTarget(card.getId(), source, game);
|
||||
cardChoices.remove(card);
|
||||
} else {
|
||||
// We don't have any valid target to choose so stop choosing
|
||||
return target.getTargets().size() < target.getNumberOfTargets();
|
||||
}
|
||||
if (outcome.equals(Outcome.Neutral) && target.getTargets().size() > target.getNumberOfTargets() + (target.getMaxNumberOfTargets() - target.getNumberOfTargets()) / 2) {
|
||||
return true;
|
||||
|
@ -1947,10 +1953,14 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
}
|
||||
|
||||
protected List<Permanent> threats(UUID playerId, UUID sourceId, FilterPermanent filter, Game game, List<UUID> targets) {
|
||||
List<Permanent> threats = (playerId == null || sourceId ==null) ?
|
||||
game.getBattlefield().getActivePermanents(filter, this.getId(), sourceId, game) : // all permanents within the range of the player
|
||||
game.getBattlefield().getActivePermanents(filter, playerId, sourceId, game);
|
||||
|
||||
List<Permanent> threats;
|
||||
if (playerId == null) {
|
||||
threats = game.getBattlefield().getActivePermanents(filter, this.getId(), sourceId, game); // all permanents within the range of the player
|
||||
} else {
|
||||
FilterPermanent filterCopy = filter.copy();
|
||||
filterCopy.add(new ControllerIdPredicate(playerId));
|
||||
threats = game.getBattlefield().getActivePermanents(filter, this.getId(), sourceId, game);
|
||||
}
|
||||
Iterator<Permanent> it = threats.iterator();
|
||||
while (it.hasNext()) { // remove permanents already targeted
|
||||
Permanent test = it.next();
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
|
|
@ -432,13 +432,29 @@ public class HumanPlayer extends PlayerImpl {
|
|||
if (target.getTargets().size() >= target.getNumberOfTargets()) {
|
||||
required = false;
|
||||
}
|
||||
game.fireSelectTargetEvent(playerId, target.getMessage(), cards, required, getOptions(target, null));
|
||||
Map<String, Serializable> options = getOptions(target, null);
|
||||
List<UUID> chosen = target.getTargets();
|
||||
options.put("chosen", (Serializable)chosen);
|
||||
List<UUID> choosable = new ArrayList<>();
|
||||
for (UUID cardId : cards) {
|
||||
if (target.canTarget(cardId, cards, game)) {
|
||||
choosable.add(cardId);
|
||||
}
|
||||
}
|
||||
if (!choosable.isEmpty()) {
|
||||
options.put("choosable", (Serializable) choosable);
|
||||
}
|
||||
game.fireSelectTargetEvent(playerId, target.getMessage(), cards, required, options);
|
||||
waitForResponse(game);
|
||||
if (response.getUUID() != null) {
|
||||
if (target.canTarget(response.getUUID(), cards, game)) {
|
||||
target.addTarget(response.getUUID(), source, game);
|
||||
if(target.doneChosing()){
|
||||
return true;
|
||||
if (target.getTargets().contains(response.getUUID())) { // if already included remove it
|
||||
target.remove(response.getUUID());
|
||||
} else {
|
||||
if (target.canTarget(response.getUUID(), cards, game)) {
|
||||
target.addTarget(response.getUUID(), source, game);
|
||||
if (target.doneChosing()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -606,17 +622,17 @@ public class HumanPlayer extends PlayerImpl {
|
|||
|
||||
|
||||
@Override
|
||||
public boolean playMana(ManaCost unpaid, Game game) {
|
||||
public boolean playMana(ManaCost unpaid, String promptText, Game game) {
|
||||
payManaMode = true;
|
||||
boolean result = playManaHandling(unpaid, game);
|
||||
boolean result = playManaHandling(unpaid, promptText, game);
|
||||
payManaMode = false;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
protected boolean playManaHandling(ManaCost unpaid, Game game) {
|
||||
protected boolean playManaHandling(ManaCost unpaid, String promptText, Game game) {
|
||||
updateGameStatePriority("playMana", game);
|
||||
game.firePlayManaEvent(playerId, "Pay " + unpaid.getText());
|
||||
game.firePlayManaEvent(playerId, "Pay " + promptText);
|
||||
waitForResponse(game);
|
||||
if (!this.isInGame()) {
|
||||
return false;
|
||||
|
@ -627,6 +643,8 @@ public class HumanPlayer extends PlayerImpl {
|
|||
playManaAbilities(unpaid, game);
|
||||
} else if (response.getString() != null && response.getString().equals("special")) {
|
||||
if (unpaid instanceof ManaCostsImpl) {
|
||||
specialManaAction(unpaid, game);
|
||||
// TODO: delve or convoke cards with PhyrexianManaCost won't work together (this combinaton does not exist yet)
|
||||
ManaCostsImpl<ManaCost> costs = (ManaCostsImpl<ManaCost>) unpaid;
|
||||
for (ManaCost cost : costs.getUnpaid()) {
|
||||
if (cost instanceof PhyrexianManaCost) {
|
||||
|
@ -970,14 +988,34 @@ public class HumanPlayer extends PlayerImpl {
|
|||
draft.firePickCardEvent(playerId);
|
||||
}
|
||||
|
||||
protected void specialAction(Game game) {
|
||||
updateGameStatePriority("specialAction", game);
|
||||
LinkedHashMap<UUID, SpecialAction> specialActions = game.getState().getSpecialActions().getControlledBy(playerId);
|
||||
game.fireGetChoiceEvent(playerId, name, null, new ArrayList<>(specialActions.values()));
|
||||
waitForResponse(game);
|
||||
if (response.getUUID() != null) {
|
||||
if (specialActions.containsKey(response.getUUID())) {
|
||||
activateAbility(specialActions.get(response.getUUID()), game);
|
||||
protected void specialAction(Game game) {
|
||||
LinkedHashMap<UUID, SpecialAction> specialActions = game.getState().getSpecialActions().getControlledBy(playerId, false);
|
||||
if (!specialActions.isEmpty()) {
|
||||
updateGameStatePriority("specialAction", game);
|
||||
game.fireGetChoiceEvent(playerId, name, null, new ArrayList<>(specialActions.values()));
|
||||
waitForResponse(game);
|
||||
if (response.getUUID() != null) {
|
||||
if (specialActions.containsKey(response.getUUID())) {
|
||||
activateAbility(specialActions.get(response.getUUID()), game);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void specialManaAction(ManaCost unpaid, Game game) {
|
||||
LinkedHashMap<UUID, SpecialAction> specialActions = game.getState().getSpecialActions().getControlledBy(playerId, true);
|
||||
if (!specialActions.isEmpty()) {
|
||||
updateGameStatePriority("specialAction", game);
|
||||
game.fireGetChoiceEvent(playerId, name, null, new ArrayList<>(specialActions.values()));
|
||||
waitForResponse(game);
|
||||
if (response.getUUID() != null) {
|
||||
if (specialActions.containsKey(response.getUUID())) {
|
||||
SpecialAction specialAction = specialActions.get(response.getUUID());
|
||||
if (specialAction != null) {
|
||||
specialAction.setUnpaidMana(unpaid);
|
||||
activateAbility(specialActions.get(response.getUUID()), game);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,19 +17,12 @@
|
|||
<modules>
|
||||
<module>Mage.Deck.Constructed</module>
|
||||
<module>Mage.Deck.Limited</module>
|
||||
<module>Mage.Game.CommanderDuel</module>
|
||||
<module>Mage.Game.CommanderDuel</module>
|
||||
<module>Mage.Game.CommanderFreeForAll</module>
|
||||
<module>Mage.Game.FreeForAll</module>
|
||||
<module>Mage.Game.TwoPlayerDuel</module>
|
||||
<module>Mage.Player.AI</module>
|
||||
<module>Mage.Player.AIMinimax</module>
|
||||
<module>Mage.Player.AI.MA</module>
|
||||
<module>Mage.Player.AIMCTS</module>
|
||||
<module>Mage.Player.AI.DraftBot</module>
|
||||
<module>Mage.Player.Human</module>
|
||||
<module>Mage.Tournament.BoosterDraft</module>
|
||||
<module>Mage.Tournament.Constructed</module>
|
||||
<module>Mage.Tournament.Sealed</module>
|
||||
</modules>
|
||||
<module>Mage.Game.TinyLeadersDuel</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
|
@ -41,13 +41,14 @@
|
|||
<!--<playerType name="Computer - minimax" jar="mage-player-aiminimax.jar" className="mage.player.ai.ComputerPlayer3"/>-->
|
||||
<playerType name="Computer - mad" jar="mage-player-ai-ma.jar" className="mage.player.ai.ComputerPlayer7"/>
|
||||
<!--<playerType name="Computer - monte carlo" jar="mage-player-aimcts.jar" className="mage.player.ai.ComputerPlayerMCTS"/>-->
|
||||
<playerType name="Computer - draftbot" jar="mage-player-ai-draft-bot.jar" className="mage.player.ai.ComputerDraftPlayer"/>
|
||||
<playerType name="Computer - draftbot" jar="mage-player-ai-draft-bot.jar" className="mage.player.ai.ComputerDraftPlayer"/>
|
||||
</playerTypes>
|
||||
<gameTypes>
|
||||
<gameType name="Two Player Duel" jar="mage-game-twoplayerduel.jar" className="mage.game.TwoPlayerMatch" typeName="mage.game.TwoPlayerDuelType"/>
|
||||
<gameType name="Free For All" jar="mage-game-freeforall.jar" className="mage.game.FreeForAllMatch" typeName="mage.game.FreeForAllType"/>
|
||||
<gameType name="Commander Two Player Duel" jar="mage-game-commanderduel.jar" className="mage.game.CommanderDuelMatch" typeName="mage.game.CommanderDuelType"/>
|
||||
<gameType name="Commander Free For All" jar="mage-game-commanderfreeforall.jar" className="mage.game.CommanderFreeForAllMatch" typeName="mage.game.CommanderFreeForAllType"/>
|
||||
<gameType name="Tiny Leaders Two Player Duel" jar="mage-game-tinyleadersduel.jar" className="mage.game.TinyLeadersDuelMatch" typeName="mage.game.TinyLeadersDuelType"/>
|
||||
</gameTypes>
|
||||
<tournamentTypes>
|
||||
<tournamentType name="Constructed Elimination" jar="mage-tournament-constructed.jar" className="mage.tournament.ConstructedEliminationTournament" typeName="mage.tournament.ConstructedEliminationTournamentType"/>
|
||||
|
@ -91,6 +92,7 @@
|
|||
<deckType name="Block Constructed - Zendikar" jar="mage-deck-constructed.jar" className="mage.deck.ZendikarBlock"/>
|
||||
<deckType name="Variant Magic - Commander" jar="mage-deck-constructed.jar" className="mage.deck.Commander"/>
|
||||
<deckType name="Variant Magic - Duel Commander" jar="mage-deck-constructed.jar" className="mage.deck.DuelCommander"/>
|
||||
<deckType name="Variant Magic - Tiny Leaders" jar="mage-deck-constructed.jar" className="mage.deck.TinyLeaders"/>
|
||||
<deckType name="Limited" jar="mage-deck-limited.jar" className="mage.deck.Limited"/>
|
||||
</deckTypes>
|
||||
</config>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-impl</artifactId>
|
||||
<version>2.1.12</version>
|
||||
<version>2.1.17</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
|
@ -133,6 +133,12 @@
|
|||
<version>${project.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>mage-game-tinyleadersduel</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -140,7 +146,7 @@
|
|||
<plugin>
|
||||
<groupId>org.jvnet.jaxb2.maven2</groupId>
|
||||
<artifactId>maven-jaxb2-plugin</artifactId>
|
||||
<version>0.7.4</version>
|
||||
<version>0.12.3</version>
|
||||
<configuration>
|
||||
<generatePackage>mage.server.util.config</generatePackage>
|
||||
<schemaDirectory>./src/main/xml-resources/jaxb/Config/</schemaDirectory>
|
||||
|
@ -157,7 +163,6 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.0.2</version>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
|
|
|
@ -924,7 +924,9 @@ public class TableController {
|
|||
}
|
||||
if (matchPlayer.getPlayer().isHuman()) {
|
||||
humanPlayers++;
|
||||
if ((table.getState().equals(TableState.WAITING) || table.getState().equals(TableState.STARTING) || table.getState().equals(TableState.READY_TO_START)) ||
|
||||
if ((table.getState().equals(TableState.WAITING) ||
|
||||
table.getState().equals(TableState.STARTING) ||
|
||||
table.getState().equals(TableState.READY_TO_START)) ||
|
||||
!match.isDoneSideboarding() ||
|
||||
(!matchPlayer.hasQuit() && match.getGame() != null && matchPlayer.getPlayer().isInGame())) {
|
||||
User user = UserManager.getInstance().getUser(userPlayerEntry.getKey());
|
||||
|
|
|
@ -395,8 +395,6 @@ public class TableManager {
|
|||
debugServerState();
|
||||
}
|
||||
logger.debug("TABLE HEALTH CHECK");
|
||||
List<UUID> toRemove = new ArrayList<>();
|
||||
|
||||
ArrayList<Table> tableCopy = new ArrayList<>();
|
||||
tableCopy.addAll(tables.values());
|
||||
for (Table table : tableCopy) {
|
||||
|
@ -406,13 +404,13 @@ public class TableManager {
|
|||
logger.debug(table.getId() + " [" + table.getName()+ "] " + formatter.format(table.getStartTime() == null ? table.getCreateTime() : table.getCreateTime()) +" (" + table.getState().toString() + ") " + (table.isTournament() ? "- Tournament":""));
|
||||
TableController tableController = getController(table.getId());
|
||||
if (tableController != null) {
|
||||
if (table.isTournament()) {
|
||||
if (!tableController.isTournamentStillValid()) {
|
||||
toRemove.add(table.getId());
|
||||
}
|
||||
} else {
|
||||
if (!tableController.isMatchTableStillValid()) {
|
||||
toRemove.add(table.getId());
|
||||
if ((table.isTournament() && !tableController.isTournamentStillValid()) ||
|
||||
(!table.isTournament() && !tableController.isMatchTableStillValid())) {
|
||||
try {
|
||||
logger.warn("Removing unhealthy tableId " + table.getId());
|
||||
removeTable(table.getId());
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -422,14 +420,6 @@ public class TableManager {
|
|||
logger.debug(Arrays.toString(ex.getStackTrace()));
|
||||
}
|
||||
}
|
||||
for (UUID tableId : toRemove) {
|
||||
try {
|
||||
logger.warn("Removing unhealthy tableId " + tableId);
|
||||
removeTable(tableId);
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
}
|
||||
}
|
||||
logger.debug("TABLE HEALTH CHECK - END");
|
||||
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class GameWorker<T> implements Callable {
|
|||
gameController.gameResult(game.getWinner());
|
||||
game.cleanUp();
|
||||
} catch (MageException ex) {
|
||||
logger.fatal("GameWorker mage error [" + game.getId() + "]" +ex, ex);
|
||||
logger.fatal("GameWorker mage error [" + game.getId() + "]" + ex, ex);
|
||||
ex.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
logger.fatal("GameWorker general exception [" + game.getId() + "]" + e.getMessage(), e);
|
||||
|
|
|
@ -41,10 +41,6 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
|
|
|
@ -48,7 +48,7 @@ public class Dissension extends ExpansionSet {
|
|||
|
||||
private Dissension() {
|
||||
super("Dissension", "DIS", "mage.sets.dissension", new GregorianCalendar(2006, 4, 5).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Ravnika";
|
||||
this.blockName = "Ravnica";
|
||||
this.parentSet = RavnicaCityOfGuilds.getInstance();
|
||||
this.hasBasicLands = false;
|
||||
this.hasBoosters = true;
|
||||
|
|
60
Mage.Sets/src/mage/sets/DragonsOfTarkir.java
Normal file
60
Mage.Sets/src/mage/sets/DragonsOfTarkir.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 DragonsOfTarkir extends ExpansionSet {
|
||||
|
||||
private static final DragonsOfTarkir fINSTANCE = new DragonsOfTarkir();
|
||||
|
||||
public static DragonsOfTarkir getInstance() {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
private DragonsOfTarkir() {
|
||||
super("Dragons of Tarkir", "DTK", "mage.sets.dragonsoftarkir", new GregorianCalendar(2015, 3, 27).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Dragons of Tarkir";
|
||||
this.hasBoosters = true;
|
||||
this.hasBasicLands = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 8;
|
||||
}
|
||||
|
||||
}
|
|
@ -48,7 +48,7 @@ public class Guildpact extends ExpansionSet {
|
|||
|
||||
private Guildpact() {
|
||||
super("Guildpact", "GPT", "mage.sets.guildpact", new GregorianCalendar(2006, 1, 3).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Ravnika";
|
||||
this.blockName = "Ravnica";
|
||||
this.parentSet = RavnicaCityOfGuilds.getInstance();
|
||||
this.hasBasicLands = false;
|
||||
this.hasBoosters = true;
|
||||
|
|
|
@ -45,8 +45,8 @@ public class RavnicaCityOfGuilds extends ExpansionSet {
|
|||
}
|
||||
|
||||
private RavnicaCityOfGuilds() {
|
||||
super("Ravnica: City of Guilds", "RAV", "mage.sets.ravnika", new GregorianCalendar(2005, 9, 24).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Ravnika";
|
||||
super("Ravnica: City of Guilds", "RAV", "mage.sets.ravnica", new GregorianCalendar(2005, 9, 24).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Ravnica";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
|
|
|
@ -34,7 +34,7 @@ import java.util.UUID;
|
|||
* @author jeffwadsworth
|
||||
|
||||
*/
|
||||
public class DimirCutpurse extends mage.sets.ravnika.DimirCutpurse {
|
||||
public class DimirCutpurse extends mage.sets.ravnica.DimirCutpurse {
|
||||
|
||||
public DimirCutpurse(UUID ownerId) {
|
||||
super(ownerId);
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.util.UUID;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class FiremaneAngel extends mage.sets.ravnika.FiremaneAngel {
|
||||
public class FiremaneAngel extends mage.sets.ravnica.FiremaneAngel {
|
||||
|
||||
public FiremaneAngel(UUID ownerId) {
|
||||
super(ownerId);
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.util.UUID;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class LightningHelix extends mage.sets.ravnika.LightningHelix {
|
||||
public class LightningHelix extends mage.sets.ravnica.LightningHelix {
|
||||
|
||||
public LightningHelix(UUID ownerId) {
|
||||
super(ownerId);
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.util.UUID;
|
|||
*
|
||||
* @author dustinconrad
|
||||
*/
|
||||
public class LoxodonHierarch extends mage.sets.ravnika.LoxodonHierarch {
|
||||
public class LoxodonHierarch extends mage.sets.ravnica.LoxodonHierarch {
|
||||
|
||||
public LoxodonHierarch(UUID ownerId) {
|
||||
super(ownerId);
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.util.UUID;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class Moroii extends mage.sets.ravnika.Moroii {
|
||||
public class Moroii extends mage.sets.ravnica.Moroii {
|
||||
|
||||
public Moroii(UUID ownerId) {
|
||||
super(ownerId);
|
||||
|
|
52
Mage.Sets/src/mage/sets/ajanivsnicolbolas/SapseepForest.java
Normal file
52
Mage.Sets/src/mage/sets/ajanivsnicolbolas/SapseepForest.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.ajanivsnicolbolas;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class SapseepForest extends mage.sets.shadowmoor.SapseepForest {
|
||||
|
||||
public SapseepForest(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 36;
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
public SapseepForest(final SapseepForest card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SapseepForest copy() {
|
||||
return new SapseepForest(this);
|
||||
}
|
||||
}
|
|
@ -33,7 +33,7 @@ import java.util.UUID;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SearingMeditation extends mage.sets.ravnika.SearingMeditation {
|
||||
public class SearingMeditation extends mage.sets.ravnica.SearingMeditation {
|
||||
|
||||
public SearingMeditation(UUID ownerId) {
|
||||
super(ownerId);
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.util.UUID;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SurveillingSprite extends mage.sets.ravnika.SurveillingSprite {
|
||||
public class SurveillingSprite extends mage.sets.ravnica.SurveillingSprite {
|
||||
|
||||
public SurveillingSprite(UUID ownerId) {
|
||||
super(ownerId);
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.util.UUID;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class VituGhaziTheCityTree extends mage.sets.ravnika.VituGhaziTheCityTree {
|
||||
public class VituGhaziTheCityTree extends mage.sets.ravnica.VituGhaziTheCityTree {
|
||||
|
||||
public VituGhaziTheCityTree(UUID ownerId) {
|
||||
super(ownerId);
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
|
@ -36,8 +36,8 @@ import mage.constants.Rarity;
|
|||
import mage.constants.Zone;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.continious.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
|
|
|
@ -32,8 +32,8 @@ import java.util.UUID;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.MageInt;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
|
|
|
@ -36,9 +36,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.MonocoloredPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -91,12 +90,11 @@ class DefilerOfSoulsEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("monocolored creature");
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("monocolored creature");
|
||||
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter.add(new MonocoloredPredicate());
|
||||
|
||||
int amount;
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.*;
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.combat.UnblockableSourceEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.CyclingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
|
|
|
@ -38,7 +38,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.condition.common.MyTurnCondition;
|
||||
import mage.abilities.condition.common.NotMyTurnCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.constants.Rarity;
|
|||
import mage.constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.alarareborn;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.SetPowerToughnessSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.constants.Rarity;
|
|||
import mage.constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
|
|
@ -63,8 +63,7 @@ public class MaelstromNexus extends CardImpl {
|
|||
|
||||
|
||||
// The first spell you cast each turn has cascade.
|
||||
this.addAbility(new MaelstromNexusTriggeredAbility());
|
||||
this.addWatcher(new FirstSpellCastThisTurnWatcher());
|
||||
this.addAbility(new MaelstromNexusTriggeredAbility(), new FirstSpellCastThisTurnWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.constants.Zone;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.FearAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.ShroudAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
|
@ -61,8 +61,7 @@ public class PredatoryAdvantage extends CardImpl {
|
|||
|
||||
|
||||
// At the beginning of each opponent's end step, if that player didn't cast a creature spell this turn, put a 2/2 green Lizard creature token onto the battlefield.
|
||||
this.addWatcher(new CastCreatureWatcher());
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new LizardToken()), TargetController.OPPONENT, new DidNotCastCreatureCondition(), false));
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new LizardToken()), TargetController.OPPONENT, new DidNotCastCreatureCondition(), false), new CastCreatureWatcher());
|
||||
}
|
||||
|
||||
public PredatoryAdvantage(final PredatoryAdvantage card) {
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.constants.Zone;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.LimitedTimesPerTurnActivatedAbility;
|
||||
import mage.abilities.costs.common.PayLifeCost;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
|
@ -32,8 +32,8 @@ import mage.abilities.common.BlocksCreatureAttachedTriggeredAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.keyword.CyclingAbility;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
|
@ -34,8 +34,8 @@ import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbil
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.abilities.effects.common.UntapTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainControlTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Rarity;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.CascadeAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -50,12 +50,9 @@ public class TimeSieve extends CardImpl {
|
|||
super(ownerId, 31, "Time Sieve", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{U}{B}");
|
||||
this.expansionSetCode = "ARB";
|
||||
|
||||
|
||||
|
||||
|
||||
// {tap}, Sacrifice five artifacts: Take an extra turn after this one.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddExtraTurnControllerEffect(), new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(5, 5, new FilterArtifactPermanent("five artifacts"), true)));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(5, 5, new FilterControlledArtifactPermanent("five artifacts"), true)));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.effects.common.AddManaAnyColorAttachedControllerEffect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.ManaEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.ShroudAbility;
|
||||
import mage.abilities.mana.TriggeredManaAbility;
|
||||
|
|
|
@ -36,8 +36,8 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.Card;
|
||||
|
@ -79,8 +79,7 @@ public class UnscytheKillerOfKings extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT)));
|
||||
|
||||
// Whenever a creature dealt damage by equipped creature this turn dies, you may exile that card. If you do, put a 2/2 black Zombie creature token onto the battlefield.
|
||||
this.addAbility(new UnscytheKillerOfKingsTriggeredAbility(new UnscytheEffect()));
|
||||
this.addWatcher(new EquippedDidDamageWatcher());
|
||||
this.addAbility(new UnscytheKillerOfKingsTriggeredAbility(new UnscytheEffect()), new EquippedDidDamageWatcher());
|
||||
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), new TargetControlledCreaturePermanent()));
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.AuraAttachedCount;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.HexproofAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.keyword.CascadeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ import java.util.UUID;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continious.BoostOpponentsEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostOpponentsEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.EnterBattlefieldPayCostOrPutGraveyardEffect;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
|
|
@ -32,7 +32,7 @@ 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.continious.BecomesBasicLandTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.abilities.effects.common.CreateTokenTargetEffect;
|
|||
import mage.abilities.effects.common.DrawCardTargetEffect;
|
||||
import mage.abilities.effects.common.GainLifeTargetEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* 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.antiquities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class CircleOfProtectionArtifacts extends mage.sets.fifthdawn.CircleOfProtectionArtifacts {
|
||||
|
||||
public CircleOfProtectionArtifacts(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 97;
|
||||
this.expansionSetCode = "ATQ";
|
||||
}
|
||||
|
||||
public CircleOfProtectionArtifacts(final CircleOfProtectionArtifacts card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CircleOfProtectionArtifacts copy() {
|
||||
return new CircleOfProtectionArtifacts(this);
|
||||
}
|
||||
}
|
|
@ -32,7 +32,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
|
|
@ -29,7 +29,7 @@ package mage.sets.antiquities;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
|
|
@ -29,7 +29,7 @@ package mage.sets.antiquities;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
|
|
@ -36,8 +36,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ColoredManaCost;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
|
|
@ -40,7 +40,7 @@ import mage.abilities.condition.common.KickedCostCondition;
|
|||
import mage.abilities.costs.common.PayLifeCost;
|
||||
import mage.abilities.effects.EntersBattlefieldEffect;
|
||||
import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.constants.*;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ColoredManaCost;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ColoredManaCost;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.mana.AnyColorManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.MageInt;
|
|||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.common.KickedCostCondition;
|
||||
import mage.abilities.effects.EntersBattlefieldEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
|
|
|
@ -35,8 +35,8 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.PutOnLibrarySourceEffect;
|
||||
import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ColoredManaCost;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ import mage.abilities.condition.common.KickedCostCondition;
|
|||
import mage.abilities.costs.common.PayLifeCost;
|
||||
import mage.abilities.effects.EntersBattlefieldEffect;
|
||||
import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Duration;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.apocalypse;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.continious.BecomesColorTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesColorTargetEffect;
|
||||
import mage.cards.SplitCard;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue