mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
52a52b950c
1343 changed files with 37569 additions and 5478 deletions
|
@ -1,4 +1,4 @@
|
||||||
NAME:Krond — Clothes in a Bag
|
NAME:Krond — Clothes in a Bag
|
||||||
1 [CHK:10] Ghostly Prison
|
1 [CHK:10] Ghostly Prison
|
||||||
2 [PC2:9] Kor Spiritdancer
|
2 [PC2:9] Kor Spiritdancer
|
||||||
4 [M13:185] Rancor
|
4 [M13:185] Rancor
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Affinity – Alex Ledo
|
NAME:Affinity – Alex Ledo
|
||||||
2 [DDF:71] Thoughtcast
|
2 [DDF:71] Thoughtcast
|
||||||
4 [HOP:110] Cranial Plating
|
4 [HOP:110] Cranial Plating
|
||||||
4 [MMA:220] Blinkmoth Nexus
|
4 [MMA:220] Blinkmoth Nexus
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Cruel Control – Jeremiah Duggan
|
NAME:Cruel Control – Jeremiah Duggan
|
||||||
1 [WWK:134] Creeping Tar Pit
|
1 [WWK:134] Creeping Tar Pit
|
||||||
1 [PLC:85] Damnation
|
1 [PLC:85] Damnation
|
||||||
1 [RTR:238] Blood Crypt
|
1 [RTR:238] Blood Crypt
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Cruel Control – Scott Lewis
|
NAME:Cruel Control – Scott Lewis
|
||||||
1 [WWK:134] Creeping Tar Pit
|
1 [WWK:134] Creeping Tar Pit
|
||||||
1 [PLC:85] Damnation
|
1 [PLC:85] Damnation
|
||||||
2 [RTR:238] Blood Crypt
|
2 [RTR:238] Blood Crypt
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Mono-Red Burn – Eric Rath
|
NAME:Mono-Red Burn – Eric Rath
|
||||||
4 [10E:237] Spark Elemental
|
4 [10E:237] Spark Elemental
|
||||||
4 [M11:149] Lightning Bolt
|
4 [M11:149] Lightning Bolt
|
||||||
4 [ZEN:211] Arid Mesa
|
4 [ZEN:211] Arid Mesa
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:RG Tron – Jacob Wilson
|
NAME:RG Tron – Jacob Wilson
|
||||||
4 [10E:302] Sylvan Scrying
|
4 [10E:302] Sylvan Scrying
|
||||||
4 [ROE:174] Ancient Stirrings
|
4 [ROE:174] Ancient Stirrings
|
||||||
4 [CMD:254] Oblivion Stone
|
4 [CMD:254] Oblivion Stone
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Soul Sisters – Chris Folk
|
NAME:Soul Sisters – Chris Folk
|
||||||
4 [LRW:281] Windbrisk Heights
|
4 [LRW:281] Windbrisk Heights
|
||||||
4 [M11:28] Serra Ascendant
|
4 [M11:28] Serra Ascendant
|
||||||
4 [SHM:23] Spectral Procession
|
4 [SHM:23] Spectral Procession
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Tribal Zoo – Billy Hahn
|
NAME:Tribal Zoo – Billy Hahn
|
||||||
1 [GTC:167] Ghor-Clan Rampager
|
1 [GTC:167] Ghor-Clan Rampager
|
||||||
4 [MMA:166] Tarmogoyf
|
4 [MMA:166] Tarmogoyf
|
||||||
4 [ZEN:220] Misty Rainforest
|
4 [ZEN:220] Misty Rainforest
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:White-Black Tokens – Jason Wrisley
|
NAME:White-Black Tokens – Jason Wrisley
|
||||||
2 [ROE:115] Inquisition of Kozilek
|
2 [ROE:115] Inquisition of Kozilek
|
||||||
3 [WWK:145] Tectonic Edge
|
3 [WWK:145] Tectonic Edge
|
||||||
4 [SHM:23] Spectral Procession
|
4 [SHM:23] Spectral Procession
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Grixis Control – Thomas Mendenhall
|
NAME:Grixis Control – Thomas Mendenhall
|
||||||
4 [ROE:115] Inquisition of Kozilek
|
4 [ROE:115] Inquisition of Kozilek
|
||||||
3 [WWK:134] Creeping Tar Pit
|
3 [WWK:134] Creeping Tar Pit
|
||||||
3 [ISD:105] Liliana of the Veil
|
3 [ISD:105] Liliana of the Veil
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:White-Blue Tron – Kirby Kaufman
|
NAME:White-Blue Tron – Kirby Kaufman
|
||||||
2 [WWK:133] Celestial Colonnade
|
2 [WWK:133] Celestial Colonnade
|
||||||
1 [RTR:35] Cyclonic Rift
|
1 [RTR:35] Cyclonic Rift
|
||||||
4 [9ED:329] Urza's Tower
|
4 [9ED:329] Urza's Tower
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Jak Gem’s Constellation Recursion
|
NAME:Jak Gem's Constellation Recursion
|
||||||
4 [RTR:243] Overgrown Tomb
|
4 [RTR:243] Overgrown Tomb
|
||||||
4 [BNG:75] Herald of Torment
|
4 [BNG:75] Herald of Torment
|
||||||
4 [RTR:248] Temple Garden
|
4 [RTR:248] Temple Garden
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Alexander Pasgaard – Jeskai
|
NAME:Alexander Pasgaard – Jeskai
|
||||||
4 [KTK:184] Mantis Rider
|
4 [KTK:184] Mantis Rider
|
||||||
1 [M15:240] Battlefield Forge
|
1 [M15:240] Battlefield Forge
|
||||||
4 [KTK:181] Jeskai Charm
|
4 [KTK:181] Jeskai Charm
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Christian Seibold – Sidisi
|
NAME:Christian Seibold – Sidisi
|
||||||
3 [KTK:239] Polluted Delta
|
3 [KTK:239] Polluted Delta
|
||||||
1 [KTK:249] Wooded Foothills
|
1 [KTK:249] Wooded Foothills
|
||||||
2 [KTK:196] Sagu Mauler
|
2 [KTK:196] Sagu Mauler
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Einar Baldvinsson – Temur Aggro
|
NAME:Einar Baldvinsson – Temur Aggro
|
||||||
4 [KTK:197] Savage Knuckleblade
|
4 [KTK:197] Savage Knuckleblade
|
||||||
4 [KTK:249] Wooded Foothills
|
4 [KTK:249] Wooded Foothills
|
||||||
3 [M15:155] Lightning Strike
|
3 [M15:155] Lightning Strike
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Giovanni Rosi – Mono-red
|
NAME:Giovanni Rosi – Mono-red
|
||||||
3 [M15:155] Lightning Strike
|
3 [M15:155] Lightning Strike
|
||||||
4 [THS:119] Dragon Mantle
|
4 [THS:119] Dragon Mantle
|
||||||
4 [M15:145] Goblin Rabblemaster
|
4 [M15:145] Goblin Rabblemaster
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Matej Zatlkaj – Jeskai
|
NAME:Matej Zatlkaj – Jeskai
|
||||||
4 [KTK:184] Mantis Rider
|
4 [KTK:184] Mantis Rider
|
||||||
3 [M15:240] Battlefield Forge
|
3 [M15:240] Battlefield Forge
|
||||||
2 [KTK:250] Plains
|
2 [KTK:250] Plains
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Matteo Cirigliano – G_B Enchantress
|
NAME:Matteo Cirigliano – G_B Enchantress
|
||||||
2 [KTK:235] Jungle Hollow
|
2 [KTK:235] Jungle Hollow
|
||||||
3 [M15:198] Satyr Wayfinder
|
3 [M15:198] Satyr Wayfinder
|
||||||
4 [JOU:165] Temple of Malady
|
4 [JOU:165] Temple of Malady
|
|
@ -1,4 +1,4 @@
|
||||||
NAME:Thiago Rodrigues – Abzan Midrange
|
NAME:Thiago Rodrigues – Abzan Midrange
|
||||||
4 [KTK:248] Windswept Heath
|
4 [KTK:248] Windswept Heath
|
||||||
2 [KTK:250] Plains
|
2 [KTK:250] Plains
|
||||||
1 [JOU:163] Mana Confluence
|
1 [JOU:163] Mana Confluence
|
|
@ -0,0 +1,35 @@
|
||||||
|
1 [DDG:64] Breath of Darigaaz
|
||||||
|
1 [DDG:63] Dragon's Claw
|
||||||
|
1 [DDG:66] Punishing Fire
|
||||||
|
2 [DDG:65] Dragon Fodder
|
||||||
|
1 [DDG:60] Shivan Hellkite
|
||||||
|
2 [DDG:62] Armillary Sphere
|
||||||
|
1 [DDG:61] Thunder Dragon
|
||||||
|
1 [DDG:48] Cinder Wall
|
||||||
|
1 [DDG:47] Bogardan Hellkite
|
||||||
|
1 [DDG:68] Captive Flame
|
||||||
|
1 [DDG:49] Skirk Prospector
|
||||||
|
1 [DDG:67] Spitting Earth
|
||||||
|
1 [DDG:69] Ghostfire
|
||||||
|
6 [DDG:81] Mountain
|
||||||
|
1 [DDG:51] Fire-Belly Changeling
|
||||||
|
1 [DDG:77] Jaws of Stone
|
||||||
|
1 [DDG:50] Bloodmark Mentor
|
||||||
|
2 [DDG:76] Fiery Fall
|
||||||
|
1 [DDG:75] Cone of Flame
|
||||||
|
1 [DDG:74] Shiv's Embrace
|
||||||
|
1 [DDG:73] Temporary Insanity
|
||||||
|
1 [DDG:55] Henge Guardian
|
||||||
|
1 [DDG:72] Claws of Valakut
|
||||||
|
2 [DDG:54] Dragon Whelp
|
||||||
|
1 [DDG:71] Seismic Strike
|
||||||
|
1 [DDG:53] Dragonspeaker Shaman
|
||||||
|
2 [DDG:52] Mudbutton Torchrunner
|
||||||
|
1 [DDG:70] Seething Song
|
||||||
|
1 [DDG:59] Kilnmouth Dragon
|
||||||
|
1 [DDG:58] Mordant Dragon
|
||||||
|
1 [DDG:57] Bogardan Rager
|
||||||
|
1 [DDG:56] Voracious Dragon
|
||||||
|
6 [DDG:79] Mountain
|
||||||
|
6 [DDG:78] Mountain
|
||||||
|
6 [DDG:80] Mountain
|
|
@ -0,0 +1,46 @@
|
||||||
|
1 [DDG:27] Reprisal
|
||||||
|
1 [DDG:28] Test of Faith
|
||||||
|
3 [DDG:40] Plains
|
||||||
|
1 [DDG:29] Heroes' Reunion
|
||||||
|
3 [DDG:42] Plains
|
||||||
|
1 [DDG:8] Silver Knight
|
||||||
|
1 [DDG:23] Harm's Way
|
||||||
|
3 [DDG:41] Plains
|
||||||
|
1 [DDG:24] Reciprocate
|
||||||
|
1 [DDG:7] Leonin Skyhunter
|
||||||
|
2 [DDG:44] Forest
|
||||||
|
1 [DDG:25] Edge of Autumn
|
||||||
|
2 [DDG:43] Forest
|
||||||
|
1 [DDG:26] Mighty Leap
|
||||||
|
1 [DDG:9] White Knight
|
||||||
|
1 [DDG:46] Forest
|
||||||
|
1 [DDG:45] Forest
|
||||||
|
1 [DDG:20] Plover Knights
|
||||||
|
1 [DDG:21] Juniper Order Ranger
|
||||||
|
2 [DDG:3] Lionheart Maverick
|
||||||
|
2 [DDG:4] Knight of Cliffhaven
|
||||||
|
1 [DDG:5] Knight of Meadowgrain
|
||||||
|
1 [DDG:6] Knight of the White Orchid
|
||||||
|
1 [DDG:1] Knight of the Reliquary
|
||||||
|
1 [DDG:2] Caravan Escort
|
||||||
|
1 [DDG:14] Knight Exemplar
|
||||||
|
1 [DDG:15] Wilt-Leaf Cavaliers
|
||||||
|
1 [DDG:38] Treetop Village
|
||||||
|
1 [DDG:12] Benalish Lancer
|
||||||
|
3 [DDG:39] Plains
|
||||||
|
1 [DDG:13] Zhalfirin Commander
|
||||||
|
1 [DDG:36] Sejiri Steppe
|
||||||
|
1 [DDG:55] Henge Guardian
|
||||||
|
1 [DDG:18] Alaborn Cavalier
|
||||||
|
2 [DDG:37] Selesnya Sanctuary
|
||||||
|
1 [DDG:19] Skyhunter Patrol
|
||||||
|
1 [DDG:34] Oblivion Ring
|
||||||
|
1 [DDG:16] Kabira Vindicator
|
||||||
|
2 [DDG:35] Grasslands
|
||||||
|
1 [DDG:17] Kinsbaile Cavalier
|
||||||
|
1 [DDG:32] Spidersilk Armor
|
||||||
|
1 [DDG:33] Griffin Guide
|
||||||
|
1 [DDG:30] Sigil Blessing
|
||||||
|
1 [DDG:31] Loxodon Warhammer
|
||||||
|
1 [DDG:10] Knotvine Paladin
|
||||||
|
1 [DDG:11] Steward of Valeron
|
|
@ -0,0 +1,37 @@
|
||||||
|
5 [DDE:70] Forest
|
||||||
|
5 [DDE:71] Forest
|
||||||
|
1 [DDE:49] Treva, the Renewer
|
||||||
|
4 [DDE:69] Mountain
|
||||||
|
1 [DDE:47] Darigaaz, the Igniter
|
||||||
|
1 [DDE:48] Rith, the Awakener
|
||||||
|
4 [DDE:67] Plains
|
||||||
|
1 [DDE:45] Charging Troll
|
||||||
|
1 [DDE:68] Island
|
||||||
|
1 [DDE:46] Gerrard Capashen
|
||||||
|
1 [DDE:65] Shivan Oasis
|
||||||
|
1 [DDE:43] Verduran Emissary
|
||||||
|
3 [DDE:66] Terramorphic Expanse
|
||||||
|
2 [DDE:44] Yavimaya Elder
|
||||||
|
1 [DDE:41] Thunderscape Battlemage
|
||||||
|
1 [DDE:63] Allied Strategies
|
||||||
|
1 [DDE:64] Elfhame Palace
|
||||||
|
2 [DDE:42] Thornscape Battlemage
|
||||||
|
1 [DDE:61] Treva's Charm
|
||||||
|
1 [DDE:40] Sunscape Battlemage
|
||||||
|
1 [DDE:62] Power Armor
|
||||||
|
1 [DDE:60] Rith's Charm
|
||||||
|
2 [DDE:38] Nomadic Elf
|
||||||
|
1 [DDE:39] Quirion Elves
|
||||||
|
2 [DDE:58] Armadillo Cloak
|
||||||
|
1 [DDE:36] Urza's Rage
|
||||||
|
2 [DDE:37] Thornscape Apprentice
|
||||||
|
1 [DDE:59] Darigaaz's Charm
|
||||||
|
1 [DDE:56] Exotic Curse
|
||||||
|
2 [DDE:57] Harrow
|
||||||
|
1 [DDE:32] Swamp
|
||||||
|
1 [DDE:54] Coalition Relic
|
||||||
|
1 [DDE:55] Narrow Escape
|
||||||
|
2 [DDE:52] Fertile Ground
|
||||||
|
1 [DDE:53] Gerrard's Command
|
||||||
|
1 [DDE:50] Evasive Action
|
||||||
|
1 [DDE:51] Tribal Flames
|
|
@ -1,6 +1,6 @@
|
||||||
woogerworks (North America/USA) :xmage.woogerworks.com:17171
|
woogerworks (North America/USA) :xmage.woogerworks.com:17171
|
||||||
XMage.info 1 (Europe/France) :176.31.186.181:17171
|
XMage.de 1 (Europe/Germany) fast :xmage.de:17171
|
||||||
XMage.info 2 (Europe/France) :176.31.186.181:17000
|
XMage.info 2 (Europe/France) slow :176.31.186.181:17000
|
||||||
IceMage (Europe/Netherlands) :ring0.cc:17171
|
IceMage (Europe/Netherlands) :ring0.cc:17171
|
||||||
Seedds Server (Asia) :115.29.203.80:17171
|
Seedds Server (Asia) :115.29.203.80:17171
|
||||||
localhost -> connect to your local server (must be started):localhost:17171
|
localhost -> connect to your local server (must be started):localhost:17171
|
||||||
|
|
|
@ -712,6 +712,8 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
||||||
String proxyPassword = prefs.get("proxyPassword", "");
|
String proxyPassword = prefs.get("proxyPassword", "");
|
||||||
int avatarId = PreferencesDialog.getSelectedAvatar();
|
int avatarId = PreferencesDialog.getSelectedAvatar();
|
||||||
boolean showAbilityPickerForced = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_ABILITY_PICKER_FORCED, "true").equals("true");
|
boolean showAbilityPickerForced = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_ABILITY_PICKER_FORCED, "true").equals("true");
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setCursor(new Cursor(Cursor.WAIT_CURSOR));
|
setCursor(new Cursor(Cursor.WAIT_CURSOR));
|
||||||
Connection connection = new Connection();
|
Connection connection = new Connection();
|
||||||
|
@ -725,6 +727,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
||||||
connection.setProxyPassword(proxyPassword);
|
connection.setProxyPassword(proxyPassword);
|
||||||
connection.setAvatarId(avatarId);
|
connection.setAvatarId(avatarId);
|
||||||
connection.setShowAbilityPickerForced(showAbilityPickerForced);
|
connection.setShowAbilityPickerForced(showAbilityPickerForced);
|
||||||
|
connection.setAllowRequestShowHandCards(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS, "true").equals("true"));
|
||||||
connection.setUserSkipPrioritySteps(PreferencesDialog.getUserSkipPrioritySteps());
|
connection.setUserSkipPrioritySteps(PreferencesDialog.getUserSkipPrioritySteps());
|
||||||
logger.debug("connecting (auto): " + proxyType + " " + proxyServer + " " + proxyPort + " " + proxyUsername);
|
logger.debug("connecting (auto): " + proxyType + " " + proxyServer + " " + proxyPort + " " + proxyUsername);
|
||||||
if (MageFrame.connect(connection)) {
|
if (MageFrame.connect(connection)) {
|
||||||
|
|
|
@ -534,4 +534,11 @@ public class Card extends MagePermanent implements MouseMotionListener, MouseLis
|
||||||
@Override
|
@Override
|
||||||
public void setChoosable(boolean isChoosable) {
|
public void setChoosable(boolean isChoosable) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setTextOffset(int yOffset) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,7 @@ public class CardArea extends JPanel {
|
||||||
private boolean reloaded = false;
|
private boolean reloaded = false;
|
||||||
private final javax.swing.JLayeredPane cardArea;
|
private final javax.swing.JLayeredPane cardArea;
|
||||||
private final javax.swing.JScrollPane scrollPane;
|
private final javax.swing.JScrollPane scrollPane;
|
||||||
|
private int yTextOffset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create the panel.
|
* Create the panel.
|
||||||
|
@ -62,6 +63,7 @@ public class CardArea extends JPanel {
|
||||||
|
|
||||||
cardArea = new JLayeredPane();
|
cardArea = new JLayeredPane();
|
||||||
scrollPane.setViewportView(cardArea);
|
scrollPane.setViewportView(cardArea);
|
||||||
|
yTextOffset = 10;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,9 +84,11 @@ public class CardArea extends JPanel {
|
||||||
this.reloaded = true;
|
this.reloaded = true;
|
||||||
cardArea.removeAll();
|
cardArea.removeAll();
|
||||||
if (showCards != null && showCards.size() < 10) {
|
if (showCards != null && showCards.size() < 10) {
|
||||||
|
yTextOffset = 10;
|
||||||
loadCardsFew(showCards, bigCard, gameId, listener);
|
loadCardsFew(showCards, bigCard, gameId, listener);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
yTextOffset = 0;
|
||||||
loadCardsMany(showCards, bigCard, gameId, listener, dimension);
|
loadCardsMany(showCards, bigCard, gameId, listener, dimension);
|
||||||
}
|
}
|
||||||
cardArea.revalidate();
|
cardArea.revalidate();
|
||||||
|
@ -96,6 +100,7 @@ public class CardArea extends JPanel {
|
||||||
public void loadCardsNarrow(CardsView showCards, BigCard bigCard, CardDimensions dimension, UUID gameId, MouseListener listener) {
|
public void loadCardsNarrow(CardsView showCards, BigCard bigCard, CardDimensions dimension, UUID gameId, MouseListener listener) {
|
||||||
this.reloaded = true;
|
this.reloaded = true;
|
||||||
cardArea.removeAll();
|
cardArea.removeAll();
|
||||||
|
yTextOffset = 0;
|
||||||
loadCardsMany(showCards, bigCard, gameId, listener, dimension);
|
loadCardsMany(showCards, bigCard, gameId, listener, dimension);
|
||||||
cardArea.revalidate();
|
cardArea.revalidate();
|
||||||
|
|
||||||
|
@ -132,6 +137,7 @@ public class CardArea extends JPanel {
|
||||||
cardArea.moveToFront(cardImg);
|
cardArea.moveToFront(cardImg);
|
||||||
cardImg.update(card);
|
cardImg.update(card);
|
||||||
cardImg.setCardBounds(rectangle.x, rectangle.y, cardDimensions.frameWidth, cardDimensions.frameHeight);
|
cardImg.setCardBounds(rectangle.x, rectangle.y, cardDimensions.frameWidth, cardDimensions.frameHeight);
|
||||||
|
cardImg.setTextOffset(yTextOffset);
|
||||||
cardImg.showCardTitle();
|
cardImg.showCardTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ import java.io.InputStreamReader;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.net.Proxy;
|
import java.net.Proxy;
|
||||||
|
import java.net.SocketTimeoutException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -331,6 +332,7 @@ public class ConnectDialog extends MageDialog {
|
||||||
int avatarId = PreferencesDialog.getSelectedAvatar();
|
int avatarId = PreferencesDialog.getSelectedAvatar();
|
||||||
connection.setAvatarId(avatarId);
|
connection.setAvatarId(avatarId);
|
||||||
boolean showAbilityPickerForced = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_ABILITY_PICKER_FORCED, "true").equals("true");
|
boolean showAbilityPickerForced = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_ABILITY_PICKER_FORCED, "true").equals("true");
|
||||||
|
connection.setAllowRequestShowHandCards(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS, "true").equals("true"));
|
||||||
connection.setShowAbilityPickerForced(showAbilityPickerForced);
|
connection.setShowAbilityPickerForced(showAbilityPickerForced);
|
||||||
connection.setUserSkipPrioritySteps(PreferencesDialog.getUserSkipPrioritySteps());
|
connection.setUserSkipPrioritySteps(PreferencesDialog.getUserSkipPrioritySteps());
|
||||||
logger.debug("connecting: " + connection.getProxyType() + " " + connection.getProxyHost() + " " + connection.getProxyPort());
|
logger.debug("connecting: " + connection.getProxyType() + " " + connection.getProxyHost() + " " + connection.getProxyPort());
|
||||||
|
@ -442,7 +444,7 @@ public class ConnectDialog extends MageDialog {
|
||||||
boolean URLNotFound = false;
|
boolean URLNotFound = false;
|
||||||
try {
|
try {
|
||||||
in = new BufferedReader(new InputStreamReader(serverListURL.openConnection(p).getInputStream()));
|
in = new BufferedReader(new InputStreamReader(serverListURL.openConnection(p).getInputStream()));
|
||||||
} catch (FileNotFoundException| UnknownHostException ex ) {
|
} catch (SocketTimeoutException |FileNotFoundException | UnknownHostException ex ) {
|
||||||
logger.warn("Could not read serverlist from: " + serverListURL.toString());
|
logger.warn("Could not read serverlist from: " + serverListURL.toString());
|
||||||
File f = new File("serverlist.txt");
|
File f = new File("serverlist.txt");
|
||||||
if (f.exists() && !f.isDirectory()) {
|
if (f.exists() && !f.isDirectory()) {
|
||||||
|
|
|
@ -1681,9 +1681,9 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
MageFrame.getSession().updatePreferencesForServer(
|
MageFrame.getSession().updatePreferencesForServer(
|
||||||
getSelectedAvatar(),
|
getSelectedAvatar(),
|
||||||
dialog.cbAllowRequestToShowHandCards.isSelected(),
|
|
||||||
dialog.showAbilityPickerForced.isSelected(),
|
dialog.showAbilityPickerForced.isSelected(),
|
||||||
|
dialog.cbAllowRequestToShowHandCards.isSelected(),
|
||||||
getUserSkipPrioritySteps());
|
getUserSkipPrioritySteps());
|
||||||
|
|
||||||
prefs.flush();
|
prefs.flush();
|
||||||
|
@ -2235,6 +2235,14 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
save(prefs, checkBox, propName, PHASE_ON, PHASE_OFF, false);
|
save(prefs, checkBox, propName, PHASE_ON, PHASE_OFF, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setPrefValue(String key, boolean value) {
|
||||||
|
switch(key) {
|
||||||
|
case KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS:
|
||||||
|
dialog.cbAllowRequestToShowHandCards.setSelected(value);
|
||||||
|
save(MageFrame.getPreferences(), dialog.cbAllowRequestToShowHandCards, KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS, "true", "false", UPDATE_CACHE_POLICY);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
private static void save(Preferences prefs, JCheckBox checkBox, String propName, String yesValue, String noValue, boolean updateCache) {
|
private static void save(Preferences prefs, JCheckBox checkBox, String propName, String yesValue, String noValue, boolean updateCache) {
|
||||||
prefs.put(propName, checkBox.isSelected() ? yesValue : noValue);
|
prefs.put(propName, checkBox.isSelected() ? yesValue : noValue);
|
||||||
if (updateCache) {
|
if (updateCache) {
|
||||||
|
|
|
@ -64,7 +64,6 @@ public class FeedbackPanel extends javax.swing.JPanel {
|
||||||
INFORM, QUESTION, CONFIRM, CANCEL, SELECT, END
|
INFORM, QUESTION, CONFIRM, CANCEL, SELECT, END
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean selected = false;
|
|
||||||
private UUID gameId;
|
private UUID gameId;
|
||||||
private Session session;
|
private Session session;
|
||||||
private FeedbackMode mode;
|
private FeedbackMode mode;
|
||||||
|
@ -96,7 +95,6 @@ public class FeedbackPanel extends javax.swing.JPanel {
|
||||||
|
|
||||||
this.lblMessage.setText(message);
|
this.lblMessage.setText(message);
|
||||||
this.helper.setMessage(message);
|
this.helper.setMessage(message);
|
||||||
this.selected = false;
|
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
switch (this.mode) {
|
switch (this.mode) {
|
||||||
case INFORM:
|
case INFORM:
|
||||||
|
@ -270,7 +268,6 @@ public class FeedbackPanel extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnRightActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRightActionPerformed
|
private void btnRightActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRightActionPerformed
|
||||||
this.selected = true;
|
|
||||||
if (connectedDialog != null) {
|
if (connectedDialog != null) {
|
||||||
connectedDialog.removeDialog();
|
connectedDialog.removeDialog();
|
||||||
connectedDialog = null;
|
connectedDialog = null;
|
||||||
|
@ -289,7 +286,6 @@ public class FeedbackPanel extends javax.swing.JPanel {
|
||||||
}//GEN-LAST:event_btnRightActionPerformed
|
}//GEN-LAST:event_btnRightActionPerformed
|
||||||
|
|
||||||
private void btnLeftActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLeftActionPerformed
|
private void btnLeftActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLeftActionPerformed
|
||||||
this.selected = true;
|
|
||||||
session.sendPlayerBoolean(gameId, true);
|
session.sendPlayerBoolean(gameId, true);
|
||||||
AudioManager.playButtonCancel();
|
AudioManager.playButtonCancel();
|
||||||
}//GEN-LAST:event_btnLeftActionPerformed
|
}//GEN-LAST:event_btnLeftActionPerformed
|
||||||
|
|
|
@ -602,8 +602,8 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
if (game.getStep() != null) {
|
if (game.getStep() != null) {
|
||||||
updatePhases(game.getStep());
|
updatePhases(game.getStep());
|
||||||
this.txtStep.setText(game.getStep().toString());
|
this.txtStep.setText(game.getStep().toString());
|
||||||
}
|
} else {
|
||||||
else {
|
logger.debug("Step is empty");
|
||||||
this.txtStep.setText("");
|
this.txtStep.setText("");
|
||||||
}
|
}
|
||||||
if (game.getSpellsCastCurrentTurn() > 0 && PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_SHOW_STORM_COUNTER, "true").equals("true")) {
|
if (game.getSpellsCastCurrentTurn() > 0 && PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_SHOW_STORM_COUNTER, "true").equals("true")) {
|
||||||
|
@ -749,18 +749,40 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
currentStep.setLocation(prevPoint);
|
currentStep.setLocation(prevPoint);
|
||||||
}
|
}
|
||||||
switch (step) {
|
switch (step) {
|
||||||
case UNTAP: updateButton("Untap"); break;
|
case UNTAP:
|
||||||
case UPKEEP: updateButton("Upkeep"); break;
|
updateButton("Untap");
|
||||||
case DRAW: updateButton("Draw"); break;
|
break;
|
||||||
case PRECOMBAT_MAIN: updateButton("Main1"); break;
|
case UPKEEP:
|
||||||
case BEGIN_COMBAT: updateButton("Combat_Start"); break;
|
updateButton("Upkeep");
|
||||||
case DECLARE_ATTACKERS: updateButton("Combat_Attack"); break;
|
break;
|
||||||
case DECLARE_BLOCKERS: updateButton("Combat_Block"); break;
|
case DRAW:
|
||||||
|
updateButton("Draw");
|
||||||
|
break;
|
||||||
|
case PRECOMBAT_MAIN:
|
||||||
|
updateButton("Main1");
|
||||||
|
break;
|
||||||
|
case BEGIN_COMBAT:
|
||||||
|
updateButton("Combat_Start");
|
||||||
|
break;
|
||||||
|
case DECLARE_ATTACKERS:
|
||||||
|
updateButton("Combat_Attack");
|
||||||
|
break;
|
||||||
|
case DECLARE_BLOCKERS:
|
||||||
|
updateButton("Combat_Block");
|
||||||
|
break;
|
||||||
case FIRST_COMBAT_DAMAGE:
|
case FIRST_COMBAT_DAMAGE:
|
||||||
case COMBAT_DAMAGE: updateButton("Combat_Damage"); break;
|
case COMBAT_DAMAGE:
|
||||||
case END_COMBAT: updateButton("Combat_End"); break;
|
updateButton("Combat_Damage");
|
||||||
case POSTCOMBAT_MAIN: updateButton("Main2"); break;
|
break;
|
||||||
case END_TURN: updateButton("Cleanup"); break;
|
case END_COMBAT:
|
||||||
|
updateButton("Combat_End");
|
||||||
|
break;
|
||||||
|
case POSTCOMBAT_MAIN:
|
||||||
|
updateButton("Main2");
|
||||||
|
break;
|
||||||
|
case END_TURN:
|
||||||
|
updateButton("Cleanup");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ import java.awt.event.MouseEvent;
|
||||||
import java.awt.event.MouseListener;
|
import java.awt.event.MouseListener;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import javax.swing.BorderFactory;
|
import javax.swing.BorderFactory;
|
||||||
import javax.swing.GroupLayout;
|
import javax.swing.GroupLayout;
|
||||||
import javax.swing.GroupLayout.Alignment;
|
import javax.swing.GroupLayout.Alignment;
|
||||||
|
@ -50,6 +51,8 @@ import javax.swing.event.ChangeListener;
|
||||||
import mage.cards.decks.importer.DeckImporterUtil;
|
import mage.cards.decks.importer.DeckImporterUtil;
|
||||||
import mage.client.MageFrame;
|
import mage.client.MageFrame;
|
||||||
import mage.client.cards.BigCard;
|
import mage.client.cards.BigCard;
|
||||||
|
import mage.client.dialog.PreferencesDialog;
|
||||||
|
import static mage.client.dialog.PreferencesDialog.KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS;
|
||||||
import mage.constants.PlayerAction;
|
import mage.constants.PlayerAction;
|
||||||
import mage.view.PlayerView;
|
import mage.view.PlayerView;
|
||||||
|
|
||||||
|
@ -68,6 +71,7 @@ public class PlayAreaPanel extends javax.swing.JPanel {
|
||||||
private final boolean playerItself;
|
private final boolean playerItself;
|
||||||
|
|
||||||
private JCheckBoxMenuItem manaPoolMenuItem;
|
private JCheckBoxMenuItem manaPoolMenuItem;
|
||||||
|
private JCheckBoxMenuItem allowViewHandCardsMenuItem;
|
||||||
|
|
||||||
public static final int PANEL_HEIGHT = 242;
|
public static final int PANEL_HEIGHT = 242;
|
||||||
public static final int PANEL_HEIGHT_SMALL = 190;
|
public static final int PANEL_HEIGHT_SMALL = 190;
|
||||||
|
@ -248,16 +252,17 @@ public class PlayAreaPanel extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
menuItem = new JCheckBoxMenuItem("Allow requests to show your hand cards", allowRequestToShowHandCards);
|
allowViewHandCardsMenuItem = new JCheckBoxMenuItem("Allow requests to show your hand cards", allowRequestToShowHandCards);
|
||||||
menuItem.setMnemonic(KeyEvent.VK_A);
|
allowViewHandCardsMenuItem.setMnemonic(KeyEvent.VK_A);
|
||||||
menuItem.setToolTipText("If activated watchers or other players can request to see your hand cards. If you grant this to a user, it's valid for the complete match.");
|
allowViewHandCardsMenuItem.setToolTipText("If activated watchers or other players can request to see your hand cards. If you grant this to a user, it's valid for the complete match.");
|
||||||
popupMenu.add(menuItem);
|
popupMenu.add(allowViewHandCardsMenuItem);
|
||||||
|
|
||||||
// Requests allowed
|
// Requests allowed
|
||||||
menuItem.addActionListener(new ActionListener() {
|
allowViewHandCardsMenuItem.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
boolean requestsAllowed = ((JCheckBoxMenuItem)e.getSource()).getState();
|
boolean requestsAllowed = ((JCheckBoxMenuItem)e.getSource()).getState();
|
||||||
|
PreferencesDialog.setPrefValue(KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS, requestsAllowed);
|
||||||
gamePanel.getSession().sendPlayerAction(requestsAllowed ? PlayerAction.PERMISSION_REQUESTS_ALLOWED_ON: PlayerAction.PERMISSION_REQUESTS_ALLOWED_OFF, gameId, null);
|
gamePanel.getSession().sendPlayerAction(requestsAllowed ? PlayerAction.PERMISSION_REQUESTS_ALLOWED_ON: PlayerAction.PERMISSION_REQUESTS_ALLOWED_OFF, gameId, null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -391,6 +396,9 @@ public class PlayAreaPanel extends javax.swing.JPanel {
|
||||||
public final void update(PlayerView player) {
|
public final void update(PlayerView player) {
|
||||||
this.playerPanel.update(player);
|
this.playerPanel.update(player);
|
||||||
this.battlefieldPanel.update(player.getBattlefield());
|
this.battlefieldPanel.update(player.getBattlefield());
|
||||||
|
if (this.allowViewHandCardsMenuItem != null) {
|
||||||
|
this.allowViewHandCardsMenuItem.setSelected(player.getUserData().allowRequestShowHandCards());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public mage.client.game.BattlefieldPanel getBattlefieldPanel() {
|
public mage.client.game.BattlefieldPanel getBattlefieldPanel() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package mage.client.util.layout;
|
package mage.client.util.layout;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.JLayeredPane;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for operations that modify cards' layout
|
* Interface for operations that modify cards' layout
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
package mage.client.util.layout.impl;
|
package mage.client.util.layout.impl;
|
||||||
|
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Rectangle;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
|
import javax.swing.JLayeredPane;
|
||||||
import mage.cards.MagePermanent;
|
import mage.cards.MagePermanent;
|
||||||
import mage.client.game.BattlefieldPanel;
|
import mage.client.game.BattlefieldPanel;
|
||||||
import mage.client.plugins.impl.Plugins;
|
import mage.client.plugins.impl.Plugins;
|
||||||
import mage.client.util.layout.CardLayoutStrategy;
|
import mage.client.util.layout.CardLayoutStrategy;
|
||||||
import mage.view.PermanentView;
|
import mage.view.PermanentView;
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.awt.*;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Card layout for client version 1.3.0 and earlier.
|
* Card layout for client version 1.3.0 and earlier.
|
||||||
*
|
*
|
||||||
|
@ -54,14 +54,14 @@ public class OldCardLayoutStrategy implements CardLayoutStrategy {
|
||||||
}
|
}
|
||||||
int position = jLayeredPane.getPosition(perm);
|
int position = jLayeredPane.getPosition(perm);
|
||||||
perm.getLinks().clear();
|
perm.getLinks().clear();
|
||||||
Rectangle r = perm.getBounds();
|
Rectangle rectangleBaseCard = perm.getBounds();
|
||||||
if (!Plugins.getInstance().isCardPluginLoaded()) {
|
if (!Plugins.getInstance().isCardPluginLoaded()) {
|
||||||
for (UUID attachmentId: permanent.getAttachments()) {
|
for (UUID attachmentId: permanent.getAttachments()) {
|
||||||
MagePermanent link = permanents.get(attachmentId);
|
MagePermanent link = permanents.get(attachmentId);
|
||||||
if (link != null) {
|
if (link != null) {
|
||||||
perm.getLinks().add(link);
|
perm.getLinks().add(link);
|
||||||
r.translate(20, 20);
|
rectangleBaseCard.translate(20, 20);
|
||||||
link.setBounds(r);
|
link.setBounds(rectangleBaseCard);
|
||||||
jLayeredPane.setPosition(link, ++position);
|
jLayeredPane.setPosition(link, ++position);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,14 +70,14 @@ public class OldCardLayoutStrategy implements CardLayoutStrategy {
|
||||||
for (UUID attachmentId: permanent.getAttachments()) {
|
for (UUID attachmentId: permanent.getAttachments()) {
|
||||||
MagePermanent link = permanents.get(attachmentId);
|
MagePermanent link = permanents.get(attachmentId);
|
||||||
if (link != null) {
|
if (link != null) {
|
||||||
link.setBounds(r);
|
link.setBounds(rectangleBaseCard);
|
||||||
perm.getLinks().add(link);
|
perm.getLinks().add(link);
|
||||||
if (index == 1) {
|
if (index == 1) {
|
||||||
r.translate(ATTACHMENTS_DX_OFFSET, ATTACHMENT_DY_OFFSET); // do it once
|
rectangleBaseCard.translate(ATTACHMENTS_DX_OFFSET, ATTACHMENT_DY_OFFSET); // do it once
|
||||||
} else {
|
} else {
|
||||||
r.translate(ATTACHMENT_DX_OFFSET, ATTACHMENT_DY_OFFSET);
|
rectangleBaseCard.translate(ATTACHMENT_DX_OFFSET, ATTACHMENT_DY_OFFSET);
|
||||||
}
|
}
|
||||||
perm.setBounds(r);
|
perm.setBounds(rectangleBaseCard);
|
||||||
jLayeredPane.moveToFront(link);
|
jLayeredPane.moveToFront(link);
|
||||||
jLayeredPane.moveToFront(perm);
|
jLayeredPane.moveToFront(perm);
|
||||||
jPanel.setComponentZOrder(link, index);
|
jPanel.setComponentZOrder(link, index);
|
||||||
|
|
|
@ -64,6 +64,7 @@ public class ConstructedFormats {
|
||||||
"Fifth Edition",
|
"Fifth Edition",
|
||||||
"Fourth Edition",
|
"Fourth Edition",
|
||||||
"Revised Edition", "Unlimited Edition", "Limited Edition Beta", "Limited Edition Alpha",
|
"Revised Edition", "Unlimited Edition", "Limited Edition Beta", "Limited Edition Alpha",
|
||||||
|
"Tempest Remastered",
|
||||||
"Vintage Masters",
|
"Vintage Masters",
|
||||||
"Conspiracy",
|
"Conspiracy",
|
||||||
"Modern Masters 2015",
|
"Modern Masters 2015",
|
||||||
|
@ -460,6 +461,9 @@ public class ConstructedFormats {
|
||||||
if (format.equals("Planechase 2012")) {
|
if (format.equals("Planechase 2012")) {
|
||||||
return Arrays.asList("PC2");
|
return Arrays.asList("PC2");
|
||||||
}
|
}
|
||||||
|
if (format.equals("Tempest Remastered")) {
|
||||||
|
return Arrays.asList("TPR");
|
||||||
|
}
|
||||||
if (format.equals("Modern Masters")) {
|
if (format.equals("Modern Masters")) {
|
||||||
return Arrays.asList("MMA");
|
return Arrays.asList("MMA");
|
||||||
}
|
}
|
||||||
|
@ -523,17 +527,17 @@ public class ConstructedFormats {
|
||||||
if (format.equals("Starter 2000")) {
|
if (format.equals("Starter 2000")) {
|
||||||
return Arrays.asList("S00");
|
return Arrays.asList("S00");
|
||||||
}
|
}
|
||||||
if (format.equals("Duel Decks: Anthology, Elves vs. Goblins")) {
|
|
||||||
return Arrays.asList("DD3");
|
|
||||||
}
|
|
||||||
if (format.equals("Duel Decks: Anthology, Jace vs. Chandra")) {
|
|
||||||
return Arrays.asList("DD3");
|
|
||||||
}
|
|
||||||
if (format.equals("Duel Decks: Anthology, Divine vs. Demonic")) {
|
if (format.equals("Duel Decks: Anthology, Divine vs. Demonic")) {
|
||||||
return Arrays.asList("DD3");
|
return Arrays.asList("DD3A");
|
||||||
|
}
|
||||||
|
if (format.equals("Duel Decks: Anthology, Elves vs. Goblins")) {
|
||||||
|
return Arrays.asList("DD3B");
|
||||||
}
|
}
|
||||||
if (format.equals("Duel Decks: Anthology, Garruk vs. Liliana")) {
|
if (format.equals("Duel Decks: Anthology, Garruk vs. Liliana")) {
|
||||||
return Arrays.asList("DD3");
|
return Arrays.asList("DD3C");
|
||||||
|
}
|
||||||
|
if (format.equals("Duel Decks: Anthology, Jace vs. Chandra")) {
|
||||||
|
return Arrays.asList("DD3D");
|
||||||
}
|
}
|
||||||
if (format.equals("Duel Decks: Elves vs. Goblins")) {
|
if (format.equals("Duel Decks: Elves vs. Goblins")) {
|
||||||
return Arrays.asList("EVG");
|
return Arrays.asList("EVG");
|
||||||
|
|
|
@ -150,6 +150,8 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
||||||
|
|
||||||
private JPanel cardArea;
|
private JPanel cardArea;
|
||||||
|
|
||||||
|
private int yTextOffset = 10;
|
||||||
|
|
||||||
public CardPanel(CardView newGameCard, UUID gameId, final boolean loadImage, ActionCallback callback, final boolean foil, Dimension dimension) {
|
public CardPanel(CardView newGameCard, UUID gameId, final boolean loadImage, ActionCallback callback, final boolean foil, Dimension dimension) {
|
||||||
this.gameCard = newGameCard;
|
this.gameCard = newGameCard;
|
||||||
this.callback = callback;
|
this.callback = callback;
|
||||||
|
@ -194,30 +196,30 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (!newGameCard.isAbility()) {
|
||||||
|
// panel to show counters on the card
|
||||||
|
counterPanel = new JPanel();
|
||||||
|
counterPanel.setLayout(null);
|
||||||
|
counterPanel.setOpaque(false);
|
||||||
|
add(counterPanel);
|
||||||
|
|
||||||
// panel to show counters on the card
|
plusCounterLabel = new JLabel("");
|
||||||
counterPanel = new JPanel();
|
plusCounterLabel.setToolTipText("+1/+1");
|
||||||
counterPanel.setLayout(null);
|
counterPanel.add(plusCounterLabel);
|
||||||
counterPanel.setOpaque(false);
|
|
||||||
add(counterPanel);
|
|
||||||
|
|
||||||
plusCounterLabel = new JLabel("");
|
minusCounterLabel = new JLabel("");
|
||||||
plusCounterLabel.setToolTipText("+1/+1");
|
minusCounterLabel.setToolTipText("-1/-1");
|
||||||
counterPanel.add(plusCounterLabel);
|
counterPanel.add(minusCounterLabel);
|
||||||
|
|
||||||
minusCounterLabel = new JLabel("");
|
loyaltyCounterLabel = new JLabel("");
|
||||||
minusCounterLabel.setToolTipText("-1/-1");
|
loyaltyCounterLabel.setToolTipText("loyalty");
|
||||||
counterPanel.add(minusCounterLabel);
|
counterPanel.add(loyaltyCounterLabel);
|
||||||
|
|
||||||
loyaltyCounterLabel = new JLabel("");
|
otherCounterLabel = new JLabel("");
|
||||||
loyaltyCounterLabel.setToolTipText("loyalty");
|
counterPanel.add(otherCounterLabel);
|
||||||
counterPanel.add(loyaltyCounterLabel);
|
|
||||||
|
|
||||||
otherCounterLabel = new JLabel("");
|
|
||||||
counterPanel.add(otherCounterLabel);
|
|
||||||
|
|
||||||
counterPanel.setVisible(false);
|
|
||||||
|
|
||||||
|
counterPanel.setVisible(false);
|
||||||
|
}
|
||||||
if (newGameCard.isAbility()) {
|
if (newGameCard.isAbility()) {
|
||||||
if (AbilityType.TRIGGERED.equals(newGameCard.getAbilityType())) {
|
if (AbilityType.TRIGGERED.equals(newGameCard.getAbilityType())) {
|
||||||
setTypeIcon(ImageManagerImpl.getInstance().getTriggeredAbilityImage(),"Triggered Ability");
|
setTypeIcon(ImageManagerImpl.getInstance().getTriggeredAbilityImage(),"Triggered Ability");
|
||||||
|
@ -381,7 +383,7 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
||||||
imagePanel.setImage(srcImage);
|
imagePanel.setImage(srcImage);
|
||||||
repaint();
|
repaint();
|
||||||
}
|
}
|
||||||
layout();
|
doLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setImage(final CardPanel panel) {
|
public void setImage(final CardPanel panel) {
|
||||||
|
@ -583,7 +585,7 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
||||||
ptText.setVisible(showText);
|
ptText.setVisible(showText);
|
||||||
|
|
||||||
int titleX = Math.round(cardWidth * (20f / 480));
|
int titleX = Math.round(cardWidth * (20f / 480));
|
||||||
int titleY = Math.round(cardHeight * (9f / 680)) + 10; // TODO: Set to 0 if it's a card selection with small card offset (ike library search)
|
int titleY = Math.round(cardHeight * (9f / 680)) + yTextOffset;
|
||||||
titleText.setBounds(cardXOffset + titleX, cardYOffset + titleY, cardWidth - titleX, cardHeight - titleY);
|
titleText.setBounds(cardXOffset + titleX, cardYOffset + titleY, cardWidth - titleX, cardHeight - titleY);
|
||||||
|
|
||||||
Dimension ptSize = ptText.getPreferredSize();
|
Dimension ptSize = ptText.getPreferredSize();
|
||||||
|
@ -841,7 +843,14 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (counterPanel != null) {
|
||||||
|
updateCounters(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
repaint();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateCounters(CardView card) {
|
||||||
if (card.getCounters() != null && !card.getCounters().isEmpty()) {
|
if (card.getCounters() != null && !card.getCounters().isEmpty()) {
|
||||||
String name = "";
|
String name = "";
|
||||||
if (lastCardWidth != cardWidth) {
|
if (lastCardWidth != cardWidth) {
|
||||||
|
@ -890,8 +899,8 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
||||||
otherCounterLabel.setVisible(true);
|
otherCounterLabel.setVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
counterPanel.setVisible(true);
|
counterPanel.setVisible(true);
|
||||||
} else {
|
} else {
|
||||||
plusCounterLabel.setVisible(false);
|
plusCounterLabel.setVisible(false);
|
||||||
|
@ -899,8 +908,8 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
||||||
loyaltyCounterLabel.setVisible(false);
|
loyaltyCounterLabel.setVisible(false);
|
||||||
otherCounterLabel.setVisible(false);
|
otherCounterLabel.setVisible(false);
|
||||||
counterPanel.setVisible(false);
|
counterPanel.setVisible(false);
|
||||||
}
|
}
|
||||||
repaint();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ImageIcon getCounterImageWithAmount(int amount, BufferedImage image, int cardWidth) {
|
private static ImageIcon getCounterImageWithAmount(int amount, BufferedImage image, int cardWidth) {
|
||||||
|
@ -1064,7 +1073,7 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return sbType.toString();
|
return sbType.toString().trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final String getText(String cardType, CardView card) {
|
protected final String getText(String cardType, CardView card) {
|
||||||
|
@ -1196,5 +1205,10 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
||||||
public void componentHidden(ComponentEvent ce) {
|
public void componentHidden(ComponentEvent ce) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setTextOffset(int yOffset) {
|
||||||
|
yTextOffset = yOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,8 @@ public class GathererSets implements Iterable<DownloadJob> {
|
||||||
"POR", "PO2", "PTK"};
|
"POR", "PO2", "PTK"};
|
||||||
|
|
||||||
private static final String[] withMythics = {"M10", "M11", "M12", "M13", "M14", "M15", "ORI",
|
private static final String[] withMythics = {"M10", "M11", "M12", "M13", "M14", "M15", "ORI",
|
||||||
"DDF", "DDG", "DDH", "DDI", "DDJ", "DDK", "DDL", "DDM", "DDN", "DD3", "DDO",
|
"DDF", "DDG", "DDH", "DDI", "DDJ", "DDK", "DDL", "DDM", "DDN",
|
||||||
|
"DD3", "DD3B", "DDO",
|
||||||
"ALA", "CON", "ARB",
|
"ALA", "CON", "ARB",
|
||||||
"ZEN", "WWK", "ROE",
|
"ZEN", "WWK", "ROE",
|
||||||
"SOM", "MBS", "NPH",
|
"SOM", "MBS", "NPH",
|
||||||
|
@ -43,7 +44,7 @@ public class GathererSets implements Iterable<DownloadJob> {
|
||||||
"RTR", "GTC", "DGM",
|
"RTR", "GTC", "DGM",
|
||||||
"MMA",
|
"MMA",
|
||||||
"THS", "BNG", "JOU",
|
"THS", "BNG", "JOU",
|
||||||
"CNS", "VMA",
|
"CNS", "VMA", "TPR",
|
||||||
"KTK", "FRF", "DTK"};
|
"KTK", "FRF", "DTK"};
|
||||||
private static final HashMap<String, String> symbolsReplacements = new HashMap<>();
|
private static final HashMap<String, String> symbolsReplacements = new HashMap<>();
|
||||||
|
|
||||||
|
@ -80,6 +81,10 @@ public class GathererSets implements Iterable<DownloadJob> {
|
||||||
symbolsReplacements.put("2ED", "2U");
|
symbolsReplacements.put("2ED", "2U");
|
||||||
symbolsReplacements.put("LEB", "2E");
|
symbolsReplacements.put("LEB", "2E");
|
||||||
symbolsReplacements.put("LEA", "1E");
|
symbolsReplacements.put("LEA", "1E");
|
||||||
|
symbolsReplacements.put("DD3A", "DD3");
|
||||||
|
symbolsReplacements.put("DD3B", "DD3");
|
||||||
|
symbolsReplacements.put("DD3C", "DD3");
|
||||||
|
symbolsReplacements.put("DD3D", "DD3");
|
||||||
}
|
}
|
||||||
|
|
||||||
public GathererSets(String path) {
|
public GathererSets(String path) {
|
||||||
|
|
|
@ -16,6 +16,7 @@ public class MagicCardsImageSource implements CardImageSource {
|
||||||
|
|
||||||
private static final Map<String, String> setNameTokenReplacement = new HashMap<String, String>() {
|
private static final Map<String, String> setNameTokenReplacement = new HashMap<String, String>() {
|
||||||
{
|
{
|
||||||
|
put("TPR", "tempest-remastered");
|
||||||
put("ORI", "magic-origins");
|
put("ORI", "magic-origins");
|
||||||
put("MMB", "modern-masters-2015");
|
put("MMB", "modern-masters-2015");
|
||||||
put("PTC", "prerelease-events");
|
put("PTC", "prerelease-events");
|
||||||
|
@ -75,10 +76,10 @@ public class MagicCardsImageSource implements CardImageSource {
|
||||||
put("M10", "magic-2010");
|
put("M10", "magic-2010");
|
||||||
put("EVG", "duel-decks-elves-vs-goblins");
|
put("EVG", "duel-decks-elves-vs-goblins");
|
||||||
put("DD2", "duel-decks-jace-vs-chandra");
|
put("DD2", "duel-decks-jace-vs-chandra");
|
||||||
put("DD3", "duel-decks-anthology-elves-vs-goblins");
|
put("DD3A", "duel-decks-anthology-divine-vs-demonic");
|
||||||
put("DD3", "duel-decks-anthology-divine-vs-demonic");
|
put("DD3B", "duel-decks-anthology-elves-vs-goblins");
|
||||||
put("DD3", "duel-decks-anthology-garruk-vs-liliana");
|
put("DD3C", "duel-decks-anthology-garruk-vs-liliana");
|
||||||
put("DD3", "duel-decks-anthology-jace-vs-chandra");
|
put("DD3D", "duel-decks-anthology-jace-vs-chandra");
|
||||||
put("DDC", "duel-decks-divine-vs-demonic");
|
put("DDC", "duel-decks-divine-vs-demonic");
|
||||||
put("DDD", "duel-decks-garruk-vs-liliana");
|
put("DDD", "duel-decks-garruk-vs-liliana");
|
||||||
put("DDE", "duel-decks-phyrexia-vs-the-coalition");
|
put("DDE", "duel-decks-phyrexia-vs-the-coalition");
|
||||||
|
|
|
@ -1,11 +1,22 @@
|
||||||
package org.mage.plugins.card.dl.sources;
|
package org.mage.plugins.card.dl.sources;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.InetSocketAddress;
|
||||||
|
import java.net.Proxy;
|
||||||
|
import java.net.URL;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.prefs.Preferences;
|
||||||
|
import mage.client.MageFrame;
|
||||||
|
import mage.remote.Connection;
|
||||||
|
import mage.remote.Connection.ProxyType;
|
||||||
import org.jsoup.Jsoup;
|
import org.jsoup.Jsoup;
|
||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
|
import org.jsoup.nodes.Element;
|
||||||
import org.jsoup.select.Elements;
|
import org.jsoup.select.Elements;
|
||||||
import org.mage.plugins.card.images.CardDownloadData;
|
import org.mage.plugins.card.images.CardDownloadData;
|
||||||
|
|
||||||
|
@ -66,7 +77,10 @@ public class WizardCardsImageSource implements CardImageSource {
|
||||||
setsAliases.put("CON", "Conflux");
|
setsAliases.put("CON", "Conflux");
|
||||||
setsAliases.put("CSP", "Coldsnap");
|
setsAliases.put("CSP", "Coldsnap");
|
||||||
setsAliases.put("DD2", "Duel Decks: Jace vs. Chandra");
|
setsAliases.put("DD2", "Duel Decks: Jace vs. Chandra");
|
||||||
setsAliases.put("DD3", "Duel Decks Anthology, Divine vs. Demonic^Duel Decks Anthology, Elves vs. Goblins^Duel Decks Anthology, Garruk vs. Liliana^Duel Decks Anthology, Jace vs. Chandra");
|
setsAliases.put("DD3A", "Duel Decks Anthology, Divine vs. Demonic");
|
||||||
|
setsAliases.put("DD3B", "Duel Decks Anthology, Elves vs. Goblins");
|
||||||
|
setsAliases.put("DD3C", "Duel Decks Anthology, Garruk vs. Liliana");
|
||||||
|
setsAliases.put("DD3D", "Duel Decks Anthology, Jace vs. Chandra");
|
||||||
setsAliases.put("DDC", "Duel Decks: Divine vs. Demonic");
|
setsAliases.put("DDC", "Duel Decks: Divine vs. Demonic");
|
||||||
setsAliases.put("DDD", "Duel Decks: Garruk vs. Liliana");
|
setsAliases.put("DDD", "Duel Decks: Garruk vs. Liliana");
|
||||||
setsAliases.put("DDE", "Duel Decks: Phyrexia vs. the Coalition");
|
setsAliases.put("DDE", "Duel Decks: Phyrexia vs. the Coalition");
|
||||||
|
@ -164,6 +178,7 @@ public class WizardCardsImageSource implements CardImageSource {
|
||||||
setsAliases.put("THS", "Theros");
|
setsAliases.put("THS", "Theros");
|
||||||
setsAliases.put("TMP", "Tempest");
|
setsAliases.put("TMP", "Tempest");
|
||||||
setsAliases.put("TOR", "Torment");
|
setsAliases.put("TOR", "Torment");
|
||||||
|
setsAliases.put("TPR", "Tempest Remastered");
|
||||||
setsAliases.put("TSB", "Time Spiral 'Timeshifted'");
|
setsAliases.put("TSB", "Time Spiral 'Timeshifted'");
|
||||||
setsAliases.put("TSP", "Time Spiral");
|
setsAliases.put("TSP", "Time Spiral");
|
||||||
setsAliases.put("UDS", "Urza's Destiny");
|
setsAliases.put("UDS", "Urza's Destiny");
|
||||||
|
@ -188,24 +203,70 @@ public class WizardCardsImageSource implements CardImageSource {
|
||||||
Map<String, String> setLinks = new HashMap<>();
|
Map<String, String> setLinks = new HashMap<>();
|
||||||
try {
|
try {
|
||||||
String setNames = setsAliases.get(cardSet);
|
String setNames = setsAliases.get(cardSet);
|
||||||
|
Preferences prefs = MageFrame.getPreferences();
|
||||||
|
Connection.ProxyType proxyType = Connection.ProxyType.valueByText(prefs.get("proxyType", "None"));
|
||||||
for (String setName : setNames.split("\\^")) {
|
for (String setName : setNames.split("\\^")) {
|
||||||
String URLSetName = URLEncoder.encode(setName, "UTF-8");
|
String URLSetName = URLEncoder.encode(setName, "UTF-8");
|
||||||
String urlDocument;
|
String urlDocument;
|
||||||
urlDocument = "http://gatherer.wizards.com/Pages/Search/Default.aspx?output=spoiler&method=visual&action=advanced&set=+[%22" + URLSetName + "%22]";
|
int page = 0;
|
||||||
Document doc = Jsoup.connect(urlDocument).get();
|
int firstMultiverseIdLastPage = 0;
|
||||||
Elements cardsImages = doc.select("img[src^=../../Handlers/]");
|
Pages:
|
||||||
for (int i = 0; i < cardsImages.size(); i++) {
|
while (page < 999) {
|
||||||
String cardName = normalizeName(cardsImages.get(i).attr("alt"));
|
Document doc;
|
||||||
if (cardName != null && !cardName.isEmpty()) {
|
if (proxyType.equals(ProxyType.NONE)) {
|
||||||
if (cardName.equals("Forest") || cardName.equals("Swamp") || cardName.equals("Mountain") || cardName.equals("Island") || cardName.equals("Plains")) {
|
urlDocument = "http://gatherer.wizards.com/Pages/Search/Default.aspx?page=" + page +"&output=spoiler&method=visual&action=advanced&set=+[%22" + URLSetName + "%22]";
|
||||||
int landNumber = 1;
|
doc = Jsoup.connect(urlDocument).get();
|
||||||
while (setLinks.get((cardName + landNumber).toLowerCase()) != null) {
|
} else {
|
||||||
landNumber++;
|
String proxyServer = prefs.get("proxyAddress", "");
|
||||||
}
|
int proxyPort = Integer.parseInt(prefs.get("proxyPort", "0"));
|
||||||
cardName += landNumber;
|
URL url = new URL("http://gatherer.wizards.com/Pages/Search/Default.aspx?page=" + page +"&output=spoiler&method=visual&action=advanced&set=+[%22" + URLSetName + "%22]");
|
||||||
|
Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyServer, proxyPort));
|
||||||
|
HttpURLConnection uc = (HttpURLConnection)url.openConnection(proxy);
|
||||||
|
|
||||||
|
uc.connect();
|
||||||
|
|
||||||
|
String line;
|
||||||
|
StringBuffer tmp = new StringBuffer();
|
||||||
|
BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
|
||||||
|
while ((line = in.readLine()) != null) {
|
||||||
|
tmp.append(line);
|
||||||
}
|
}
|
||||||
setLinks.put(cardName.toLowerCase(), cardsImages.get(i).attr("src").substring(5));
|
doc = Jsoup.parse(String.valueOf(tmp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Elements cardsImages = doc.select("img[src^=../../Handlers/]");
|
||||||
|
if (cardsImages.isEmpty()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < cardsImages.size(); i++) {
|
||||||
|
if (i == 0) {
|
||||||
|
Integer multiverseId = Integer.parseInt(cardsImages.get(i).attr("src").replaceAll("[^\\d]", ""));
|
||||||
|
if (multiverseId == firstMultiverseIdLastPage) {
|
||||||
|
break Pages;
|
||||||
|
}
|
||||||
|
firstMultiverseIdLastPage = multiverseId;
|
||||||
|
}
|
||||||
|
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")) {
|
||||||
|
Integer multiverseId = Integer.parseInt(cardsImages.get(i).attr("src").replaceAll("[^\\d]", ""));
|
||||||
|
String urlLandDocument = "http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=" + multiverseId;
|
||||||
|
Document landDoc = Jsoup.connect(urlLandDocument).get();
|
||||||
|
Elements variations = landDoc.select("a.variationlink");
|
||||||
|
int landNumber = 1;
|
||||||
|
for (Element variation : variations) {
|
||||||
|
Integer landMultiverseId = Integer.parseInt(variation.attr("onclick").replaceAll("[^\\d]", ""));
|
||||||
|
// ""
|
||||||
|
setLinks.put((cardName + landNumber).toLowerCase(), "/Handlers/Image.ashx?multiverseid=" +landMultiverseId + "&type=card");
|
||||||
|
landNumber++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setLinks.put(cardName.toLowerCase(), cardsImages.get(i).attr("src").substring(5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
page++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
|
#Generate|TOK:TPR|Goblin|
|
||||||
|
#Generate|TOK:TPR|Pegasus|
|
||||||
|
#Generate|TOK:TPR|Rat|
|
||||||
|
#Generate|TOK:TPR|Reflection|
|
||||||
|
#Generate|TOK:TPR|Saproling|
|
||||||
|
#Generate|TOK:TPR|Sliver|
|
||||||
|
#Generate|TOK:TPR|Spike|
|
||||||
|
#Generate|TOK:TPR|Spirit|
|
||||||
|
#Generate|TOK:TPR|Thopter|
|
||||||
|
#Generate|TOK:TPR|Zombie|
|
||||||
|
|
||||||
#|Generate|TOK:ORI|Zombie|
|
#|Generate|TOK:ORI|Zombie|
|
||||||
|
|
||||||
#|Generate|TOK:PTC|Angel|
|
#|Generate|TOK:PTC|Angel|
|
||||||
|
|
|
@ -66,4 +66,4 @@ dde=pvc
|
||||||
# Remove setname as soon as the images can be downloaded
|
# Remove setname as soon as the images can be downloaded
|
||||||
ignore.urls=TOK,MMB,ORI
|
ignore.urls=TOK,MMB,ORI
|
||||||
# sets ordered by release time (newest goes first)
|
# sets ordered by release time (newest goes first)
|
||||||
token.lookup.order=MPRP,DD3,DDO,ORI,MMB,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC
|
token.lookup.order=TPR,MPRP,DD3,DDO,ORI,MMB,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC
|
|
@ -17,6 +17,8 @@ public abstract class MageCard extends JPanel {
|
||||||
public abstract void setAlpha(float transparency);
|
public abstract void setAlpha(float transparency);
|
||||||
public abstract float getAlpha();
|
public abstract float getAlpha();
|
||||||
public abstract CardView getOriginal();
|
public abstract CardView getOriginal();
|
||||||
|
// sets the vertical text offset for the card name on the image
|
||||||
|
public abstract void setTextOffset(int yOffset);
|
||||||
public abstract void setCardBounds(int x, int y, int width, int height);
|
public abstract void setCardBounds(int x, int y, int width, int height);
|
||||||
public abstract void update(CardView card);
|
public abstract void update(CardView card);
|
||||||
public abstract void updateImage();
|
public abstract void updateImage();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package mage.utils;
|
package mage.utils;
|
||||||
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.MagePermanent;
|
import mage.cards.MagePermanent;
|
||||||
|
import mage.constants.CardType;
|
||||||
import mage.view.CardView;
|
import mage.view.CardView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -44,8 +44,8 @@ public class DeckBuilder {
|
||||||
deckSize = deckCardSize;
|
deckSize = deckCardSize;
|
||||||
deck = new Deck();
|
deck = new Deck();
|
||||||
|
|
||||||
final Collection<MageScoredCard> remainingCards = new ArrayList<MageScoredCard>();
|
final Collection<MageScoredCard> remainingCards = new ArrayList<>();
|
||||||
Set<String> names = new HashSet<String>();
|
Set<String> names = new HashSet<>();
|
||||||
for (final Card card : spellCardPool) {
|
for (final Card card : spellCardPool) {
|
||||||
if (names.contains(card.getName())) {
|
if (names.contains(card.getName())) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -155,7 +155,7 @@ public class DeckBuilder {
|
||||||
private static void addLandsToDeck(List<ColoredManaSymbol> allowedColors, List<String> setsToUse, List<Card> landCardPool, RateCallback callback) {
|
private static void addLandsToDeck(List<ColoredManaSymbol> allowedColors, List<String> setsToUse, List<Card> landCardPool, RateCallback callback) {
|
||||||
|
|
||||||
// Calculate statistics per color.
|
// Calculate statistics per color.
|
||||||
final Map<String, Integer> colorCount = new HashMap<String, Integer>();
|
final Map<String, Integer> colorCount = new HashMap<>();
|
||||||
for (final Card card : deck.getCards()) {
|
for (final Card card : deck.getCards()) {
|
||||||
|
|
||||||
for (String symbol : card.getManaCost().getSymbols()) {
|
for (String symbol : card.getManaCost().getSymbols()) {
|
||||||
|
@ -170,7 +170,7 @@ public class DeckBuilder {
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
Integer typeCount = colorCount.get(symbol);
|
Integer typeCount = colorCount.get(symbol);
|
||||||
if (typeCount == null) {
|
if (typeCount == null) {
|
||||||
typeCount = new Integer(0);
|
typeCount = 0;
|
||||||
}
|
}
|
||||||
typeCount += 1;
|
typeCount += 1;
|
||||||
colorCount.put(symbol, typeCount);
|
colorCount.put(symbol, typeCount);
|
||||||
|
@ -180,7 +180,7 @@ public class DeckBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add suitable non basic lands to deck in order of pack.
|
// Add suitable non basic lands to deck in order of pack.
|
||||||
final Map<String, Integer> colorSource = new HashMap<String, Integer>();
|
final Map<String, Integer> colorSource = new HashMap<>();
|
||||||
for (final ColoredManaSymbol color : ColoredManaSymbol.values()) {
|
for (final ColoredManaSymbol color : ColoredManaSymbol.values()) {
|
||||||
colorSource.put(color.toString(), 0);
|
colorSource.put(color.toString(), 0);
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,7 @@ public class DeckBuilder {
|
||||||
private static class MageScoredCard {
|
private static class MageScoredCard {
|
||||||
|
|
||||||
private Card card;
|
private Card card;
|
||||||
private int score;
|
private final int score;
|
||||||
|
|
||||||
private static final int SINGLE_PENALTY[] = {0, 1, 1, 3, 6, 9};
|
private static final int SINGLE_PENALTY[] = {0, 1, 1, 3, 6, 9};
|
||||||
//private static final int DOUBLE_PENALTY[] = { 0, 0, 1, 2, 4, 6 };
|
//private static final int DOUBLE_PENALTY[] = { 0, 0, 1, 2, 4, 6 };
|
||||||
|
@ -266,10 +266,10 @@ public class DeckBuilder {
|
||||||
|
|
||||||
private int getManaCostScore(Card card, List<ColoredManaSymbol> allowedColors) {
|
private int getManaCostScore(Card card, List<ColoredManaSymbol> allowedColors) {
|
||||||
int converted = card.getManaCost().convertedManaCost();
|
int converted = card.getManaCost().convertedManaCost();
|
||||||
final Map<String, Integer> singleCount = new HashMap<String, Integer>();
|
final Map<String, Integer> singleCount = new HashMap<>();
|
||||||
int maxSingleCount = 0;
|
int maxSingleCount = 0;
|
||||||
int multicolor = 0;
|
int multicolor = 0;
|
||||||
Set<String> colors = new HashSet<String>();
|
Set<String> colors = new HashSet<>();
|
||||||
for (String symbol : card.getManaCost().getSymbols()) {
|
for (String symbol : card.getManaCost().getSymbols()) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
symbol = symbol.replace("{", "").replace("}", "");
|
symbol = symbol.replace("{", "").replace("}", "");
|
||||||
|
@ -289,7 +289,7 @@ public class DeckBuilder {
|
||||||
}
|
}
|
||||||
Integer typeCount = singleCount.get(symbol);
|
Integer typeCount = singleCount.get(symbol);
|
||||||
if (typeCount == null) {
|
if (typeCount == null) {
|
||||||
typeCount = new Integer(0);
|
typeCount = 0;
|
||||||
}
|
}
|
||||||
typeCount += 1;
|
typeCount += 1;
|
||||||
singleCount.put(symbol, typeCount);
|
singleCount.put(symbol, typeCount);
|
||||||
|
|
|
@ -280,7 +280,7 @@ public class CardView extends SimpleCardView {
|
||||||
Spell spell = (Spell) card;
|
Spell spell = (Spell) card;
|
||||||
for (SpellAbility spellAbility: spell.getSpellAbilities()) {
|
for (SpellAbility spellAbility: spell.getSpellAbilities()) {
|
||||||
for(UUID modeId : spellAbility.getModes().getSelectedModes()) {
|
for(UUID modeId : spellAbility.getModes().getSelectedModes()) {
|
||||||
spellAbility.getModes().setMode(spellAbility.getModes().get(modeId));
|
spellAbility.getModes().setActiveMode(modeId);
|
||||||
if (spellAbility.getTargets().size() > 0) {
|
if (spellAbility.getTargets().size() > 0) {
|
||||||
setTargets(spellAbility.getTargets());
|
setTargets(spellAbility.getTargets());
|
||||||
}
|
}
|
||||||
|
@ -290,7 +290,7 @@ public class CardView extends SimpleCardView {
|
||||||
if (spell.getSpellAbility().isModal()) {
|
if (spell.getSpellAbility().isModal()) {
|
||||||
Modes modes = spell.getSpellAbility().getModes();
|
Modes modes = spell.getSpellAbility().getModes();
|
||||||
for(UUID modeId : modes.getSelectedModes()) {
|
for(UUID modeId : modes.getSelectedModes()) {
|
||||||
modes.setMode(modes.get(modeId));
|
modes.setActiveMode(modeId);
|
||||||
this.rules.add("<span color='green'><i>Chosen mode: " + spell.getSpellAbility().getEffects().getText(modes.get(modeId))+"</i></span>");
|
this.rules.add("<span color='green'><i>Chosen mode: " + spell.getSpellAbility().getEffects().getText(modes.get(modeId))+"</i></span>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,27 +68,34 @@ public class CardsView extends LinkedHashMap<UUID, CardView> {
|
||||||
for ( Ability ability : abilities ) {
|
for ( Ability ability : abilities ) {
|
||||||
MageObject sourceObject = null;
|
MageObject sourceObject = null;
|
||||||
AbilityView abilityView = null;
|
AbilityView abilityView = null;
|
||||||
|
boolean isCard = false;
|
||||||
|
boolean isPermanent = false;
|
||||||
switch ( ability.getZone() ) {
|
switch ( ability.getZone() ) {
|
||||||
case ALL:
|
case ALL:
|
||||||
case EXILED:
|
case EXILED:
|
||||||
case GRAVEYARD:
|
case GRAVEYARD:
|
||||||
sourceObject = game.getCard(ability.getSourceId());
|
sourceObject = game.getCard(ability.getSourceId());
|
||||||
|
isCard = true;
|
||||||
break;
|
break;
|
||||||
case BATTLEFIELD:
|
case BATTLEFIELD:
|
||||||
sourceObject = game.getPermanent(ability.getSourceId());
|
sourceObject = game.getPermanent(ability.getSourceId());
|
||||||
if (sourceObject == null) {
|
if (sourceObject == null) {
|
||||||
sourceObject = (Permanent)game.getLastKnownInformation(ability.getSourceId(), Zone.BATTLEFIELD);
|
sourceObject = (Permanent)game.getLastKnownInformation(ability.getSourceId(), Zone.BATTLEFIELD);
|
||||||
}
|
}
|
||||||
|
isPermanent = true;
|
||||||
break;
|
break;
|
||||||
case STACK:
|
case STACK:
|
||||||
sourceObject = game.getObject(ability.getSourceId());
|
sourceObject = game.getObject(ability.getSourceId());
|
||||||
|
if (sourceObject instanceof Card) {
|
||||||
|
isCard = true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case COMMAND:
|
case COMMAND:
|
||||||
sourceObject = game.getObject(ability.getSourceId());
|
sourceObject = game.getObject(ability.getSourceId());
|
||||||
if (sourceObject instanceof Emblem) {
|
if (sourceObject instanceof Emblem) {
|
||||||
Card planeswalkerCard = game.getCard(((Emblem)sourceObject).getSourceId());
|
Card planeswalkerCard = game.getCard(((Emblem)sourceObject).getSourceId());
|
||||||
if (planeswalkerCard != null) {
|
if (planeswalkerCard != null) {
|
||||||
abilityView = new AbilityView(ability, "Emblem " + planeswalkerCard.getName(), new CardView(sourceObject));
|
abilityView = new AbilityView(ability, "Emblem " + planeswalkerCard.getName(), new CardView(new EmblemView((Emblem)sourceObject, planeswalkerCard)));
|
||||||
abilityView.setName("Emblem " + planeswalkerCard.getName());
|
abilityView.setName("Emblem " + planeswalkerCard.getName());
|
||||||
abilityView.setExpansionSetCode(planeswalkerCard.getExpansionSetCode());
|
abilityView.setExpansionSetCode(planeswalkerCard.getExpansionSetCode());
|
||||||
} else {
|
} else {
|
||||||
|
@ -99,7 +106,15 @@ public class CardsView extends LinkedHashMap<UUID, CardView> {
|
||||||
}
|
}
|
||||||
if (sourceObject != null) {
|
if (sourceObject != null) {
|
||||||
if (abilityView == null) {
|
if (abilityView == null) {
|
||||||
abilityView = new AbilityView(ability, sourceObject.getLogName(), new CardView(sourceObject));
|
CardView sourceCardView;
|
||||||
|
if (isPermanent) {
|
||||||
|
sourceCardView = new CardView((Permanent)sourceObject);
|
||||||
|
} else if (isCard) {
|
||||||
|
sourceCardView = new CardView((Card)sourceObject);
|
||||||
|
} else {
|
||||||
|
sourceCardView = new CardView(sourceObject);
|
||||||
|
}
|
||||||
|
abilityView = new AbilityView(ability, sourceObject.getLogName(), sourceCardView);
|
||||||
}
|
}
|
||||||
if (ability.getTargets().size() > 0) {
|
if (ability.getTargets().size() > 0) {
|
||||||
abilityView.setTargets(ability.getTargets());
|
abilityView.setTargets(ability.getTargets());
|
||||||
|
|
|
@ -95,7 +95,7 @@ public class GameView implements Serializable {
|
||||||
}
|
}
|
||||||
for (StackObject stackObject: state.getStack()) {
|
for (StackObject stackObject: state.getStack()) {
|
||||||
if (stackObject instanceof StackAbility) {
|
if (stackObject instanceof StackAbility) {
|
||||||
// Stack Ability
|
// Stack Ability
|
||||||
MageObject object = game.getObject(stackObject.getSourceId());
|
MageObject object = game.getObject(stackObject.getSourceId());
|
||||||
Card card = game.getCard(stackObject.getSourceId());
|
Card card = game.getCard(stackObject.getSourceId());
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class StackAbilityView extends CardView {
|
||||||
private void updateTargets(Game game, StackAbility ability) {
|
private void updateTargets(Game game, StackAbility ability) {
|
||||||
List<String> names = new ArrayList<>();
|
List<String> names = new ArrayList<>();
|
||||||
for(UUID modeId : ability.getModes().getSelectedModes()) {
|
for(UUID modeId : ability.getModes().getSelectedModes()) {
|
||||||
ability.getModes().setMode(ability.getModes().get(modeId));
|
ability.getModes().setActiveMode(modeId);
|
||||||
if (ability.getTargets().size() > 0) {
|
if (ability.getTargets().size() > 0) {
|
||||||
setTargets(ability.getTargets());
|
setTargets(ability.getTargets());
|
||||||
} else {
|
} else {
|
||||||
|
@ -129,7 +129,7 @@ public class StackAbilityView extends CardView {
|
||||||
if (ability.isModal()) {
|
if (ability.isModal()) {
|
||||||
Modes modes = ability.getModes();
|
Modes modes = ability.getModes();
|
||||||
for(UUID modeId : modes.getSelectedModes()) {
|
for(UUID modeId : modes.getSelectedModes()) {
|
||||||
modes.setMode(modes.get(modeId));
|
modes.setActiveMode(modeId);
|
||||||
this.rules.add("<span color='green'><i>Chosen mode: " + ability.getEffects().getText(modes.get(modeId))+"</i></span>");
|
this.rules.add("<span color='green'><i>Chosen mode: " + ability.getEffects().getText(modes.get(modeId))+"</i></span>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,9 @@ public class UserDataView implements Serializable {
|
||||||
public UserDataView(UserData userData) {
|
public UserDataView(UserData userData) {
|
||||||
this.avatarId = userData.getAvatarId();
|
this.avatarId = userData.getAvatarId();
|
||||||
this.userGroup = userData.getGroupId();
|
this.userGroup = userData.getGroupId();
|
||||||
|
this.allowRequestShowHandCards = userData.isAllowRequestShowHandCards();
|
||||||
|
this.showAbilityPickerForced = userData.isShowAbilityPickerForced();
|
||||||
|
this.userSkipPrioritySteps = userData.getUserSkipPrioritySteps();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAvatarId() {
|
public int getAvatarId() {
|
||||||
|
|
|
@ -347,7 +347,10 @@ public class SimulatedPlayer2 extends ComputerPlayer {
|
||||||
}
|
}
|
||||||
for (int j = 0; j < attackersList.size(); j++) {
|
for (int j = 0; j < attackersList.size(); j++) {
|
||||||
if (binary.charAt(j) == '1') {
|
if (binary.charAt(j) == '1') {
|
||||||
sim.getCombat().declareAttacker(attackersList.get(j).getId(), defenderId, sim);
|
setStoredBookmark(sim.bookmarkState()); // makes it possible to UNDO a declared attacker with costs from e.g. Propaganda
|
||||||
|
if(!sim.getCombat().declareAttacker(attackersList.get(j).getId(), defenderId, playerId, sim)) {
|
||||||
|
sim.undo(playerId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (engagements.put(sim.getCombat().getValue().hashCode(), sim.getCombat()) != null) {
|
if (engagements.put(sim.getCombat().getValue().hashCode(), sim.getCombat()) != null) {
|
||||||
|
|
|
@ -28,25 +28,84 @@
|
||||||
|
|
||||||
package mage.player.ai;
|
package mage.player.ai;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.Random;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
import java.util.UUID;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.Mana;
|
import mage.Mana;
|
||||||
import mage.abilities.*;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.ActivatedAbility;
|
||||||
|
import mage.abilities.Mode;
|
||||||
|
import mage.abilities.Modes;
|
||||||
|
import mage.abilities.SpellAbility;
|
||||||
|
import mage.abilities.TriggeredAbility;
|
||||||
import mage.abilities.costs.VariableCost;
|
import mage.abilities.costs.VariableCost;
|
||||||
import mage.abilities.costs.mana.*;
|
import mage.abilities.costs.mana.ColoredManaCost;
|
||||||
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.costs.mana.HybridManaCost;
|
||||||
|
import mage.abilities.costs.mana.ManaCost;
|
||||||
|
import mage.abilities.costs.mana.ManaCosts;
|
||||||
|
import mage.abilities.costs.mana.MonoHybridManaCost;
|
||||||
|
import mage.abilities.costs.mana.PhyrexianManaCost;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
|
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
|
||||||
import mage.abilities.keyword.*;
|
import mage.abilities.keyword.DoubleStrikeAbility;
|
||||||
|
import mage.abilities.keyword.EquipAbility;
|
||||||
|
import mage.abilities.keyword.FirstStrikeAbility;
|
||||||
|
import mage.abilities.keyword.FlashAbility;
|
||||||
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
import mage.abilities.mana.ManaAbility;
|
import mage.abilities.mana.ManaAbility;
|
||||||
import mage.abilities.mana.ManaOptions;
|
import mage.abilities.mana.ManaOptions;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.Cards;
|
import mage.cards.Cards;
|
||||||
import mage.cards.decks.Deck;
|
import mage.cards.decks.Deck;
|
||||||
import mage.cards.repository.*;
|
import mage.cards.repository.CardCriteria;
|
||||||
|
import mage.cards.repository.CardInfo;
|
||||||
|
import mage.cards.repository.CardRepository;
|
||||||
|
import mage.cards.repository.ExpansionInfo;
|
||||||
|
import mage.cards.repository.ExpansionRepository;
|
||||||
import mage.choices.Choice;
|
import mage.choices.Choice;
|
||||||
import mage.constants.*;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.ColoredManaSymbol;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import static mage.constants.PhaseStep.DECLARE_ATTACKERS;
|
||||||
|
import static mage.constants.PhaseStep.DECLARE_BLOCKERS;
|
||||||
|
import static mage.constants.PhaseStep.DRAW;
|
||||||
|
import static mage.constants.PhaseStep.END_COMBAT;
|
||||||
|
import static mage.constants.PhaseStep.POSTCOMBAT_MAIN;
|
||||||
|
import static mage.constants.PhaseStep.PRECOMBAT_MAIN;
|
||||||
|
import static mage.constants.PhaseStep.UPKEEP;
|
||||||
|
import mage.constants.RangeOfInfluence;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import static mage.constants.SpellAbilityType.SPLIT;
|
||||||
|
import static mage.constants.SpellAbilityType.SPLIT_FUSED;
|
||||||
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.*;
|
import mage.filter.common.FilterCreatureForCombatBlock;
|
||||||
|
import mage.filter.common.FilterCreatureOrPlayer;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.common.FilterLandCard;
|
||||||
|
import mage.filter.common.FilterNonlandCard;
|
||||||
|
import mage.filter.common.FilterPermanentOrPlayer;
|
||||||
|
import mage.filter.common.FilterPlaneswalkerPermanent;
|
||||||
|
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.combat.CombatGroup;
|
import mage.game.combat.CombatGroup;
|
||||||
import mage.game.draft.Draft;
|
import mage.game.draft.Draft;
|
||||||
|
@ -65,20 +124,31 @@ import mage.players.Player;
|
||||||
import mage.players.PlayerImpl;
|
import mage.players.PlayerImpl;
|
||||||
import mage.players.net.UserData;
|
import mage.players.net.UserData;
|
||||||
import mage.players.net.UserGroup;
|
import mage.players.net.UserGroup;
|
||||||
import mage.target.*;
|
import mage.target.Target;
|
||||||
import mage.target.common.*;
|
import mage.target.TargetAmount;
|
||||||
|
import mage.target.TargetCard;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.TargetPlayer;
|
||||||
|
import mage.target.TargetSource;
|
||||||
|
import mage.target.TargetSpell;
|
||||||
|
import mage.target.common.TargetCardInASingleGraveyard;
|
||||||
|
import mage.target.common.TargetCardInExile;
|
||||||
|
import mage.target.common.TargetCardInGraveyard;
|
||||||
|
import mage.target.common.TargetCardInHand;
|
||||||
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
import mage.target.common.TargetCardInOpponentsGraveyard;
|
||||||
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
import mage.target.common.TargetCreatureOrPlayer;
|
||||||
|
import mage.target.common.TargetCreatureOrPlayerAmount;
|
||||||
|
import mage.target.common.TargetDefender;
|
||||||
|
import mage.target.common.TargetDiscard;
|
||||||
|
import mage.target.common.TargetPermanentOrPlayer;
|
||||||
|
import mage.target.common.TargetSpellOrPermanent;
|
||||||
import mage.util.Copier;
|
import mage.util.Copier;
|
||||||
import mage.util.TreeNode;
|
import mage.util.TreeNode;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -119,10 +189,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Set<Card> lands = hand.getCards(new FilterLandCard(), game);
|
Set<Card> lands = hand.getCards(new FilterLandCard(), game);
|
||||||
if (lands.size() < 2 || lands.size() > hand.size() - 2) {
|
return lands.size() < 2 || lands.size() > hand.size() - 2;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1975,7 +2042,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
||||||
|
|
||||||
protected void logState(Game game) {
|
protected void logState(Game game) {
|
||||||
if (log.isTraceEnabled()) {
|
if (log.isTraceEnabled()) {
|
||||||
logList("Computer player " + name + " hand: ", new ArrayList(hand.getCards(game)));
|
logList("Computer player " + name + " hand: ", new ArrayList<MageObject>(hand.getCards(game)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,10 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
||||||
}
|
}
|
||||||
for (int i = 0; i < attackersList.size(); i++) {
|
for (int i = 0; i < attackersList.size(); i++) {
|
||||||
if (binary.charAt(i) == '1') {
|
if (binary.charAt(i) == '1') {
|
||||||
game.getCombat().declareAttacker(attackersList.get(i).getId(), defenderId, game);
|
setStoredBookmark(game.bookmarkState()); // makes it possible to UNDO a declared attacker with costs from e.g. Propaganda
|
||||||
|
if (!game.getCombat().declareAttacker(attackersList.get(i).getId(), defenderId, playerId, game)) {
|
||||||
|
game.undo(playerId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
actionCount++;
|
actionCount++;
|
||||||
|
|
|
@ -177,8 +177,12 @@ public class SimulatedPlayer extends ComputerPlayer {
|
||||||
binary.insert(0, "0");
|
binary.insert(0, "0");
|
||||||
}
|
}
|
||||||
for (int j = 0; j < attackersList.size(); j++) {
|
for (int j = 0; j < attackersList.size(); j++) {
|
||||||
if (binary.charAt(j) == '1')
|
if (binary.charAt(j) == '1') {
|
||||||
sim.getCombat().declareAttacker(attackersList.get(j).getId(), defenderId, sim);
|
setStoredBookmark(sim.bookmarkState()); // makes it possible to UNDO a declared attacker with costs from e.g. Propaganda
|
||||||
|
if (!sim.getCombat().declareAttacker(attackersList.get(j).getId(), defenderId, playerId, sim)) {
|
||||||
|
sim.undo(playerId);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (engagements.put(sim.getCombat().getValue().hashCode(), sim.getCombat()) != null) {
|
if (engagements.put(sim.getCombat().getValue().hashCode(), sim.getCombat()) != null) {
|
||||||
logger.debug("simulating -- found redundant attack combination");
|
logger.debug("simulating -- found redundant attack combination");
|
||||||
|
|
|
@ -315,29 +315,18 @@ public class HumanPlayer extends PlayerImpl {
|
||||||
game.fireSelectTargetEvent(playerId, target.getMessage(), possibleTargets, required, getOptions(target, null));
|
game.fireSelectTargetEvent(playerId, target.getMessage(), possibleTargets, required, getOptions(target, null));
|
||||||
waitForResponse(game);
|
waitForResponse(game);
|
||||||
if (response.getUUID() != null) {
|
if (response.getUUID() != null) {
|
||||||
|
if (target.getTargets().contains(response.getUUID())) {
|
||||||
|
target.remove(response.getUUID());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (possibleTargets.contains(response.getUUID())) {
|
if (possibleTargets.contains(response.getUUID())) {
|
||||||
if (target instanceof TargetPermanent) {
|
if (target.canTarget(playerId, response.getUUID(), source, game)) {
|
||||||
if (((TargetPermanent)target).canTarget(playerId, response.getUUID(), source, game)) {
|
target.addTarget(response.getUUID(), source, game);
|
||||||
if (target.getTargets().contains(response.getUUID())) { // if already included remove it with
|
|
||||||
target.remove(response.getUUID());
|
|
||||||
} else {
|
|
||||||
target.addTarget(response.getUUID(), source, game);
|
|
||||||
if(target.doneChosing()){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (target.canTarget(playerId, response.getUUID(), source, game)) {
|
|
||||||
if (target.getTargets().contains(response.getUUID())) { // if already included remove it with
|
|
||||||
target.remove(response.getUUID());
|
|
||||||
} else {
|
|
||||||
target.addTarget(response.getUUID(), source, game);
|
|
||||||
}
|
|
||||||
if(target.doneChosing()){
|
if(target.doneChosing()){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // else do nothing - allow to pick another target
|
}
|
||||||
} else {
|
} else {
|
||||||
if (target.getTargets().size() >= target.getNumberOfTargets()) {
|
if (target.getTargets().size() >= target.getNumberOfTargets()) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -212,6 +212,7 @@ public class TableController {
|
||||||
logger.debug("Player " + player.getName() + " id: "+ player.getId() + " joined tableId: " + table.getId());
|
logger.debug("Player " + player.getName() + " id: "+ player.getId() + " joined tableId: " + table.getId());
|
||||||
//only inform human players and add them to sessionPlayerMap
|
//only inform human players and add them to sessionPlayerMap
|
||||||
if (seat.getPlayer().isHuman()) {
|
if (seat.getPlayer().isHuman()) {
|
||||||
|
seat.getPlayer().setUserData(user.getUserData());
|
||||||
user.addTable(player.getId(), table);
|
user.addTable(player.getId(), table);
|
||||||
user.ccJoinedTable(table.getRoomId(), table.getId(), true);
|
user.ccJoinedTable(table.getRoomId(), table.getId(), true);
|
||||||
userPlayerMap.put(userId, player.getId());
|
userPlayerMap.put(userId, player.getId());
|
||||||
|
@ -300,6 +301,7 @@ public class TableController {
|
||||||
logger.trace(player.getName() + " joined tableId: " + table.getId());
|
logger.trace(player.getName() + " joined tableId: " + table.getId());
|
||||||
//only inform human players and add them to sessionPlayerMap
|
//only inform human players and add them to sessionPlayerMap
|
||||||
if (seat.getPlayer().isHuman()) {
|
if (seat.getPlayer().isHuman()) {
|
||||||
|
seat.getPlayer().setUserData(user.getUserData());
|
||||||
if (!table.isTournamentSubTable()) {
|
if (!table.isTournamentSubTable()) {
|
||||||
user.addTable(player.getId(), table);
|
user.addTable(player.getId(), table);
|
||||||
}
|
}
|
||||||
|
@ -552,14 +554,10 @@ public class TableController {
|
||||||
GameManager.getInstance().createGameSession(match.getGame(), userPlayerMap, table.getId(), choosingPlayerId);
|
GameManager.getInstance().createGameSession(match.getGame(), userPlayerMap, table.getId(), choosingPlayerId);
|
||||||
String creator = null;
|
String creator = null;
|
||||||
StringBuilder opponent = new StringBuilder();
|
StringBuilder opponent = new StringBuilder();
|
||||||
// int activePlayers = 0;
|
|
||||||
for (Entry<UUID, UUID> entry: userPlayerMap.entrySet()) { // no AI players
|
for (Entry<UUID, UUID> entry: userPlayerMap.entrySet()) { // no AI players
|
||||||
if (!match.getPlayer(entry.getValue()).hasQuit()) {
|
if (!match.getPlayer(entry.getValue()).hasQuit()) {
|
||||||
User user = UserManager.getInstance().getUser(entry.getKey());
|
User user = UserManager.getInstance().getUser(entry.getKey());
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
// activePlayers++;
|
|
||||||
Player player = match.getPlayer(entry.getValue()).getPlayer();
|
|
||||||
player.setRequestToShowHandCardsAllowed(user.getUserData().allowRequestShowHandCards());
|
|
||||||
user.ccGameStarted(match.getGame().getId(), entry.getValue());
|
user.ccGameStarted(match.getGame().getId(), entry.getValue());
|
||||||
|
|
||||||
if (creator == null) {
|
if (creator == null) {
|
||||||
|
@ -582,16 +580,12 @@ public class TableController {
|
||||||
// Append AI opponents to the log file
|
// Append AI opponents to the log file
|
||||||
for (MatchPlayer mPlayer :match.getPlayers()) {
|
for (MatchPlayer mPlayer :match.getPlayers()) {
|
||||||
if (!mPlayer.getPlayer().isHuman()) {
|
if (!mPlayer.getPlayer().isHuman()) {
|
||||||
// activePlayers++;
|
|
||||||
if (opponent.length() > 0) {
|
if (opponent.length() > 0) {
|
||||||
opponent.append(" - ");
|
opponent.append(" - ");
|
||||||
}
|
}
|
||||||
opponent.append(mPlayer.getName());
|
opponent.append(mPlayer.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if (activePlayers < 2) {
|
|
||||||
// throw new MageException("Can't start game - Less than two players active - " +activePlayers);
|
|
||||||
// }
|
|
||||||
ServerMessagesUtil.getInstance().incGamesStarted();
|
ServerMessagesUtil.getInstance().incGamesStarted();
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -331,7 +331,6 @@ public class GameController implements GameCallback {
|
||||||
if (gameSession == null) {
|
if (gameSession == null) {
|
||||||
gameSession = new GameSessionPlayer(game, userId, playerId);
|
gameSession = new GameSessionPlayer(game, userId, playerId);
|
||||||
gameSessions.put(playerId, gameSession);
|
gameSessions.put(playerId, gameSession);
|
||||||
gameSession.setUserData(user.getUserData());
|
|
||||||
joinType = "joined";
|
joinType = "joined";
|
||||||
} else {
|
} else {
|
||||||
joinType = "rejoined";
|
joinType = "rejoined";
|
||||||
|
|
|
@ -48,9 +48,9 @@ public class GameFactory {
|
||||||
private static final GameFactory INSTANCE = new GameFactory();
|
private static final GameFactory INSTANCE = new GameFactory();
|
||||||
private static final Logger logger = Logger.getLogger(GameFactory.class);
|
private static final Logger logger = Logger.getLogger(GameFactory.class);
|
||||||
|
|
||||||
private Map<String, Class<Match>> games = new HashMap<String, Class<Match>>();
|
private final Map<String, Class<Match>> games = new HashMap<>();
|
||||||
private Map<String, MatchType> gameTypes = new HashMap<String, MatchType>();
|
private final Map<String, MatchType> gameTypes = new HashMap<>();
|
||||||
private List<GameTypeView> gameTypeViews = new ArrayList<GameTypeView>();
|
private final List<GameTypeView> gameTypeViews = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
public static GameFactory getInstance() {
|
public static GameFactory getInstance() {
|
||||||
|
|
|
@ -135,19 +135,6 @@ public class GameManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void removeSession(UUID userId) {
|
|
||||||
// for (GameController controller: gameControllers.values()) {
|
|
||||||
// controller.kill(userId);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public void kill(UUID gameId, UUID userId) {
|
|
||||||
// GameController gameController = gameControllers.get(gameId);
|
|
||||||
// if (gameController != null) {
|
|
||||||
// gameController.kill(userId);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
public void cheat(UUID gameId, UUID userId, UUID playerId, DeckCardLists deckList) {
|
public void cheat(UUID gameId, UUID userId, UUID playerId, DeckCardLists deckList) {
|
||||||
GameController gameController = gameControllers.get(gameId);
|
GameController gameController = gameControllers.get(gameId);
|
||||||
if (gameController != null) {
|
if (gameController != null) {
|
||||||
|
|
|
@ -70,8 +70,6 @@ public class GameSessionPlayer extends GameSessionWatcher {
|
||||||
|
|
||||||
private static final ExecutorService callExecutor = ThreadExecutor.getInstance().getCallExecutor();
|
private static final ExecutorService callExecutor = ThreadExecutor.getInstance().getCallExecutor();
|
||||||
|
|
||||||
private UserData userData;
|
|
||||||
|
|
||||||
public GameSessionPlayer(Game game, UUID userId, UUID playerId) {
|
public GameSessionPlayer(Game game, UUID userId, UUID playerId) {
|
||||||
super(userId, game, true);
|
super(userId, game, true);
|
||||||
this.playerId = playerId;
|
this.playerId = playerId;
|
||||||
|
@ -214,7 +212,6 @@ public class GameSessionPlayer extends GameSessionWatcher {
|
||||||
@Override
|
@Override
|
||||||
public GameView getGameView() {
|
public GameView getGameView() {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
player.setUserData(this.userData);
|
|
||||||
GameView gameView = new GameView(game.getState(), game, playerId, null);
|
GameView gameView = new GameView(game.getState(), game, playerId, null);
|
||||||
gameView.setHand(new CardsView(player.getHand().getCards(game)));
|
gameView.setHand(new CardsView(player.getHand().getCards(game)));
|
||||||
if (gameView.getPriorityPlayerName().equals(player.getName())) {
|
if (gameView.getPriorityPlayerName().equals(player.getName())) {
|
||||||
|
@ -298,7 +295,4 @@ public class GameSessionPlayer extends GameSessionWatcher {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserData(UserData userData) {
|
|
||||||
this.userData = userData;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class AnthologyDivineVsDemonic extends ExpansionSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
private AnthologyDivineVsDemonic() {
|
private AnthologyDivineVsDemonic() {
|
||||||
super("Duel Decks: Anthology, Divine vs. Demonic", "DD3", "mage.sets.anthologydivinevsdemonic", new GregorianCalendar(2014, 12, 5).getTime(), SetType.DUEL_DECK);
|
super("Duel Decks: Anthology, Divine vs. Demonic", "DD3A", "mage.sets.anthologydivinevsdemonic", new GregorianCalendar(2014, 12, 5).getTime(), SetType.DUEL_DECK);
|
||||||
this.hasBasicLands = false;
|
this.hasBasicLands = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class AnthologyElvesVsGoblins extends ExpansionSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
private AnthologyElvesVsGoblins() {
|
private AnthologyElvesVsGoblins() {
|
||||||
super("Duel Decks: Anthology, Elves vs. Goblins", "DD3", "mage.sets.anthologyelvesvsgoblins", new GregorianCalendar(2014, 12, 5).getTime(), SetType.DUEL_DECK);
|
super("Duel Decks: Anthology, Elves vs. Goblins", "DD3B", "mage.sets.anthologyelvesvsgoblins", new GregorianCalendar(2014, 12, 5).getTime(), SetType.DUEL_DECK);
|
||||||
this.hasBasicLands = false;
|
this.hasBasicLands = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class AnthologyGarrukVsLiliana extends ExpansionSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
private AnthologyGarrukVsLiliana() {
|
private AnthologyGarrukVsLiliana() {
|
||||||
super("Duel Decks: Anthology, Garruk vs. Liliana", "DD3", "mage.sets.anthologygarrukvsliliana", new GregorianCalendar(2014, 12, 5).getTime(), SetType.DUEL_DECK);
|
super("Duel Decks: Anthology, Garruk vs. Liliana", "DD3C", "mage.sets.anthologygarrukvsliliana", new GregorianCalendar(2014, 12, 5).getTime(), SetType.DUEL_DECK);
|
||||||
this.hasBasicLands = false;
|
this.hasBasicLands = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class AnthologyJaceVsChandra extends ExpansionSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
private AnthologyJaceVsChandra() {
|
private AnthologyJaceVsChandra() {
|
||||||
super("Duel Decks: Anthology, Jace vs. Chandra", "DD3", "mage.sets.anthologyjacevschandra", new GregorianCalendar(2014, 12, 5).getTime(), SetType.DUEL_DECK);
|
super("Duel Decks: Anthology, Jace vs. Chandra", "DD3D", "mage.sets.anthologyjacevschandra", new GregorianCalendar(2014, 12, 5).getTime(), SetType.DUEL_DECK);
|
||||||
this.hasBasicLands = false;
|
this.hasBasicLands = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
57
Mage.Sets/src/mage/sets/TempestRemastered.java
Normal file
57
Mage.Sets/src/mage/sets/TempestRemastered.java
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
/*
|
||||||
|
* 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 TempestRemastered extends ExpansionSet {
|
||||||
|
|
||||||
|
private static final TempestRemastered fINSTANCE = new TempestRemastered();
|
||||||
|
|
||||||
|
public static TempestRemastered getInstance() {
|
||||||
|
return fINSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private TempestRemastered() {
|
||||||
|
super("Tempest Remastered", "TPR", "mage.sets.tempestremastered", new GregorianCalendar(2015, 5, 6).getTime(), SetType.REPRINT);
|
||||||
|
this.hasBasicLands = true;
|
||||||
|
this.hasBoosters = true;
|
||||||
|
this.numBoosterLands = 1;
|
||||||
|
this.numBoosterCommon = 10;
|
||||||
|
this.numBoosterUncommon = 3;
|
||||||
|
this.numBoosterRare = 1;
|
||||||
|
this.ratioBoosterMythic = 8;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,103 +1,101 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without modification, are
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
* permitted provided that the following conditions are met:
|
* permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
* conditions and the following disclaimer.
|
* conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
* 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
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
* provided with the distribution.
|
* provided with the distribution.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
* 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
|
* 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
|
* 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
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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
|
* 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
|
* 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
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The views and conclusions contained in the software and documentation are those of the
|
* 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
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package mage.sets;
|
package mage.sets;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.GregorianCalendar;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.List;
|
||||||
import java.util.List;
|
import mage.cards.ExpansionSet;
|
||||||
import mage.cards.ExpansionSet;
|
import mage.cards.repository.CardCriteria;
|
||||||
import mage.cards.repository.CardCriteria;
|
import mage.cards.repository.CardInfo;
|
||||||
import mage.cards.repository.CardInfo;
|
import mage.cards.repository.CardRepository;
|
||||||
import mage.cards.repository.CardRepository;
|
import mage.constants.Rarity;
|
||||||
import mage.constants.CardType;
|
import mage.constants.SetType;
|
||||||
import mage.constants.Rarity;
|
|
||||||
import mage.constants.SetType;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
/**
|
* @author LevelX2
|
||||||
*
|
*/
|
||||||
* @author LevelX2
|
public class VintageMasters extends ExpansionSet {
|
||||||
*/
|
|
||||||
public class VintageMasters extends ExpansionSet {
|
private static final VintageMasters fINSTANCE = new VintageMasters();
|
||||||
|
|
||||||
private static final VintageMasters fINSTANCE = new VintageMasters();
|
public static VintageMasters getInstance() {
|
||||||
|
return fINSTANCE;
|
||||||
public static VintageMasters getInstance() {
|
}
|
||||||
return fINSTANCE;
|
|
||||||
}
|
private VintageMasters() {
|
||||||
|
super("Vintage Masters", "VMA", "mage.sets.vintagemasters", new GregorianCalendar(2014, 6, 16).getTime(), SetType.REPRINT);
|
||||||
private VintageMasters() {
|
this.hasBasicLands = false;
|
||||||
super("Vintage Masters", "VMA", "mage.sets.vintagemasters", new GregorianCalendar(2014, 6, 16).getTime(), SetType.REPRINT);
|
this.hasBoosters = true;
|
||||||
this.hasBasicLands = false;
|
this.numBoosterSpecial = 1;
|
||||||
this.hasBoosters = true;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterSpecial = 1;
|
this.numBoosterCommon = 10;
|
||||||
this.numBoosterLands = 0;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterRare = 1;
|
||||||
this.numBoosterUncommon = 3;
|
this.ratioBoosterMythic = 8;
|
||||||
this.numBoosterRare = 1;
|
}
|
||||||
this.ratioBoosterMythic = 8;
|
|
||||||
}
|
@Override
|
||||||
|
public List<CardInfo> getSpecialCommon() {
|
||||||
@Override
|
CardCriteria criteria = new CardCriteria();
|
||||||
public List<CardInfo> getSpecialCommon() {
|
criteria.rarities(Rarity.COMMON).setCodes(this.code);
|
||||||
CardCriteria criteria = new CardCriteria();
|
return CardRepository.instance.findCards(criteria);
|
||||||
criteria.rarities(Rarity.COMMON).setCodes(this.code);
|
}
|
||||||
return CardRepository.instance.findCards(criteria);
|
|
||||||
}
|
@Override
|
||||||
|
public List<CardInfo> getSpecialUncommon() {
|
||||||
@Override
|
CardCriteria criteria = new CardCriteria();
|
||||||
public List<CardInfo> getSpecialUncommon() {
|
criteria.rarities(Rarity.UNCOMMON).setCodes(this.code);
|
||||||
CardCriteria criteria = new CardCriteria();
|
return CardRepository.instance.findCards(criteria);
|
||||||
criteria.rarities(Rarity.UNCOMMON).setCodes(this.code);
|
}
|
||||||
return CardRepository.instance.findCards(criteria);
|
|
||||||
}
|
@Override
|
||||||
|
public List<CardInfo> getSpecialRare() {
|
||||||
@Override
|
CardCriteria criteria = new CardCriteria();
|
||||||
public List<CardInfo> getSpecialRare() {
|
criteria.rarities(Rarity.RARE).setCodes(this.code);
|
||||||
CardCriteria criteria = new CardCriteria();
|
return CardRepository.instance.findCards(criteria);
|
||||||
criteria.rarities(Rarity.RARE).setCodes(this.code);
|
}
|
||||||
return CardRepository.instance.findCards(criteria);
|
|
||||||
}
|
@Override
|
||||||
|
public List<CardInfo> getSpecialMythic() {
|
||||||
@Override
|
CardCriteria criteria = new CardCriteria();
|
||||||
public List<CardInfo> getSpecialMythic() {
|
criteria.rarities(Rarity.MYTHIC).setCodes(this.code);
|
||||||
CardCriteria criteria = new CardCriteria();
|
return CardRepository.instance.findCards(criteria);
|
||||||
criteria.rarities(Rarity.MYTHIC).setCodes(this.code);
|
}
|
||||||
return CardRepository.instance.findCards(criteria);
|
|
||||||
}
|
@Override
|
||||||
|
public List<CardInfo> getSpecialBonus() {
|
||||||
@Override
|
CardCriteria criteria = new CardCriteria();
|
||||||
public List<CardInfo> getSpecialBonus() {
|
criteria.rarities(Rarity.BONUS).setCodes(this.code);
|
||||||
CardCriteria criteria = new CardCriteria();
|
return CardRepository.instance.findCards(criteria);
|
||||||
criteria.rarities(Rarity.BONUS).setCodes(this.code);
|
}
|
||||||
return CardRepository.instance.findCards(criteria);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -42,10 +42,8 @@ import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.Cards;
|
import mage.cards.Cards;
|
||||||
import mage.cards.CardsImpl;
|
import mage.cards.CardsImpl;
|
||||||
import mage.filter.FilterCard;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetCard;
|
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,8 +58,6 @@ public class ArchitectsOfWill extends CardImpl {
|
||||||
this.subtype.add("Human");
|
this.subtype.add("Human");
|
||||||
this.subtype.add("Wizard");
|
this.subtype.add("Wizard");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.power = new MageInt(3);
|
this.power = new MageInt(3);
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
@ -102,37 +98,22 @@ class ArchitectsOfWillEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player you = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
Player player = game.getPlayer(source.getFirstTarget());
|
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
||||||
if (player == null || you == null) {
|
if (targetPlayer == null
|
||||||
|
|| controller == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Cards cards = new CardsImpl(Zone.PICK);
|
Cards cards = new CardsImpl(Zone.LIBRARY);
|
||||||
int count = Math.min(player.getLibrary().size(), 3);
|
int count = Math.min(targetPlayer.getLibrary().size(), 3);
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
Card card = player.getLibrary().removeFromTop(game);
|
Card card = targetPlayer.getLibrary().removeFromTop(game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
cards.add(card);
|
cards.add(card);
|
||||||
game.setZone(card.getId(), Zone.PICK);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
controller.lookAtCards("Architects of Will", cards, game);
|
||||||
you.lookAtCards("Architects of Will", cards, game);
|
controller.putCardsOnTopOfLibrary(cards, game, source, true);
|
||||||
|
|
||||||
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the top of target player's library"));
|
|
||||||
while (you.isInGame() && cards.size() > 1) {
|
|
||||||
you.choose(Outcome.Neutral, cards, target, game);
|
|
||||||
Card card = cards.get(target.getFirstTarget(), game);
|
|
||||||
if (card != null) {
|
|
||||||
cards.remove(card);
|
|
||||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
|
||||||
}
|
|
||||||
target.clearChosen();
|
|
||||||
}
|
|
||||||
if (cards.size() == 1) {
|
|
||||||
Card card = cards.get(cards.iterator().next(), game);
|
|
||||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ class SlaveOfBolasEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ class ThoughtHemorrhageEffect extends OneShotEffect {
|
||||||
// search cards in graveyard
|
// search cards in graveyard
|
||||||
for (Card checkCard : targetPlayer.getGraveyard().getCards(game)) {
|
for (Card checkCard : targetPlayer.getGraveyard().getCards(game)) {
|
||||||
if (checkCard.getName().equals(cardName)) {
|
if (checkCard.getName().equals(cardName)) {
|
||||||
controller.moveCardToExileWithInfo(checkCard, null, "", source.getSourceId(), game, Zone.GRAVEYARD);
|
controller.moveCardToExileWithInfo(checkCard, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ class ThoughtHemorrhageEffect extends OneShotEffect {
|
||||||
for(UUID cardId: targetCardsHand.getTargets()) {
|
for(UUID cardId: targetCardsHand.getTargets()) {
|
||||||
Card card = game.getCard(cardId);
|
Card card = game.getCard(cardId);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.HAND);
|
controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.HAND, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ class ThoughtHemorrhageEffect extends OneShotEffect {
|
||||||
for(UUID cardId: targetCardsLibrary.getTargets()) {
|
for(UUID cardId: targetCardsLibrary.getTargets()) {
|
||||||
Card card = game.getCard(cardId);
|
Card card = game.getCard(cardId);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY);
|
controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
targetPlayer.shuffleLibrary(game);
|
targetPlayer.shuffleLibrary(game);
|
||||||
|
|
|
@ -156,7 +156,7 @@ class UnscytheEffect extends OneShotEffect {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
Card card = game.getCard(targetPointer.getFirst(game, source));
|
Card card = game.getCard(targetPointer.getFirst(game, source));
|
||||||
if (card != null && game.getState().getZone(card.getId()).equals(Zone.GRAVEYARD) && controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD)) {
|
if (card != null && game.getState().getZone(card.getId()).equals(Zone.GRAVEYARD) && controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true)) {
|
||||||
ZombieToken zombie = new ZombieToken("ALA");
|
ZombieToken zombie = new ZombieToken("ALA");
|
||||||
return zombie.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
return zombie.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||||
}
|
}
|
||||||
|
|
65
Mage.Sets/src/mage/sets/alliances/AesthirGlider.java
Normal file
65
Mage.Sets/src/mage/sets/alliances/AesthirGlider.java
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.alliances;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.CantBlockAbility;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Sir-Speshkitty
|
||||||
|
*/
|
||||||
|
public class AesthirGlider extends CardImpl {
|
||||||
|
|
||||||
|
public AesthirGlider(UUID ownerId) {
|
||||||
|
super(ownerId, 156, "Aesthir Glider", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
|
||||||
|
this.expansionSetCode = "ALL";
|
||||||
|
this.subtype.add("Bird");
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
// Aesthir Glider can't block.
|
||||||
|
this.addAbility(new CantBlockAbility());
|
||||||
|
}
|
||||||
|
|
||||||
|
public AesthirGlider(final AesthirGlider card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AesthirGlider copy() {
|
||||||
|
return new AesthirGlider(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -170,7 +170,7 @@ class ExileTopCardLibraryCost extends CostImpl {
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
card = controller.getLibrary().getFromTop(game);
|
card = controller.getLibrary().getFromTop(game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
paid = controller.moveCardToExileWithInfo(card, null, "", sourceId, game, Zone.LIBRARY);
|
paid = controller.moveCardToExileWithInfo(card, null, "", sourceId, game, Zone.LIBRARY, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return paid;
|
return paid;
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class AbyssalGatekeeper extends mage.sets.divinevsdemonic.AbyssalGatekeep
|
||||||
public AbyssalGatekeeper(UUID ownerId) {
|
public AbyssalGatekeeper(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 31;
|
this.cardNumber = 31;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AbyssalGatekeeper(final AbyssalGatekeeper card) {
|
public AbyssalGatekeeper(final AbyssalGatekeeper card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class AbyssalSpecter extends mage.sets.fifthedition.AbyssalSpecter {
|
||||||
public AbyssalSpecter(UUID ownerId) {
|
public AbyssalSpecter(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 40;
|
this.cardNumber = 40;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AbyssalSpecter(final AbyssalSpecter card) {
|
public AbyssalSpecter(final AbyssalSpecter card) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class AkromaAngelOfWrath extends mage.sets.timeshifted.AkromaAngelOfWrath
|
||||||
public AkromaAngelOfWrath(UUID ownerId) {
|
public AkromaAngelOfWrath(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 1;
|
this.cardNumber = 1;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
this.rarity = Rarity.MYTHIC;
|
this.rarity = Rarity.MYTHIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class AngelOfMercy extends mage.sets.tenth.AngelOfMercy {
|
||||||
public AngelOfMercy(UUID ownerId) {
|
public AngelOfMercy(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 9;
|
this.cardNumber = 9;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AngelOfMercy(final AngelOfMercy card) {
|
public AngelOfMercy(final AngelOfMercy card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class AngelicBenediction extends mage.sets.shardsofalara.AngelicBenedicti
|
||||||
public AngelicBenediction(UUID ownerId) {
|
public AngelicBenediction(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 19;
|
this.cardNumber = 19;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AngelicBenediction(final AngelicBenediction card) {
|
public AngelicBenediction(final AngelicBenediction card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class AngelicPage extends mage.sets.urzassaga.AngelicPage {
|
||||||
public AngelicPage(UUID ownerId) {
|
public AngelicPage(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 3;
|
this.cardNumber = 3;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AngelicPage(final AngelicPage card) {
|
public AngelicPage(final AngelicPage card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class AngelicProtector extends mage.sets.tempest.AngelicProtector {
|
||||||
public AngelicProtector(UUID ownerId) {
|
public AngelicProtector(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 6;
|
this.cardNumber = 6;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AngelicProtector(final AngelicProtector card) {
|
public AngelicProtector(final AngelicProtector card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class AngelsFeather extends mage.sets.tenth.AngelsFeather {
|
||||||
public AngelsFeather(UUID ownerId) {
|
public AngelsFeather(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 23;
|
this.cardNumber = 23;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AngelsFeather(final AngelsFeather card) {
|
public AngelsFeather(final AngelsFeather card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class Angelsong extends mage.sets.shardsofalara.Angelsong {
|
||||||
public Angelsong(UUID ownerId) {
|
public Angelsong(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 15;
|
this.cardNumber = 15;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Angelsong(final Angelsong card) {
|
public Angelsong(final Angelsong card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class BarrenMoor extends mage.sets.onslaught.BarrenMoor {
|
||||||
public BarrenMoor(UUID ownerId) {
|
public BarrenMoor(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 58;
|
this.cardNumber = 58;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public BarrenMoor(final BarrenMoor card) {
|
public BarrenMoor(final BarrenMoor card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class BarterInBlood extends mage.sets.avacynrestored.BarterInBlood {
|
||||||
public BarterInBlood(UUID ownerId) {
|
public BarterInBlood(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 52;
|
this.cardNumber = 52;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public BarterInBlood(final BarterInBlood card) {
|
public BarterInBlood(final BarterInBlood card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class BreedingPit extends mage.sets.fifthedition.BreedingPit {
|
||||||
public BreedingPit(UUID ownerId) {
|
public BreedingPit(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 53;
|
this.cardNumber = 53;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public BreedingPit(final BreedingPit card) {
|
public BreedingPit(final BreedingPit card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class CacklingImp extends mage.sets.divinevsdemonic.CacklingImp {
|
||||||
public CacklingImp(UUID ownerId) {
|
public CacklingImp(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 41;
|
this.cardNumber = 41;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public CacklingImp(final CacklingImp card) {
|
public CacklingImp(final CacklingImp card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class ChargingPaladin extends mage.sets.divinevsdemonic.ChargingPaladin {
|
||||||
public ChargingPaladin(UUID ownerId) {
|
public ChargingPaladin(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 4;
|
this.cardNumber = 4;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChargingPaladin(final ChargingPaladin card) {
|
public ChargingPaladin(final ChargingPaladin card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class ConsumeSpirit extends mage.sets.magic2010.ConsumeSpirit {
|
||||||
public ConsumeSpirit(UUID ownerId) {
|
public ConsumeSpirit(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 56;
|
this.cardNumber = 56;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConsumeSpirit(final ConsumeSpirit card) {
|
public ConsumeSpirit(final ConsumeSpirit card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class Corrupt extends mage.sets.magic2011.Corrupt {
|
||||||
public Corrupt(UUID ownerId) {
|
public Corrupt(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 55;
|
this.cardNumber = 55;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Corrupt(final Corrupt card) {
|
public Corrupt(final Corrupt card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class CruelEdict extends mage.sets.tenth.CruelEdict {
|
||||||
public CruelEdict(UUID ownerId) {
|
public CruelEdict(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 48;
|
this.cardNumber = 48;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public CruelEdict(final CruelEdict card) {
|
public CruelEdict(final CruelEdict card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class DaggerclawImp extends mage.sets.guildpact.DaggerclawImp {
|
||||||
public DaggerclawImp(UUID ownerId) {
|
public DaggerclawImp(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 33;
|
this.cardNumber = 33;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public DaggerclawImp(final DaggerclawImp card) {
|
public DaggerclawImp(final DaggerclawImp card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class DarkBanishing extends mage.sets.tempest.DarkBanishing {
|
||||||
public DarkBanishing(UUID ownerId) {
|
public DarkBanishing(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 50;
|
this.cardNumber = 50;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public DarkBanishing(final DarkBanishing card) {
|
public DarkBanishing(final DarkBanishing card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class DarkRitual extends mage.sets.planechase.DarkRitual {
|
||||||
public DarkRitual(UUID ownerId) {
|
public DarkRitual(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 45;
|
this.cardNumber = 45;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public DarkRitual(final DarkRitual card) {
|
public DarkRitual(final DarkRitual card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class DemonicTutor extends mage.sets.limitedalpha.DemonicTutor {
|
||||||
public DemonicTutor(UUID ownerId) {
|
public DemonicTutor(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 49;
|
this.cardNumber = 49;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public DemonicTutor(final DemonicTutor card) {
|
public DemonicTutor(final DemonicTutor card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class DemonsHorn extends mage.sets.tenth.DemonsHorn {
|
||||||
public DemonsHorn(UUID ownerId) {
|
public DemonsHorn(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 57;
|
this.cardNumber = 57;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public DemonsHorn(final DemonsHorn card) {
|
public DemonsHorn(final DemonsHorn card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class DemonsJester extends mage.sets.dissension.DemonsJester {
|
||||||
public DemonsJester(UUID ownerId) {
|
public DemonsJester(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 38;
|
this.cardNumber = 38;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public DemonsJester(final DemonsJester card) {
|
public DemonsJester(final DemonsJester card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class Duress extends mage.sets.magic2010.Duress {
|
||||||
public Duress(UUID ownerId) {
|
public Duress(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 46;
|
this.cardNumber = 46;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Duress(final Duress card) {
|
public Duress(final Duress card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class DuskImp extends mage.sets.tenth.DuskImp {
|
||||||
public DuskImp(UUID ownerId) {
|
public DuskImp(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 34;
|
this.cardNumber = 34;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public DuskImp(final DuskImp card) {
|
public DuskImp(final DuskImp card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class FaithsFetters extends mage.sets.divinevsdemonic.FaithsFetters {
|
||||||
public FaithsFetters(UUID ownerId) {
|
public FaithsFetters(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 20;
|
this.cardNumber = 20;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public FaithsFetters(final FaithsFetters card) {
|
public FaithsFetters(final FaithsFetters card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class FallenAngel extends mage.sets.seventhedition.FallenAngel {
|
||||||
public FallenAngel(UUID ownerId) {
|
public FallenAngel(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 42;
|
this.cardNumber = 42;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public FallenAngel(final FallenAngel card) {
|
public FallenAngel(final FallenAngel card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class FoulImp extends mage.sets.stronghold.FoulImp {
|
||||||
public FoulImp(UUID ownerId) {
|
public FoulImp(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 32;
|
this.cardNumber = 32;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public FoulImp(final FoulImp card) {
|
public FoulImp(final FoulImp card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class HealingSalve extends mage.sets.seventhedition.HealingSalve {
|
||||||
public HealingSalve(UUID ownerId) {
|
public HealingSalve(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 14;
|
this.cardNumber = 14;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public HealingSalve(final HealingSalve card) {
|
public HealingSalve(final HealingSalve card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class IcatianPriest extends mage.sets.tenth.IcatianPriest {
|
||||||
public IcatianPriest(UUID ownerId) {
|
public IcatianPriest(UUID ownerId) {
|
||||||
super(ownerId);
|
super(ownerId);
|
||||||
this.cardNumber = 2;
|
this.cardNumber = 2;
|
||||||
this.expansionSetCode = "DD3";
|
this.expansionSetCode = "DD3A";
|
||||||
}
|
}
|
||||||
|
|
||||||
public IcatianPriest(final IcatianPriest card) {
|
public IcatianPriest(final IcatianPriest card) {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue