Merge remote-tracking branch 'magefree/master'

This commit is contained in:
Samuel Sandeen 2016-07-23 17:44:44 -04:00
commit a535d9d0e8
472 changed files with 12169 additions and 7729 deletions

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<groupId>org.mage</groupId>

View file

@ -122,7 +122,7 @@
<Component id="showCardName" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="tooltipDelay" alignment="1" max="32767" attributes="0"/>
</Group>
<EmptySpace pref="233" max="32767" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -146,7 +146,7 @@
<Property name="toolTipText" type="java.lang.String" value="Write the card&apos;s name on the card to make the card name more recognizable."/>
<Property name="actionCommand" type="java.lang.String" value=""/>
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
<Color id="Standardcursor"/>
<Color id="Default Cursor"/>
</Property>
</Properties>
<Events>
@ -3918,11 +3918,11 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="panelCardImages" max="32767" attributes="0"/>
<Component id="panelBackgroundImages" max="32767" attributes="0"/>
<Component id="panelCardImages" alignment="0" max="32767" attributes="0"/>
<Component id="panelBackgroundImages" alignment="0" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
@ -3932,10 +3932,10 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="panelCardImages" min="-2" max="-2" attributes="0"/>
<Component id="panelCardImages" min="-2" pref="231" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="panelBackgroundImages" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<EmptySpace pref="90" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -3959,30 +3959,38 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="cbUseDefaultImageFolder" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="cbCheckForNewImages" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="labelPreferedImageLanguage" max="-2" attributes="0"/>
</Group>
<Component id="cbSaveToZipFiles" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="cbPreferedImageLanguage" min="-2" pref="153" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="24" max="-2" attributes="0"/>
<Component id="txtImageFolderPath" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnBrowseImageLocation" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="labelNumberOfDownloadThreads" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="cbNumberOfDownloadThreads" min="-2" pref="153" max="-2" attributes="0"/>
</Group>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="cbUseDefaultImageFolder" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="cbCheckForNewImages" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="labelPreferedImageLanguage" max="-2" attributes="0"/>
</Group>
<Component id="cbSaveToZipFiles" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="40" max="-2" attributes="0"/>
<Component id="cbPreferedImageLanguage" min="-2" pref="153" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
<EmptySpace min="0" pref="142" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
@ -4003,6 +4011,11 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="cbSaveToZipFiles" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelNumberOfDownloadThreads" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="cbNumberOfDownloadThreads" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="cbPreferedImageLanguage" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="labelPreferedImageLanguage" alignment="3" min="-2" max="-2" attributes="0"/>
@ -4071,6 +4084,23 @@
<Property name="focusable" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="labelNumberOfDownloadThreads">
<Properties>
<Property name="text" type="java.lang.String" value="Number of download threads:"/>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="cbNumberOfDownloadThreads">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="4">
<StringItem index="0" value="Item 1"/>
<StringItem index="1" value="Item 2"/>
<StringItem index="2" value="Item 3"/>
<StringItem index="3" value="Item 4"/>
</StringArray>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="panelBackgroundImages">
@ -5329,7 +5359,7 @@
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="lblURLServerList" max="32767" attributes="0"/>
<Component id="txtURLServerList" max="32767" attributes="0"/>
<Component id="txtURLServerList" pref="28" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel17" min="-2" max="-2" attributes="0"/>

View file

@ -112,6 +112,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
public static final String KEY_CARD_IMAGES_USE_DEFAULT = "cardImagesUseDefault";
public static final String KEY_CARD_IMAGES_PATH = "cardImagesPath";
public static final String KEY_CARD_IMAGES_THREADS = "cardImagesThreads";
public static final String KEY_CARD_IMAGES_CHECK = "cardImagesCheck";
public static final String KEY_CARD_IMAGES_SAVE_TO_ZIP = "cardImagesSaveToZip";
public static final String KEY_CARD_IMAGES_PREF_LANGUAGE = "cardImagesPreferedImageLaguage";
@ -349,7 +350,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
addAvatars();
cbPreferedImageLanguage.setModel(new DefaultComboBoxModel<>(new String[]{"en", "de", "fr", "it", "es", "pt", "jp", "cn", "ru", "tw", "ko"}));
cbNumberOfDownloadThreads.setModel(new DefaultComboBoxModel<>(new String[]{"10", "9", "8", "7", "6", "5", "4", "3", "2", "1"}));
}
/**
@ -446,8 +447,10 @@ public class PreferencesDialog extends javax.swing.JDialog {
btnBrowseImageLocation = new javax.swing.JButton();
cbCheckForNewImages = new javax.swing.JCheckBox();
cbSaveToZipFiles = new javax.swing.JCheckBox();
cbPreferedImageLanguage = new javax.swing.JComboBox<>();
cbPreferedImageLanguage = new javax.swing.JComboBox<String>();
labelPreferedImageLanguage = new javax.swing.JLabel();
labelNumberOfDownloadThreads = new javax.swing.JLabel();
cbNumberOfDownloadThreads = new javax.swing.JComboBox();
panelBackgroundImages = new javax.swing.JPanel();
cbUseDefaultBackground = new javax.swing.JCheckBox();
txtBackgroundImagePath = new javax.swing.JTextField();
@ -502,7 +505,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
txtURLServerList = new javax.swing.JTextField();
jLabel17 = new javax.swing.JLabel();
lblProxyType = new javax.swing.JLabel();
cbProxyType = new javax.swing.JComboBox<>();
cbProxyType = new javax.swing.JComboBox<ProxyType>();
pnlProxySettings = new javax.swing.JPanel();
pnlProxy = new javax.swing.JPanel();
lblProxyServer = new javax.swing.JLabel();
@ -556,10 +559,10 @@ public class PreferencesDialog extends javax.swing.JDialog {
.add(main_cardLayout.createSequentialGroup()
.add(6, 6, 6)
.add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
.add(tooltipDelayLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 308, Short.MAX_VALUE)
.add(tooltipDelayLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 308, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.LEADING, showCardName)
.add(tooltipDelay, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap(233, Short.MAX_VALUE))
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
main_cardLayout.setVerticalGroup(
main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
@ -1388,35 +1391,45 @@ public class PreferencesDialog extends javax.swing.JDialog {
}
});
cbPreferedImageLanguage.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
cbPreferedImageLanguage.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
labelPreferedImageLanguage.setText("Prefered image language:");
labelPreferedImageLanguage.setFocusable(false);
labelNumberOfDownloadThreads.setText("Number of download threads:");
cbNumberOfDownloadThreads.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
org.jdesktop.layout.GroupLayout panelCardImagesLayout = new org.jdesktop.layout.GroupLayout(panelCardImages);
panelCardImages.setLayout(panelCardImagesLayout);
panelCardImagesLayout.setHorizontalGroup(
panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(panelCardImagesLayout.createSequentialGroup()
.add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(panelCardImagesLayout.createSequentialGroup()
.add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(cbUseDefaultImageFolder)
.add(cbCheckForNewImages)
.add(panelCardImagesLayout.createSequentialGroup()
.add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
.add(org.jdesktop.layout.GroupLayout.LEADING, panelCardImagesLayout.createSequentialGroup()
.addContainerGap()
.add(labelPreferedImageLanguage))
.add(org.jdesktop.layout.GroupLayout.LEADING, cbSaveToZipFiles))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(cbPreferedImageLanguage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(0, 0, Short.MAX_VALUE))
.add(panelCardImagesLayout.createSequentialGroup()
.add(24, 24, 24)
.add(txtImageFolderPath)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(btnBrowseImageLocation)))
.add(btnBrowseImageLocation))
.add(panelCardImagesLayout.createSequentialGroup()
.add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
.add(org.jdesktop.layout.GroupLayout.LEADING, panelCardImagesLayout.createSequentialGroup()
.addContainerGap()
.add(labelNumberOfDownloadThreads)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(cbNumberOfDownloadThreads, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(cbUseDefaultImageFolder)
.add(cbCheckForNewImages)
.add(panelCardImagesLayout.createSequentialGroup()
.add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
.add(org.jdesktop.layout.GroupLayout.LEADING, panelCardImagesLayout.createSequentialGroup()
.addContainerGap()
.add(labelPreferedImageLanguage))
.add(org.jdesktop.layout.GroupLayout.LEADING, cbSaveToZipFiles))
.add(40, 40, 40)
.add(cbPreferedImageLanguage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
.add(0, 142, Short.MAX_VALUE)))
.addContainerGap())
);
panelCardImagesLayout.setVerticalGroup(
@ -1433,6 +1446,10 @@ public class PreferencesDialog extends javax.swing.JDialog {
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(cbSaveToZipFiles)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(labelNumberOfDownloadThreads)
.add(cbNumberOfDownloadThreads, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(cbPreferedImageLanguage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(labelPreferedImageLanguage))
@ -1558,10 +1575,10 @@ public class PreferencesDialog extends javax.swing.JDialog {
tabImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(tabImagesLayout.createSequentialGroup()
.addContainerGap()
.add(panelCardImages, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(panelCardImages, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 231, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(panelBackgroundImages, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap(90, Short.MAX_VALUE))
);
tabsPanel.addTab("Images", tabImages);
@ -2178,7 +2195,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
.add(connection_serversLayout.createSequentialGroup()
.add(connection_serversLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
.add(lblURLServerList, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(txtURLServerList, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.add(txtURLServerList, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel17))
);
@ -2474,6 +2491,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
saveImagesPath(prefs);
save(prefs, dialog.cbCheckForNewImages, KEY_CARD_IMAGES_CHECK, "true", "false", UPDATE_CACHE_POLICY);
save(prefs, dialog.cbSaveToZipFiles, KEY_CARD_IMAGES_SAVE_TO_ZIP, "true", "false", UPDATE_CACHE_POLICY);
save(prefs, dialog.cbNumberOfDownloadThreads, KEY_CARD_IMAGES_THREADS);
save(prefs, dialog.cbPreferedImageLanguage, KEY_CARD_IMAGES_PREF_LANGUAGE);
save(prefs, dialog.cbUseDefaultBackground, KEY_BACKGROUND_IMAGE_DEFAULT, "true", "false", UPDATE_CACHE_POLICY);
@ -2525,14 +2543,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
dialog.setVisible(false);
}//GEN-LAST:event_exitButtonActionPerformed
private void cbUseDefaultImageFolderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbUseDefaultImageFolderActionPerformed
if (cbUseDefaultImageFolder.isSelected()) {
useDefaultPath();
} else {
useConfigurablePath();
}
}//GEN-LAST:event_cbUseDefaultImageFolderActionPerformed
private void useDefaultPath() {
txtImageFolderPath.setText("./plugins/images/");
txtImageFolderPath.setEnabled(false);
@ -2546,15 +2556,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
btnBrowseImageLocation.setEnabled(true);
}
private void btnBrowseImageLocationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBrowseImageLocationActionPerformed
int returnVal = fc.showOpenDialog(PreferencesDialog.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
txtImageFolderPath.setText(file.getAbsolutePath());
}
}//GEN-LAST:event_btnBrowseImageLocationActionPerformed
private void cbProxyTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbProxyTypeActionPerformed
this.showProxySettings();
}//GEN-LAST:event_cbProxyTypeActionPerformed
@ -2568,14 +2569,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
private void rememberPswdActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rememberPswdActionPerformed
}//GEN-LAST:event_rememberPswdActionPerformed
private void cbSaveToZipFilesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbSaveToZipFilesActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_cbSaveToZipFilesActionPerformed
private void cbCheckForNewImagesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbCheckForNewImagesActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_cbCheckForNewImagesActionPerformed
private void cbEnableGameSoundsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbEnableGameSoundsActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_cbEnableGameSoundsActionPerformed
@ -2777,6 +2770,31 @@ public class PreferencesDialog extends javax.swing.JDialog {
// TODO add your handling code here:
}//GEN-LAST:event_cbAutoOrderTriggerActionPerformed
private void cbSaveToZipFilesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbSaveToZipFilesActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_cbSaveToZipFilesActionPerformed
private void cbCheckForNewImagesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbCheckForNewImagesActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_cbCheckForNewImagesActionPerformed
private void btnBrowseImageLocationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBrowseImageLocationActionPerformed
int returnVal = fc.showOpenDialog(PreferencesDialog.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
txtImageFolderPath.setText(file.getAbsolutePath());
}
}//GEN-LAST:event_btnBrowseImageLocationActionPerformed
private void cbUseDefaultImageFolderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbUseDefaultImageFolderActionPerformed
if (cbUseDefaultImageFolder.isSelected()) {
useDefaultPath();
} else {
useConfigurablePath();
}
}//GEN-LAST:event_cbUseDefaultImageFolderActionPerformed
private void showProxySettings() {
Connection.ProxyType proxyType = (Connection.ProxyType) cbProxyType.getSelectedItem();
switch (proxyType) {
@ -2946,6 +2964,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
}
load(prefs, dialog.cbCheckForNewImages, KEY_CARD_IMAGES_CHECK, "true");
load(prefs, dialog.cbSaveToZipFiles, KEY_CARD_IMAGES_SAVE_TO_ZIP, "true");
dialog.cbNumberOfDownloadThreads.setSelectedItem(MageFrame.getPreferences().get(KEY_CARD_IMAGES_THREADS, "10"));
dialog.cbPreferedImageLanguage.setSelectedItem(MageFrame.getPreferences().get(KEY_CARD_IMAGES_PREF_LANGUAGE, "en"));
//add background load precedure
@ -3337,6 +3356,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
private javax.swing.JCheckBox cbEnableOtherSounds;
private javax.swing.JCheckBox cbEnableSkipButtonsSounds;
private javax.swing.JCheckBox cbGameLogAutoSave;
private javax.swing.JComboBox cbNumberOfDownloadThreads;
private javax.swing.JCheckBox cbPassPriorityActivation;
private javax.swing.JCheckBox cbPassPriorityCast;
private javax.swing.JComboBox<String> cbPreferedImageLanguage;
@ -3418,6 +3438,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
private javax.swing.JLabel labelEditorCardOffset;
private javax.swing.JLabel labelEditorCardSize;
private javax.swing.JLabel labelGameFeedback;
private javax.swing.JLabel labelNumberOfDownloadThreads;
private javax.swing.JLabel labelPreferedImageLanguage;
private javax.swing.JLabel labelStackWidth;
private javax.swing.JLabel labelTooltipSize;

View file

@ -16,100 +16,34 @@ public class MagicCardsImageSource implements CardImageSource {
private static final Map<String, String> setNameTokenReplacement = new HashMap<String, String>() {
{
put("C16", "commander-2016");
put("10E", "tenth-edition");
put("AER", "aether-revolt");
put("KLD", "kaladesh");
put("CN2", "conspiracy-take-the-crown");
put("W16", "welcome-deck-2016");
put("EMA", "eternal-masters");
put("EMN", "eldritch-moon");
put("SOI", "shadows-over-innistrad");
put("OGW", "oath-of-the-gatewatch");
put("CMA", "commanders-arsenal");
put("ARENA", "arena-league");
put("CP", "champs");
put("UGIN", "ugins-fate");
put("ALA", "shards-of-alara");
put("APAC", "asia-pacific-land-program");
put("EURO", "european-land-program");
put("SUS", "super-series");
put("C15", "commander-2015");
put("ORG", "oath-of-the-gatewatch");
put("EXP", "zendikar-expeditions");
put("APC", "player-rewards-2001");
put("ARB", "alara-reborn");
put("ARC", "archenemy");
put("ARENA", "arena-league");
put("AVR", "avacyn-restored");
put("BFZ", "battle-for-zendikar");
put("FVL", "from-the-vault-legends");
put("FVD", "from-the-vault-dragons");
put("FVE", "from-the-vault-exiled");
put("FVR", "from-the-vault-relics");
put("V12", "from-the-vault-realms");
put("V13", "from-the-vault-twenty");
put("V14", "from-the-vault-annihilation");
put("V15", "from-the-vault-angels");
put("V16", "from-the-vault-lore");
put("CLASH", "clash-pack");
put("TPR", "tempest-remastered");
put("ORI", "magic-origins");
put("MM2", "modern-masters-2015");
put("PTC", "prerelease-events");
put("DTK", "dragons-of-tarkir");
put("GRC", "wpngateway");
put("MBP", "media-inserts");
put("MLP", "launch-party");
put("WMCQ", "world-magic-cup-qualifier");
put("GPX", "grand-prix");
put("JR", "judge-gift-program");
put("MGDC", "magic-game-day-cards");
put("FNMP", "friday-night-magic");
put("FRF", "fate-reforged");
put("C14", "commander-2014");
put("KTK", "khans-of-tarkir");
put("VMA", "vintage-masters");
put("CNS", "conspiracy");
put("JOU", "journey-into-nyx");
put("BNG", "born-of-the-gods");
put("C13", "commander-2013-edition");
put("THS", "theros");
put("MMA", "modern-masters");
put("DGM", "dragons-maze");
put("GTC", "gatecrash");
put("RTR", "return-to-ravnica");
put("AVR", "avacyn-restored");
put("DKA", "dark-ascension");
put("ISD", "innistrad");
put("NPH", "new-phyrexia");
put("MBS", "mirrodin-besieged");
put("SOM", "scars-of-mirrodin");
put("ROE", "rise-of-the-eldrazi");
put("WWK", "worldwake");
put("ZEN", "zendikar");
put("HOP", "planechase");
put("C14", "commander-2014");
put("C15", "commander-2015");
put("C16", "commander-2016");
put("CLASH", "clash-pack");
put("CMA", "commanders-arsenal");
put("CMD", "commander");
put("ARC", "archenemy");
put("PC2", "planechase-2012-edition");
put("ARB", "alara-reborn");
put("CN2", "conspiracy-take-the-crown");
put("CNS", "conspiracy");
put("CON", "conflux");
put("ALA", "shards-of-alara");
put("EVE", "eventide");
put("SHM", "shadowmoor");
put("MOR", "morningtide");
put("LRW", "lorwyn");
put("10E", "tenth-edition");
put("CP", "champs");
put("CSP", "coldsnap");
put("MPRP", "magic-player-rewards");
put("POR", "portal");
put("PO2", "portal-second-age");
put("PTK", "portal-three-kingdoms");
put("M15", "magic-2015");
put("M14", "magic-2014");
put("M13", "magic-2013");
put("M12", "magic-2012");
put("M11", "magic-2011");
put("M10", "magic-2010");
put("EVG", "duel-decks-elves-vs-goblins");
put("DD2", "duel-decks-jace-vs-chandra");
put("DD3A", "duel-decks-anthology-divine-vs-demonic");
put("DD3B", "duel-decks-anthology-elves-vs-goblins");
put("DD3C", "duel-decks-anthology-garruk-vs-liliana");
put("DD3D", "duel-decks-anthology-jace-vs-chandra");
put("DD3DVD", "duel-decks-anthology-divine-vs-demonic");
put("DD3EVG", "duel-decks-anthology-elves-vs-goblins");
put("DD3GVL", "duel-decks-anthology-garruk-vs-liliana");
put("DD3JVC", "duel-decks-anthology-jace-vs-chandra");
put("DDC", "duel-decks-divine-vs-demonic");
put("DDD", "duel-decks-garruk-vs-liliana");
put("DDE", "duel-decks-phyrexia-vs-the-coalition");
@ -126,6 +60,76 @@ public class MagicCardsImageSource implements CardImageSource {
put("DDP", "duel-decks-zendikar-vs-eldrazi");
put("DDQ", "duel-decks-blessed-vs-cursed");
put("DDR", "duel-decks-nissa-vs-ob-nixilis");
put("DGM", "dragons-maze");
put("DKA", "dark-ascension");
put("DRB", "from-the-vault-dragons");
put("DTK", "dragons-of-tarkir");
put("EMA", "eternal-masters");
put("EMN", "eldritch-moon");
put("EURO", "european-land-program");
put("EVE", "eventide");
put("EVG", "duel-decks-elves-vs-goblins");
put("EXP", "zendikar-expeditions");
put("FNMP", "friday-night-magic");
put("FRF", "fate-reforged");
put("GPX", "grand-prix");
put("GRC", "wpngateway");
put("GTC", "gatecrash");
put("HOP", "planechase");
put("INV", "player-rewards-2001");
put("ISD", "innistrad");
put("JOU", "journey-into-nyx");
put("JR", "judge-gift-program");
put("KLD", "kaladesh");
put("KTK", "khans-of-tarkir");
put("LRW", "lorwyn");
put("M10", "magic-2010");
put("M11", "magic-2011");
put("M12", "magic-2012");
put("M13", "magic-2013");
put("M14", "magic-2014");
put("M15", "magic-2015");
put("MBP", "media-inserts");
put("MBS", "mirrodin-besieged");
put("MGDC", "magic-game-day-cards");
put("MLP", "launch-party");
put("MM2", "modern-masters-2015");
put("MMA", "modern-masters");
put("MOR", "morningtide");
put("MPRP", "magic-player-rewards");
put("NPH", "new-phyrexia");
put("ODY", "player-rewards-2002");
put("OGW", "oath-of-the-gatewatch");
put("ORG", "oath-of-the-gatewatch");
put("ORI", "magic-origins");
put("PC2", "planechase-2012-edition");
put("PO2", "portal-second-age");
put("PLS", "player-rewards-2001");
put("POR", "portal");
put("PTC", "prerelease-events");
put("PTK", "portal-three-kingdoms");
put("ROE", "rise-of-the-eldrazi");
put("RTR", "return-to-ravnica");
put("SHM", "shadowmoor");
put("SOI", "shadows-over-innistrad");
put("SOM", "scars-of-mirrodin");
put("SUS", "super-series");
put("THS", "theros");
put("TPR", "tempest-remastered");
put("UGIN", "ugins-fate");
put("V09", "from-the-vault-exiled");
put("V10", "from-the-vault-relics");
put("V11", "from-the-vault-legends");
put("V12", "from-the-vault-realms");
put("V13", "from-the-vault-twenty");
put("V14", "from-the-vault-annihilation");
put("V15", "from-the-vault-angels");
put("V16", "from-the-vault-lore");
put("VMA", "vintage-masters");
put("W16", "welcome-deck-2016");
put("WMCQ", "world-magic-cup-qualifier");
put("WWK", "worldwake");
put("ZEN", "zendikar");
}
private static final long serialVersionUID = 1L;
};

View file

@ -114,66 +114,19 @@ public class MythicspoilerComSource implements CardImageSource {
for (String setName : setNames.split("\\^")) {
String URLSetName = URLEncoder.encode(setName, "UTF-8");
String baseUrl = "http://mythicspoiler.com/" + URLSetName + "/";
String urlDocument;
Document doc;
if (proxyType.equals(ProxyType.NONE)) {
urlDocument = baseUrl;
doc = Jsoup.connect(urlDocument).get();
} else {
String proxyServer = prefs.get("proxyAddress", "");
int proxyPort = Integer.parseInt(prefs.get("proxyPort", "0"));
URL url = new URL(baseUrl);
Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyServer, proxyPort));
HttpURLConnection uc = (HttpURLConnection) url.openConnection(proxy);
uc.connect();
Map<String, String> pageLinks = getSetLinksFromPage(cardSet, aliasesStart, prefs, proxyType, baseUrl, baseUrl);
setLinks.putAll(pageLinks);
String line;
StringBuffer tmp = new StringBuffer();
BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
while ((line = in.readLine()) != null) {
tmp.append(line);
}
doc = Jsoup.parse(String.valueOf(tmp));
// try to download images for double-faced cards
try {
String doubleFacedUrl = baseUrl + "dfc.html";
pageLinks = getSetLinksFromPage(cardSet, aliasesStart, prefs, proxyType, baseUrl, doubleFacedUrl);
setLinks.putAll(pageLinks);
}
Elements cardsImages = doc.select("img[src^=cards/]"); // starts with cards/
if (!aliasesStart.isEmpty()) {
for (String text : aliasesStart) {
cardsImages.addAll(doc.select("img[src^=" + text + "]"));
}
catch (Exception ex) {
// that's ok if we cannot download double-faced cards for some sets
}
if (cardsImages.isEmpty()) {
break;
}
for (Element cardsImage : cardsImages) {
String cardLink = cardsImage.attr("src");
String cardName = null;
if (cardLink.startsWith("cards/") && cardLink.endsWith(".jpg")) {
cardName = cardLink.substring(6, cardLink.length() - 4);
} else if (aliasesStart.contains(cardLink)) {
cardName = cardLink.substring(0, cardLink.length() - 4);;
}
if (cardName != null && !cardName.isEmpty()) {
if (cardNameAliases.containsKey(cardSet + "-" + cardName)) {
cardName = cardNameAliases.get(cardSet + "-" + cardName);
} else {
if (cardName.endsWith("1") || cardName.endsWith("2") || cardName.endsWith("3") || cardName.endsWith("4") || cardName.endsWith("5")) {
if (!cardName.startsWith("forest")
&& !cardName.startsWith("swamp")
&& !cardName.startsWith("mountain")
&& !cardName.startsWith("island")
&& !cardName.startsWith("plains")) {
cardName = cardName.substring(0, cardName.length() - 1);
}
}
}
setLinks.put(cardName, baseUrl + cardLink);
}
}
}
} catch (IOException ex) {
@ -182,6 +135,71 @@ public class MythicspoilerComSource implements CardImageSource {
return setLinks;
}
private Map<String, String> getSetLinksFromPage(String cardSet, Set<String> aliasesStart, Preferences prefs,
ProxyType proxyType, String baseUrl, String pageUrl) throws IOException {
Map<String, String> pageLinks = new HashMap<>();
String urlDocument;
Document doc;
if (proxyType.equals(ProxyType.NONE)) {
urlDocument = pageUrl;
doc = Jsoup.connect(urlDocument).get();
} else {
String proxyServer = prefs.get("proxyAddress", "");
int proxyPort = Integer.parseInt(prefs.get("proxyPort", "0"));
URL url = new URL(pageUrl);
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);
}
doc = Jsoup.parse(String.valueOf(tmp));
}
Elements cardsImages = doc.select("img[src^=cards/]"); // starts with cards/
if (!aliasesStart.isEmpty()) {
for (String text : aliasesStart) {
cardsImages.addAll(doc.select("img[src^=" + text + "]"));
}
}
for (Element cardsImage : cardsImages) {
String cardLink = cardsImage.attr("src");
String cardName = null;
if (cardLink.startsWith("cards/") && cardLink.endsWith(".jpg")) {
cardName = cardLink.substring(6, cardLink.length() - 4);
} else if (aliasesStart.contains(cardLink)) {
cardName = cardLink.substring(0, cardLink.length() - 4);
;
}
if (cardName != null && !cardName.isEmpty()) {
if (cardNameAliases.containsKey(cardSet + "-" + cardName)) {
cardName = cardNameAliases.get(cardSet + "-" + cardName);
} else {
if (cardName.endsWith("1") || cardName.endsWith("2") || cardName.endsWith("3") || cardName.endsWith("4") || cardName.endsWith("5")) {
if (!cardName.startsWith("forest")
&& !cardName.startsWith("swamp")
&& !cardName.startsWith("mountain")
&& !cardName.startsWith("island")
&& !cardName.startsWith("plains")) {
cardName = cardName.substring(0, cardName.length() - 1);
}
}
}
pageLinks.put(cardName, baseUrl + cardLink);
}
}
return pageLinks;
}
@Override
public String generateURL(CardDownloadData card) throws Exception {
Integer collectorId = card.getCollectorId();

View file

@ -115,10 +115,10 @@ public class WizardCardsImageSource implements CardImageSource {
setsAliases.put("CON", "Conflux");
setsAliases.put("CSP", "Coldsnap");
setsAliases.put("DD2", "Duel Decks: 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("DD3DVD", "Duel Decks Anthology, Divine vs. Demonic");
setsAliases.put("DD3EVG", "Duel Decks Anthology, Elves vs. Goblins");
setsAliases.put("DD3GVL", "Duel Decks Anthology, Garruk vs. Liliana");
setsAliases.put("DD3JVC", "Duel Decks Anthology, Jace vs. Chandra");
setsAliases.put("DDC", "Duel Decks: Divine vs. Demonic");
setsAliases.put("DDD", "Duel Decks: Garruk vs. Liliana");
setsAliases.put("DDE", "Duel Decks: Phyrexia vs. the Coalition");
@ -139,6 +139,7 @@ public class WizardCardsImageSource implements CardImageSource {
setsAliases.put("DIS", "Dissension");
setsAliases.put("DKA", "Dark Ascension");
setsAliases.put("DKM", "Deckmasters");
setsAliases.put("DRB", "From the Vault: Dragons");
setsAliases.put("DRK", "The Dark");
setsAliases.put("DST", "Darksteel");
setsAliases.put("DTK", "Dragons of Tarkir");
@ -151,14 +152,11 @@ public class WizardCardsImageSource implements CardImageSource {
setsAliases.put("FNMP", "Friday Night Magic");
setsAliases.put("FRF", "Fate Reforged");
setsAliases.put("FUT", "Future Sight");
setsAliases.put("FVD", "From the Vault: Dragons");
setsAliases.put("FVE", "From the Vault: Exiled");
setsAliases.put("FVL", "From the Vault: Legends");
setsAliases.put("FVR", "From the Vault: Relics");
setsAliases.put("GPT", "Guildpact");
setsAliases.put("GPX", "Grand Prix");
setsAliases.put("GRC", "WPN Gateway");
setsAliases.put("GTC", "Gatecrash");
setsAliases.put("H09", "Premium Deck Series: Slivers");
setsAliases.put("HML", "Homelands");
setsAliases.put("HOP", "Planechase");
setsAliases.put("ICE", "Ice Age");
@ -195,7 +193,7 @@ public class WizardCardsImageSource implements CardImageSource {
setsAliases.put("MOR", "Morningtide");
setsAliases.put("MPRP", "Magic Player Rewards");
setsAliases.put("MRD", "Mirrodin");
setsAliases.put("NMS", "Nemesis");
setsAliases.put("NEM", "Nemesis");
setsAliases.put("NPH", "New Phyrexia");
setsAliases.put("OGW", "Oath of the Gatewatch");
setsAliases.put("ODY", "Odyssey");
@ -204,7 +202,6 @@ public class WizardCardsImageSource implements CardImageSource {
setsAliases.put("PC2", "Planechase 2012 Edition");
setsAliases.put("PCY", "Prophecy");
setsAliases.put("PD2", "Premium Deck Series: Fire and Lightning");
setsAliases.put("PDS", "Premium Deck Series: Slivers");
setsAliases.put("PLC", "Planar Chaos");
setsAliases.put("PLS", "Planeshift");
setsAliases.put("PO2", "Portal Second Age");
@ -233,6 +230,9 @@ public class WizardCardsImageSource implements CardImageSource {
setsAliases.put("ULG", "Urza's Legacy");
setsAliases.put("UNH", "Unhinged");
setsAliases.put("USG", "Urza's Saga");
setsAliases.put("V09", "From the Vault: Exiled");
setsAliases.put("V10", "From the Vault: Relics");
setsAliases.put("V11", "From the Vault: Legends");
setsAliases.put("V12", "From the Vault: Realms");
setsAliases.put("V13", "From the Vault: Twenty");
setsAliases.put("V14", "From the Vault: Annihilation (2014)");

View file

@ -472,7 +472,8 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
update(0, cardsToDownload.size());
ExecutorService executor = Executors.newFixedThreadPool(10);
int numberOfThreads = Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_THREADS, "10"));
ExecutorService executor = Executors.newFixedThreadPool(numberOfThreads);
for (int i = 0; i < cardsToDownload.size() && !cancel; i++) {
try {

View file

@ -1,8 +1,24 @@
|Generate|TOK:EMA|Carnivore||
|Generate|TOK:EMA|Dragon||
|Generate|TOK:EMA|Elemental|1|
|Generate|TOK:EMA|Elemental|2|
|Generate|TOK:EMA|Elephant||
|Generate|TOK:EMA|Elf Warrior||
|Generate|TOK:EMA|Goblin||
|Generate|TOK:EMA|Goblin Soldier||
|Generate|TOK:EMA|Serf||
|Generate|TOK:EMA|Soldier||
|Generate|TOK:EMA|Spirit|1|
|Generate|TOK:EMA|Spirit|2|
|Generate|TOK:EMA|Wall||
|Generate|TOK:EMA|Wurm||
|Generate|TOK:EMA|Zombie||
|Generate|EMBLEM!:EMA|Emblem Dack Fayden||
|Generate|TOK:EMN|Eldrazi Horror||
|Generate|TOK:EMN|Human||
|Generate|TOK:EMN|Human Wizard||
|Generate|TOK:EMN|Spider||
|Generate|TOK:EMN|Spirit||
|Generate|TOK:EMN|Zombie|1|
|Generate|TOK:EMN|Zombie|2|
|Generate|TOK:EMN|Zombie|3|

View file

@ -16,7 +16,7 @@ mir=mr
tst=ts
usg=us
apc=ap
nms=ne
nem=ne
dis=di
vis=vi
9ed=9e
@ -63,7 +63,17 @@ dd2=jvc
ddd=gvl
unh=uh
dde=pvc
v09=fve
v10=fvr
v11=fvl
drb=fvd
h09=pds
ugl=ug
dd3dvd=ddadvd
dd3evg=ddaevg
dd3gvl=ddagvl
dd3jvc=ddajvc
# Remove setname as soon as the images can be downloaded
ignore.urls=TOK,AER,PCA,C16,V16,KLD,DDR,CN2
# sets ordered by release time (newest goes first)
token.lookup.order=AER,PCA,C16,V16,KLD,DDR,CN2,EMN,EMA,SOI,DDQ,CP,CMA,ARENA,SUS,APAC,EURO,UGIN,C15,OGW,EXP,DDP,BFZ,FVD,FVE,FVL,FVR,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC
token.lookup.order=DD3DVD,DD3EVG,DD3GVL,DD3JVC,H09,AER,PCA,C16,V16,KLD,DDR,CN2,EMN,EMA,SOI,DDQ,CP,CMA,ARENA,SUS,APAC,EURO,UGIN,C15,OGW,EXP,DDP,BFZ,DRB,V09,V10,V11,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-common</artifactId>

View file

@ -40,8 +40,8 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
*/
public final static int MAGE_VERSION_MAJOR = 1;
public final static int MAGE_VERSION_MINOR = 4;
public final static int MAGE_VERSION_PATCH = 12;
public final static String MAGE_VERSION_MINOR_PATCH = "v0";
public final static int MAGE_VERSION_PATCH = 13;
public final static String MAGE_VERSION_MINOR_PATCH = "v2";
public final static String MAGE_VERSION_INFO = "";
private final int major;

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-counter-plugin</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-plugins</artifactId>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<groupId>org.mage</groupId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-deck-constructed</artifactId>

View file

@ -41,6 +41,7 @@ public class DuelCommander extends Commander {
banned.add("Back to Basics");
banned.add("Black Lotus");
banned.add("Channel");
banned.add("Dig Through Time");
banned.add("Entomb");
banned.add("Fastbond");
banned.add("Food Chain");
@ -67,6 +68,7 @@ public class DuelCommander extends Commander {
banned.add("Mystical Tutor");
banned.add("Natural Order");
banned.add("Necropotence");
banned.add("Necrotic Oooze");
banned.add("Oath of Druids");
banned.add("Protean Hulk");
banned.add("Sensei's Divining Top");
@ -79,12 +81,14 @@ public class DuelCommander extends Commander {
banned.add("Time Walk");
banned.add("Tinker");
banned.add("Tolarian Academy");
banned.add("Treasure Cruise");
banned.add("Vampiric Tutor");
banned.add("Yawgmoths Bargain");
bannedCommander.add("Derevi, Empyrial Tactician");
bannedCommander.add("Edric, Spymaster of Trest");
bannedCommander.add("Erayo, Soratami Ascendant");
bannedCommander.add("Marath, Will of the Wild");
bannedCommander.add("Oloro, Ageless Ascetic");
bannedCommander.add("Rofellos, Llanowar Emissary");
bannedCommander.add("Tasigur, the Golden Fang");

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-deck-limited</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-game-commanderduel</artifactId>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-game-commanderfreeforall</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-game-freeforall</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-game-momirduel</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-game-tinyleadersduel</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-game-twoplayerduel</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-player-ai-draftbot</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-player-ai-ma</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-player-ai</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-player-ai-mcts</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-player-aiminimax</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-player-human</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-tournament-boosterdraft</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-tournament-constructed</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-tournament-sealed</artifactId>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-server-plugins</artifactId>

View file

@ -108,6 +108,7 @@
<draftCube name="MTGO Vintage Cube 2014" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCube2014"/>
<draftCube name="MTGO Vintage Cube 2015" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCube2015"/>
<draftCube name="MTGO Vintage Cube 2016" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCube2016"/>
<draftCube name="MTGO Vintage Cube June 2016" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCubeJune2016"/>
<draftCube name="The Peasant's Toolbox (800 cards)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.PeasantsToolboxCube"/>
<draftCube name="www.MTGCube.com (502 cards)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.MTGCube"/>
<draftCube name="Cube From Deck" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.CubeFromDeck"/>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<artifactId>mage-server</artifactId>

View file

@ -78,6 +78,7 @@
<tournamentType name="Booster Draft Elimination (Cube)" jar="mage-tournament-boosterdraft-${project.version}.jar" className="mage.tournament.BoosterDraftEliminationTournament" typeName="mage.tournament.BoosterDraftEliminationCubeTournamentType"/>
<tournamentType name="Booster Draft Elimination (Random)" jar="mage-tournament-boosterdraft-${project.version}.jar" className="mage.tournament.RandomBoosterDraftEliminationTournament" typeName="mage.tournament.RandomBoosterDraftEliminationTournamentType"/>
<tournamentType name="Booster Draft Elimination (Rich Man)" jar="mage-tournament-boosterdraft-${project.version}.jar" className="mage.tournament.RichManDraftEliminationTournament" typeName="mage.tournament.RichManDraftEliminationTournamentType"/>
<tournamentType name="Booster Draft Elimination (Rich Man Cube)" jar="mage-tournament-boosterdraft-${project.version}.jar" className="mage.tournament.RichManCubeDraftEliminationTournament" typeName="mage.tournament.RichManCubeDraftEliminationTournamentType"/>
<tournamentType name="Booster Draft Swiss" jar="mage-tournament-boosterdraft-${project.version}.jar" className="mage.tournament.BoosterDraftSwissTournament" typeName="mage.tournament.BoosterDraftSwissTournamentType"/>
<tournamentType name="Booster Draft Swiss (Cube)" jar="mage-tournament-boosterdraft-${project.version}.jar" className="mage.tournament.BoosterDraftSwissTournament" typeName="mage.tournament.BoosterDraftSwissCubeTournamentType"/>
<tournamentType name="Booster Draft Swiss (Random)" jar="mage-tournament-boosterdraft-${project.version}.jar" className="mage.tournament.RandomBoosterDraftSwissTournament" typeName="mage.tournament.RandomBoosterDraftSwissTournamentType"/>
@ -104,8 +105,10 @@
<draftCube name="MTGO Vintage Cube 2014" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.VintageCube2014"/>
<draftCube name="MTGO Vintage Cube 2015" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.VintageCube2015"/>
<draftCube name="MTGO Vintage Cube 2016" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.VintageCube2016"/>
<draftCube name="MTGO Vintage Cube June 2016" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.VintageCubeJune2016"/>
<draftCube name="The Peasant's Toolbox (800 cards)" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.PeasantsToolboxCube"/>
<draftCube name="www.MTGCube.com (502 cards)" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.MTGCube"/>
<draftCube name="Cube From Deck" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.CubeFromDeck"/>
</draftCubes>
<deckTypes>
<deckType name="Constructed - Standard" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Standard"/>

View file

@ -106,6 +106,7 @@ public class ChatManager {
this.broadcast(chatId, userName, message, color, withTime, messageType, null);
}
static String lastMessage = "";
public void broadcast(UUID chatId, String userName, String message, MessageColor color, boolean withTime, MessageType messageType, SoundToPlay soundToPlay) {
ChatSession chatSession = chatSessions.get(chatId);
if (chatSession != null) {
@ -118,24 +119,37 @@ public class ChatManager {
return;
}
}
if (message.equals(lastMessage)) {
return;
}
lastMessage = message;
chatSession.broadcast(userName, message, color, withTime, messageType, soundToPlay);
}
}
private static final String COMMANDS_LIST =
"<br/>List of commands:" +
"<br/>\\history or \\h [username] - shows the history of a player" +
"<br/>\\me - shows the history of the current player" +
"<br/>\\list or \\l - Show a list of commands" +
"<br/>\\whisper or \\w [player name] [text] - whisper to the player with the given name";
private boolean performUserCommand(User user, String message, UUID chatId, boolean doError) {
String command = message.substring(1).trim().toUpperCase(Locale.ENGLISH);
if (doError) {
message += new StringBuilder("<br/>Invalid User Command '" + message + "'.")
.append("<br/>List of commands:")
.append("<br/>\\history or \\h [username] - shows the history of a player")
.append("<br/>\\list or \\l - Show a list of commands")
.append("<br/>\\whisper or \\w [player name] [text] - whisper to the player with the given name").toString();
message += new StringBuilder("<br/>Invalid User Command '" + message + "'.").append(COMMANDS_LIST).toString();
chatSessions.get(chatId).broadcastInfoToUser(user, message);
return true;
}
if (command.startsWith("H ") || command.startsWith("HISTORY ")) {
message = UserManager.getInstance().getUserHistory(message.substring(command.startsWith("H ") ? 3 : 9));
message += "<br/>" + UserManager.getInstance().getUserHistory(message.substring(command.startsWith("H ") ? 3 : 9));
chatSessions.get(chatId).broadcastInfoToUser(user, message);
return true;
}
if (command.equals("ME")) {
message += "<br/>" + UserManager.getInstance().getUserHistory(user.getName());
chatSessions.get(chatId).broadcastInfoToUser(user, message);
return true;
}
@ -159,10 +173,7 @@ public class ChatManager {
}
}
if (command.equals("L") || command.equals("LIST")) {
message += new StringBuilder("<br/>List of commands:")
.append("<br/>\\history or \\h [username] - shows the history of a player")
.append("<br/>\\list or \\l - Show a list of commands")
.append("<br/>\\whisper or \\w [player name] [text] - whisper to the player with the given name").toString();
message += COMMANDS_LIST;
chatSessions.get(chatId).broadcastInfoToUser(user, message);
return true;
}

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.12</version>
<version>1.4.13</version>
</parent>
<groupId>org.mage</groupId>

View file

@ -43,7 +43,7 @@ public class AnthologyDivineVsDemonic extends ExpansionSet {
}
private AnthologyDivineVsDemonic() {
super("Duel Decks: Anthology, Divine vs. Demonic", "DD3A", "mage.sets.anthologydivinevsdemonic", new GregorianCalendar(2014, 12, 5).getTime(), SetType.SUPPLEMENTAL);
super("Duel Decks: Anthology, Divine vs. Demonic", "DD3DVD", "mage.sets.anthologydivinevsdemonic", new GregorianCalendar(2014, 12, 5).getTime(), SetType.SUPPLEMENTAL);
this.blockName = "Duel Decks: Anthology";
this.hasBasicLands = false;
}

View file

@ -43,7 +43,7 @@ public class AnthologyElvesVsGoblins extends ExpansionSet {
}
private AnthologyElvesVsGoblins() {
super("Duel Decks: Anthology, Elves vs. Goblins", "DD3B", "mage.sets.anthologyelvesvsgoblins", new GregorianCalendar(2014, 12, 5).getTime(), SetType.SUPPLEMENTAL);
super("Duel Decks: Anthology, Elves vs. Goblins", "DD3EVG", "mage.sets.anthologyelvesvsgoblins", new GregorianCalendar(2014, 12, 5).getTime(), SetType.SUPPLEMENTAL);
this.blockName = "Duel Decks: Anthology";
this.hasBasicLands = false;
}

View file

@ -43,7 +43,7 @@ public class AnthologyGarrukVsLiliana extends ExpansionSet {
}
private AnthologyGarrukVsLiliana() {
super("Duel Decks: Anthology, Garruk vs. Liliana", "DD3C", "mage.sets.anthologygarrukvsliliana", new GregorianCalendar(2014, 12, 5).getTime(), SetType.SUPPLEMENTAL);
super("Duel Decks: Anthology, Garruk vs. Liliana", "DD3GVL", "mage.sets.anthologygarrukvsliliana", new GregorianCalendar(2014, 12, 5).getTime(), SetType.SUPPLEMENTAL);
this.blockName = "Duel Decks: Anthology";
this.hasBasicLands = false;
}

View file

@ -43,7 +43,7 @@ public class AnthologyJaceVsChandra extends ExpansionSet {
}
private AnthologyJaceVsChandra() {
super("Duel Decks: Anthology, Jace vs. Chandra", "DD3D", "mage.sets.anthologyjacevschandra", new GregorianCalendar(2014, 12, 5).getTime(), SetType.SUPPLEMENTAL);
super("Duel Decks: Anthology, Jace vs. Chandra", "DD3JVC", "mage.sets.anthologyjacevschandra", new GregorianCalendar(2014, 12, 5).getTime(), SetType.SUPPLEMENTAL);
this.blockName = "Duel Decks: Anthology";
this.hasBasicLands = false;
}

View file

@ -47,8 +47,8 @@ public class EldritchMoon extends ExpansionSet {
super("Eldritch Moon", "EMN", "mage.sets.eldritchmoon", new GregorianCalendar(2016, 7, 26).getTime(), SetType.EXPANSION);
this.blockName = "Shadows over Innistrad";
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 10;
this.numBoosterLands = 1;
this.numBoosterCommon = 9;
this.numBoosterUncommon = 3;
this.numBoosterRare = 1;
this.ratioBoosterMythic = 8;

View file

@ -44,7 +44,7 @@ public class FTVDragons extends ExpansionSet {
}
private FTVDragons() {
super("From the Vault: Dragons", "FVD", "mage.sets.ftvdragons", new GregorianCalendar(2008, 8, 29).getTime(), SetType.SUPPLEMENTAL);
super("From the Vault: Dragons", "DRB", "mage.sets.ftvdragons", new GregorianCalendar(2008, 8, 29).getTime(), SetType.SUPPLEMENTAL);
this.hasBasicLands = false;
}
}

View file

@ -44,7 +44,7 @@ public class FTVExiled extends ExpansionSet {
}
private FTVExiled() {
super("From the Vault: Exiled", "FVE", "mage.sets.ftvexiled", new GregorianCalendar(2009, 8, 28).getTime(), SetType.SUPPLEMENTAL);
super("From the Vault: Exiled", "V09", "mage.sets.ftvexiled", new GregorianCalendar(2009, 8, 28).getTime(), SetType.SUPPLEMENTAL);
this.hasBasicLands = false;
}
}

View file

@ -44,7 +44,7 @@ public class FTVLegends extends ExpansionSet {
}
private FTVLegends() {
super("From the Vault: Legends", "FVL", "mage.sets.ftvlegends", new GregorianCalendar(2011, 8, 26).getTime(), SetType.SUPPLEMENTAL);
super("From the Vault: Legends", "V11", "mage.sets.ftvlegends", new GregorianCalendar(2011, 8, 26).getTime(), SetType.SUPPLEMENTAL);
this.hasBasicLands = false;
}
}

View file

@ -44,7 +44,7 @@ public class FTVRelics extends ExpansionSet {
}
private FTVRelics() {
super("From the Vault: Relics", "FVR", "mage.sets.ftvrelics", new GregorianCalendar(2010, 8, 27).getTime(), SetType.SUPPLEMENTAL);
super("From the Vault: Relics", "V10", "mage.sets.ftvrelics", new GregorianCalendar(2010, 8, 27).getTime(), SetType.SUPPLEMENTAL);
this.hasBasicLands = false;
}
}

View file

@ -28,7 +28,6 @@
package mage.sets;
import java.util.GregorianCalendar;
import mage.cards.ExpansionSet;
import mage.constants.SetType;
@ -45,7 +44,7 @@ public class Nemesis extends ExpansionSet {
}
private Nemesis() {
super("Nemesis", "NMS", "mage.sets.nemesis", new GregorianCalendar(2000, 1, 5).getTime(), SetType.EXPANSION);
super("Nemesis", "NEM", "mage.sets.nemesis", new GregorianCalendar(2000, 1, 5).getTime(), SetType.EXPANSION);
this.blockName = "Masques";
this.parentSet = MercadianMasques.getInstance();
this.hasBasicLands = false;

View file

@ -44,7 +44,7 @@ public class PDSSlivers extends ExpansionSet {
}
private PDSSlivers() {
super("Premium Deck Series: Slivers", "PDS", "mage.sets.pdsslivers", new GregorianCalendar(2009, 11, 1).getTime(), SetType.SUPPLEMENTAL);
super("Premium Deck Series: Slivers", "H09", "mage.sets.pdsslivers", new GregorianCalendar(2009, 11, 1).getTime(), SetType.SUPPLEMENTAL);
this.hasBasicLands = false;
}
}

View file

@ -66,7 +66,7 @@ public class AgonizingDemise extends CardImpl {
this.addAbility(new KickerAbility("{1}{R}"));
// Destroy target nonblack creature. It can't be regenerated.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterNonBlackCreature));
//If Agonizing Demise was kicked, it deals damage equal to that creature's power to the creature's controller.

View file

@ -28,13 +28,12 @@
package mage.sets.alarareborn;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.effects.common.combat.CantBlockTargetEffect;
import mage.abilities.keyword.CascadeAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.target.common.TargetCreaturePermanent;
/**
@ -48,9 +47,6 @@ public class DemonicDread extends CardImpl {
super(ownerId, 38, "Demonic Dread", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{B}{R}");
this.expansionSetCode = "ARB";
// Cascade
this.addAbility(new CascadeAbility());

View file

@ -28,17 +28,13 @@
package mage.sets.apocalypse;
import java.util.UUID;
import mage.abilities.effects.common.DestroyAllEffect;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.filter.common.FilterEnchantmentPermanent;
/**
*
@ -52,7 +48,7 @@ public class TranquilPath extends CardImpl {
// Destroy all enchantments.
this.getSpellAbility().addEffect(new TranquilPathEffect());
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterEnchantmentPermanent("enchantments")));
// Draw a card.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
}
@ -67,34 +63,3 @@ public class TranquilPath extends CardImpl {
}
}
class TranquilPathEffect extends OneShotEffect {
private static final FilterPermanent filter = new FilterPermanent("");
static {
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
}
public TranquilPathEffect() {
super(Outcome.DestroyPermanent);
staticText = "Destroy all enchantments";
}
public TranquilPathEffect(final TranquilPathEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
permanent.destroy(source.getSourceId(), game, false);
}
return true;
}
@Override
public TranquilPathEffect copy() {
return new TranquilPathEffect(this);
}
}

View file

@ -52,12 +52,12 @@ public class AbuJafar extends CardImpl {
this.power = new MageInt(0);
this.toughness = new MageInt(1);
FilterCreaturePermanent filter = new FilterCreaturePermanent();
FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures blocking or blocked by it");
filter.add(Predicates.or(new BlockedByIdPredicate(this.getId()),
new BlockingAttackerIdPredicate(this.getId())));
// When Abu Ja'far dies, destroy all creatures blocking or blocked by it. They can't be regenerated.
this.addAbility(new DiesTriggeredAbility(new DestroyAllEffect(filter), true));
this.addAbility(new DiesTriggeredAbility(new DestroyAllEffect(filter, true), false));
}
public AbuJafar(final AbuJafar card) {

View file

@ -39,11 +39,11 @@ import mage.filter.common.FilterAttackingCreature;
*
* @author fireshoes
*/
public class ArmyOfAllah extends CardImpl {
public class ArmyOfAllah1 extends CardImpl {
private static final FilterAttackingCreature filter = new FilterAttackingCreature("Attacking creatures");
public ArmyOfAllah(UUID ownerId) {
public ArmyOfAllah1(UUID ownerId) {
super(ownerId, 56, "Army of Allah", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{W}{W}");
this.expansionSetCode = "ARN";
@ -51,12 +51,12 @@ public class ArmyOfAllah extends CardImpl {
this.getSpellAbility().addEffect(new BoostAllEffect(2, 0, Duration.EndOfTurn, filter, false));
}
public ArmyOfAllah(final ArmyOfAllah card) {
public ArmyOfAllah1(final ArmyOfAllah1 card) {
super(card);
}
@Override
public ArmyOfAllah copy() {
return new ArmyOfAllah(this);
public ArmyOfAllah1 copy() {
return new ArmyOfAllah1(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* 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.arabiannights;
import java.util.UUID;
/**
*
* @author fwannmacher
*/
public class ArmyOfAllah2 extends ArmyOfAllah1 {
public ArmyOfAllah2(UUID ownerId) {
super(ownerId);
this.cardNumber = 57;
}
public ArmyOfAllah2(final ArmyOfAllah2 card) {
super(card);
}
@Override
public ArmyOfAllah2 copy() {
return new ArmyOfAllah2(this);
}
}

View file

@ -42,9 +42,9 @@ import mage.constants.Rarity;
*
* @author LoneFox
*/
public class NafsAsp extends CardImpl {
public class NafsAsp1 extends CardImpl {
public NafsAsp(UUID ownerId) {
public NafsAsp1(UUID ownerId) {
super(ownerId, 36, "Nafs Asp", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}");
this.expansionSetCode = "ARN";
this.subtype.add("Snake");
@ -58,12 +58,12 @@ public class NafsAsp extends CardImpl {
false, true));
}
public NafsAsp(final NafsAsp card) {
public NafsAsp1(final NafsAsp1 card) {
super(card);
}
@Override
public NafsAsp copy() {
return new NafsAsp(this);
public NafsAsp1 copy() {
return new NafsAsp1(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* 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.arabiannights;
import java.util.UUID;
/**
*
* @author fwannmacher
*/
public class NafsAsp2 extends NafsAsp1 {
public NafsAsp2(UUID ownerId) {
super(ownerId);
this.cardNumber = 37;
}
public NafsAsp2(final NafsAsp2 card) {
super(card);
}
@Override
public NafsAsp2 copy() {
return new NafsAsp2(this);
}
}

View file

@ -56,13 +56,13 @@ import mage.target.TargetPermanent;
*
* @author MarcoMarin
*/
public class Oubliette extends CardImpl {
public class Oubliette1 extends CardImpl {
public Counters godHelpMe = null;
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("target creature");
public Oubliette(UUID ownerId) {
public Oubliette1(UUID ownerId) {
super(ownerId, 11, "Oubliette", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}");
this.expansionSetCode = "ARN";
@ -77,13 +77,13 @@ public class Oubliette extends CardImpl {
this.addAbility(ability2);
}
public Oubliette(final Oubliette card) {
public Oubliette1(final Oubliette1 card) {
super(card);
}
@Override
public Oubliette copy() {
return new Oubliette(this);
public Oubliette1 copy() {
return new Oubliette1(this);
}
}
@ -134,7 +134,7 @@ class OublietteEffect extends OneShotEffect {
}
//((Oubliette)enchantment.getMainCard()).godHelpMe = enchantedCreature.getCounters(game); //why doesn't work? should return the same card, no?
((Oubliette) game.getCard(source.getSourceId())).godHelpMe = enchantedCreature.getCounters(game).copy();
((Oubliette1) game.getCard(source.getSourceId())).godHelpMe = enchantedCreature.getCounters(game).copy();
/*
if (!(enchantedCreature instanceof Token)) {
@ -220,7 +220,7 @@ class OublietteReturnEffect extends OneShotEffect {
if (oubliette == null) {
return false;//1st stab at getting those counters back
}
for (Counter c : ((Oubliette) oubliette).godHelpMe.values()) { //would be nice if could just use that copy function to set the whole field
for (Counter c : ((Oubliette1) oubliette).godHelpMe.values()) { //would be nice if could just use that copy function to set the whole field
if (c != null) {
newPermanent.getCounters(game).addCounter(c);
}

View file

@ -0,0 +1,51 @@
/*
* 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.arabiannights;
import java.util.UUID;
/**
*
* @author fwannmacher
*/
public class Oubliette2 extends Oubliette1 {
public Oubliette2(UUID ownerId) {
super(ownerId);
this.cardNumber = 12;
}
public Oubliette2(final Oubliette2 card) {
super(card);
}
@Override
public Oubliette2 copy() {
return new Oubliette2(this);
}
}

View file

@ -41,11 +41,11 @@ import mage.filter.common.FilterBlockingCreature;
*
* @author MarcoMarin
*/
public class Piety extends CardImpl {
public class Piety1 extends CardImpl {
public static final FilterBlockingCreature filter = new FilterBlockingCreature();
public Piety(UUID ownerId) {
public Piety1(UUID ownerId) {
super(ownerId, 64, "Piety", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{W}");
this.expansionSetCode = "ARN";
@ -54,12 +54,12 @@ public class Piety extends CardImpl {
//this.addAbility(new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_POST, "end Piety", true, new BoostAllEffect(0, 3, Duration.EndOfTurn, filter, false)));
}
public Piety(final Piety card) {
public Piety1(final Piety1 card) {
super(card);
}
@Override
public Piety copy() {
return new Piety(this);
public Piety1 copy() {
return new Piety1(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* 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.arabiannights;
import java.util.UUID;
/**
*
* @author fwannmacher
*/
public class Piety2 extends Piety1 {
public Piety2(UUID ownerId) {
super(ownerId);
this.cardNumber = 65;
}
public Piety2(final Piety2 card) {
super(card);
}
@Override
public Piety2 copy() {
return new Piety2(this);
}
}

View file

@ -36,7 +36,7 @@ import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
/**
*
@ -55,7 +55,7 @@ public class ChasmGuide extends CardImpl {
// <i>Rally</i> Whenever Chasm Guide or another Ally enters the battlefield under your control, creatures you control gain haste until end of turn.
this.addAbility(new AllyEntersBattlefieldTriggeredAbility(
new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures you control")), false));
new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("creatures")), false));
}
public ChasmGuide(final ChasmGuide card) {

View file

@ -36,7 +36,7 @@ import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
/**
*
@ -55,7 +55,7 @@ public class FiremantleMage extends CardImpl {
// <i>Rally</i> Whenver Firemantle Mage or another Ally enters the battlefield under your control, creatures you control gain menace until end of turn.
this.addAbility(new AllyEntersBattlefieldTriggeredAbility(
new GainAbilityControlledEffect(new MenaceAbility(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures you control")), false));
new GainAbilityControlledEffect(new MenaceAbility(), Duration.EndOfTurn, new FilterCreaturePermanent("creatures")), false));
}
public FiremantleMage(final FiremantleMage card) {

View file

@ -36,7 +36,7 @@ import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
/**
*
@ -55,7 +55,7 @@ public class KorBladewhirl extends CardImpl {
// <i>Rally</i> Whenever Kor Bladewhirl or another Ally enters the battlefield under your control, creatures you control gain first strike until end of turn.
this.addAbility(new AllyEntersBattlefieldTriggeredAbility(
new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures you control")), false));
new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("creatures")), false));
}
public KorBladewhirl(final KorBladewhirl card) {

View file

@ -36,7 +36,7 @@ import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
/**
*
@ -55,7 +55,7 @@ public class OnduChampion extends CardImpl {
// <i>Rally</i> Whenever Ondu Champion or another Ally enters the battlefield under your control, creatures you control gain trample until end of turn.
this.addAbility(new AllyEntersBattlefieldTriggeredAbility(
new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures you control")), false));
new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("creatures")), false));
}
public OnduChampion(final OnduChampion card) {

View file

@ -47,7 +47,7 @@ import mage.filter.predicate.mageobject.ColorlessPredicate;
*/
public class RuinationGuide extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Other colorless creatures you control");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("colorless creatures");
static {
filter.add(new ColorlessPredicate());

View file

@ -73,7 +73,7 @@ public class KiraGreatGlassSpinner extends CardImpl {
// Creatures you control have "Whenever this creature becomes the target of a spell or ability for the first time in a turn, counter that spell or ability."
Effect effect = new CounterTargetEffect();
effect.setText("counter that spell or ability");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(new KiraGreatGlassSpinnerAbility(effect), Duration.WhileOnBattlefield, new FilterCreaturePermanent("Creatures you control"))),
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(new KiraGreatGlassSpinnerAbility(effect), Duration.WhileOnBattlefield, new FilterCreaturePermanent("creatures"))),
new CreatureWasTargetedThisTurnWatcher());
}

View file

@ -40,12 +40,15 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.cards.MeldCard;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.PermanentCard;
import mage.game.permanent.PermanentMeld;
import mage.players.Player;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.targetpointer.FixedTargets;
@ -105,7 +108,18 @@ class EerieInterludeEffect extends OneShotEffect {
Cards cardsToReturn = new CardsImpl();
for (Card exiled : toExile) {
if (((Permanent) exiled).getZoneChangeCounter(game) == game.getState().getZoneChangeCounter(exiled.getId()) - 1) {
if (exiled instanceof PermanentMeld) {
MeldCard meldCard = (MeldCard) ((PermanentCard) exiled).getCard();
Card topCard = meldCard.getTopHalfCard();
Card bottomCard = meldCard.getBottomHalfCard();
if (topCard.getZoneChangeCounter(game) == meldCard.getTopLastZoneChangeCounter()) {
cardsToReturn.add(topCard);
}
if (bottomCard.getZoneChangeCounter(game) == meldCard.getBottomLastZoneChangeCounter()) {
cardsToReturn.add(bottomCard);
}
}
else if (exiled.getZoneChangeCounter(game) == game.getState().getZoneChangeCounter(exiled.getId()) - 1) {
cardsToReturn.add(exiled);
}
}

View file

@ -29,24 +29,16 @@ package mage.sets.bornofthegods;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.PayCostToAttackBlockEffectImpl;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.combat.CantAttackBlockUnlessPaysSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.players.Player;
import mage.target.common.TargetControlledPermanent;
/**
@ -84,53 +76,3 @@ public class FloodtideSerpent extends CardImpl {
return new FloodtideSerpent(this);
}
}
class FloodtideSerpentReplacementEffect extends ReplacementEffectImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an enchantment you control");
static {
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
}
FloodtideSerpentReplacementEffect() {
super(Duration.WhileOnBattlefield, Outcome.Neutral);
staticText = "{this} can't attack unless you return an enchantment you control to its owner's hand <i>(This cost is paid as attackers are declared.)</i>";
}
FloodtideSerpentReplacementEffect(FloodtideSerpentReplacementEffect effect) {
super(effect);
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player player = game.getPlayer(event.getPlayerId());
if (player != null) {
ReturnToHandChosenControlledPermanentCost attackCost = new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter));
if (attackCost.canPay(source, source.getSourceId(), event.getPlayerId(), game)
&& player.chooseUse(Outcome.Neutral, "Return an enchantment you control to hand to attack?", source, game)) {
if (attackCost.pay(source, game, source.getSourceId(), event.getPlayerId(), true, null)) {
return false;
}
}
return true;
}
return false;
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == EventType.DECLARE_ATTACKER;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
return event.getSourceId().equals(source.getSourceId());
}
@Override
public FloodtideSerpentReplacementEffect copy() {
return new FloodtideSerpentReplacementEffect(this);
}
}

View file

@ -46,8 +46,6 @@ import mage.filter.common.FilterCreaturePermanent;
*/
public class DanceOfShadows extends CardImpl {
static private FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures you control");
public DanceOfShadows (UUID ownerId) {
super(ownerId, 108, "Dance of Shadows", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{B}{B}");
this.expansionSetCode = "CHK";
@ -55,12 +53,12 @@ public class DanceOfShadows extends CardImpl {
// Creatures you control get +1/+0 and gain fear until end of turn. (They can't be blocked except by artifact creatures and/or black creatures.)
Effect effect = new BoostControlledEffect(1, 0, Duration.EndOfTurn, filter);
Effect effect = new BoostControlledEffect(1, 0, Duration.EndOfTurn, new FilterCreaturePermanent());
effect.setText("Creatures you control get +1/+0");
this.getSpellAbility().addEffect(effect);
effect = new BoostControlledEffect(1, 0, Duration.EndOfTurn, filter);
effect = new GainAbilityControlledEffect(FearAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent());
effect.setText("and gain fear until end of turn");
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(FearAbility.getInstance(), Duration.EndOfTurn, filter));
this.getSpellAbility().addEffect(effect);
}
public DanceOfShadows (final DanceOfShadows card) {

View file

@ -0,0 +1,88 @@
/*
* 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.chronicles;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.OpponentControlsPermanentCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.permanent.TokenPredicate;
/**
*
* @author nigelzor
*/
public class BeastsOfBogardan extends CardImpl {
private static final FilterCard protectionFilter = new FilterCard("red");
private static final FilterPermanent controlFilter = new FilterPermanent("nontoken white permanent");
static {
protectionFilter.add(new ColorPredicate(ObjectColor.RED));
controlFilter.add(new ColorPredicate(ObjectColor.WHITE));
controlFilter.add(Predicates.not(new TokenPredicate()));
}
public BeastsOfBogardan(UUID ownerId) {
super(ownerId, 45, "Beasts of Bogardan", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}");
this.expansionSetCode = "CHR";
this.subtype.add("Beast");
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Protection from red
this.addAbility(new ProtectionAbility(protectionFilter));
// Beasts of Bogardan gets +1/+1 as long as an opponent controls a nontoken white permanent.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield),
new OpponentControlsPermanentCondition(controlFilter),
"{this} gets +1/+1 as long as an opponent controls a nontoken white permanent")));
}
public BeastsOfBogardan(final BeastsOfBogardan card) {
super(card);
}
@Override
public BeastsOfBogardan copy() {
return new BeastsOfBogardan(this);
}
}

View file

@ -34,21 +34,21 @@ import mage.constants.Rarity;
*
* @author LevelX2
*/
public class UrzasMine extends mage.sets.fifthedition.UrzasMine {
public class UrzasMine1 extends mage.sets.fifthedition.UrzasMine {
public UrzasMine(UUID ownerId) {
public UrzasMine1(UUID ownerId) {
super(ownerId);
this.cardNumber = 94;
this.expansionSetCode = "CHR";
this.rarity = Rarity.UNCOMMON;
}
public UrzasMine(final UrzasMine card) {
public UrzasMine1(final UrzasMine1 card) {
super(card);
}
@Override
public UrzasMine copy() {
return new UrzasMine(this);
public UrzasMine1 copy() {
return new UrzasMine1(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* 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.chronicles;
import java.util.UUID;
/**
*
* @author fwannmacher
*/
public class UrzasMine2 extends UrzasMine1 {
public UrzasMine2(UUID ownerId) {
super(ownerId);
this.cardNumber = 95;
}
public UrzasMine2(final UrzasMine2 card) {
super(card);
}
@Override
public UrzasMine2 copy() {
return new UrzasMine2(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* 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.chronicles;
import java.util.UUID;
/**
*
* @author fwannmacher
*/
public class UrzasMine3 extends UrzasMine1 {
public UrzasMine3(UUID ownerId) {
super(ownerId);
this.cardNumber = 96;
}
public UrzasMine3(final UrzasMine3 card) {
super(card);
}
@Override
public UrzasMine3 copy() {
return new UrzasMine3(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* 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.chronicles;
import java.util.UUID;
/**
*
* @author fwannmacher
*/
public class UrzasMine4 extends UrzasMine1 {
public UrzasMine4(UUID ownerId) {
super(ownerId);
this.cardNumber = 97;
}
public UrzasMine4(final UrzasMine4 card) {
super(card);
}
@Override
public UrzasMine4 copy() {
return new UrzasMine4(this);
}
}

View file

@ -34,21 +34,21 @@ import mage.constants.Rarity;
*
* @author LevelX2
*/
public class UrzasPowerPlant extends mage.sets.fifthedition.UrzasPowerPlant {
public class UrzasPowerPlant1 extends mage.sets.fifthedition.UrzasPowerPlant {
public UrzasPowerPlant(UUID ownerId) {
public UrzasPowerPlant1(UUID ownerId) {
super(ownerId);
this.cardNumber = 98;
this.expansionSetCode = "CHR";
this.rarity = Rarity.UNCOMMON;
}
public UrzasPowerPlant(final UrzasPowerPlant card) {
public UrzasPowerPlant1(final UrzasPowerPlant1 card) {
super(card);
}
@Override
public UrzasPowerPlant copy() {
return new UrzasPowerPlant(this);
public UrzasPowerPlant1 copy() {
return new UrzasPowerPlant1(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* 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.chronicles;
import java.util.UUID;
/**
*
* @author fwannmacher
*/
public class UrzasPowerPlant2 extends UrzasPowerPlant1 {
public UrzasPowerPlant2(UUID ownerId) {
super(ownerId);
this.cardNumber = 99;
}
public UrzasPowerPlant2(final UrzasPowerPlant2 card) {
super(card);
}
@Override
public UrzasPowerPlant2 copy() {
return new UrzasPowerPlant2(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* 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.chronicles;
import java.util.UUID;
/**
*
* @author fwannmacher
*/
public class UrzasPowerPlant3 extends UrzasPowerPlant1 {
public UrzasPowerPlant3(UUID ownerId) {
super(ownerId);
this.cardNumber = 100;
}
public UrzasPowerPlant3(final UrzasPowerPlant3 card) {
super(card);
}
@Override
public UrzasPowerPlant3 copy() {
return new UrzasPowerPlant3(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* 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.chronicles;
import java.util.UUID;
/**
*
* @author fwannmacher
*/
public class UrzasPowerPlant4 extends UrzasPowerPlant1 {
public UrzasPowerPlant4(UUID ownerId) {
super(ownerId);
this.cardNumber = 101;
}
public UrzasPowerPlant4(final UrzasPowerPlant4 card) {
super(card);
}
@Override
public UrzasPowerPlant4 copy() {
return new UrzasPowerPlant4(this);
}
}

View file

@ -34,21 +34,21 @@ import mage.constants.Rarity;
*
* @author LevelX2
*/
public class UrzasTower extends mage.sets.fifthedition.UrzasTower {
public class UrzasTower1 extends mage.sets.fifthedition.UrzasTower {
public UrzasTower(UUID ownerId) {
public UrzasTower1(UUID ownerId) {
super(ownerId);
this.cardNumber = 102;
this.expansionSetCode = "CHR";
this.rarity = Rarity.UNCOMMON;
}
public UrzasTower(final UrzasTower card) {
public UrzasTower1(final UrzasTower1 card) {
super(card);
}
@Override
public UrzasTower copy() {
return new UrzasTower(this);
public UrzasTower1 copy() {
return new UrzasTower1(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* 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.chronicles;
import java.util.UUID;
/**
*
* @author fwannmacher
*/
public class UrzasTower2 extends UrzasTower1 {
public UrzasTower2(UUID ownerId) {
super(ownerId);
this.cardNumber = 103;
}
public UrzasTower2(final UrzasTower2 card) {
super(card);
}
@Override
public UrzasTower2 copy() {
return new UrzasTower2(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* 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.chronicles;
import java.util.UUID;
/**
*
* @author fwannmacher
*/
public class UrzasTower3 extends UrzasTower1 {
public UrzasTower3(UUID ownerId) {
super(ownerId);
this.cardNumber = 104;
}
public UrzasTower3(final UrzasTower3 card) {
super(card);
}
@Override
public UrzasTower3 copy() {
return new UrzasTower3(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* 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.chronicles;
import java.util.UUID;
/**
*
* @author fwannmacher
*/
public class UrzasTower4 extends UrzasTower1 {
public UrzasTower4(UUID ownerId) {
super(ownerId);
this.cardNumber = 105;
}
public UrzasTower4(final UrzasTower4 card) {
super(card);
}
@Override
public UrzasTower4 copy() {
return new UrzasTower4(this);
}
}

View file

@ -32,8 +32,8 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -50,7 +50,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
*/
public class LovisaColdeyes extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control that's a Barbarian, a Warrior, or a Berserker");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that's a Barbarian, a Warrior, or a Berserker");
static {
filter.add(Predicates.or(new SubtypePredicate("Barbarian"), new SubtypePredicate("Warrior"), new SubtypePredicate("Berserker")));
@ -64,11 +64,11 @@ public class LovisaColdeyes extends CardImpl {
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Each creature you control that's a Barbarian, a Warrior, or a Berserker gets +2/+2 and has haste.
Effect effect = new BoostControlledEffect(2, 2, Duration.WhileOnBattlefield, filter, false);
effect.setText("Each creature you control that's a Barbarian, a Warrior, or a Berserker gets +2/+2");
// Each creature that's a Barbarian, a Warrior, or a Berserker gets +2/+2 and has haste.
Effect effect = new BoostAllEffect(2, 2, Duration.WhileOnBattlefield, filter, false);
effect.setText("Each creature that's a Barbarian, a Warrior, or a Berserker gets +2/+2");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
effect = new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter, false);
effect = new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter, false);
effect.setText("and has haste");
ability.addEffect(effect);
this.addAbility(ability);

View file

@ -69,7 +69,7 @@ public class CrosissCharm extends CardImpl {
this.getSpellAbility().addMode(mode);
// or destroy target artifact.
mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect(true));
mode.getEffects().add(new DestroyTargetEffect());
Target target = new TargetArtifactPermanent();
mode.getTargets().add(target);
this.getSpellAbility().addMode(mode);

View file

@ -102,6 +102,7 @@ class DaxosSpiritToken extends Token {
DaxosSpiritToken() {
super("Spirit", "white and black Spirit enchantment creature token with \"This creature's power and toughness are each equal to the number of experience counters you have.\"");
this.setOriginalExpansionSetCode("C15");
setTokenType(2);
cardType.add(CardType.ENCHANTMENT);
cardType.add(CardType.CREATURE);
color.setWhite(true);

View file

@ -31,16 +31,15 @@ import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyAllEffect;
import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterNonlandPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
@ -103,7 +102,7 @@ class CoercivePortalEffect extends OneShotEffect {
}
if (carnageCount > homageCount) {
new SacrificeSourceEffect().apply(game, source);
new CoercivePortalDestroyEffect().apply(game, source);
new DestroyAllEffect(new FilterNonlandPermanent()).apply(game, source);
} else {
controller.drawCards(1, game);
}
@ -112,31 +111,3 @@ class CoercivePortalEffect extends OneShotEffect {
return false;
}
}
class CoercivePortalDestroyEffect extends OneShotEffect {
private static final FilterPermanent filter = new FilterNonlandPermanent();
public CoercivePortalDestroyEffect() {
super(Outcome.DestroyPermanent);
staticText = "sacrifice Coercive Portal and destroy all nonland permanents";
}
public CoercivePortalDestroyEffect(final CoercivePortalDestroyEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
permanent.destroy(source.getSourceId(), game, false);
}
return true;
}
@Override
public CoercivePortalDestroyEffect copy() {
return new CoercivePortalDestroyEffect(this);
}
}

View file

@ -58,7 +58,7 @@ public class LostInTheWoods extends CardImpl {
// Whenever a creature attacks you or a planeswalker you control, reveal the top card of your library. If it's a Forest card, remove that creature from combat. Then put the revealed card on the bottom of your library.
this.addAbility(new AttacksAllTriggeredAbility(new LostInTheWoodsEffect(), true, new FilterCreaturePermanent(), SetTargetPointer.PERMANENT, true));
this.addAbility(new AttacksAllTriggeredAbility(new LostInTheWoodsEffect(), false, new FilterCreaturePermanent(), SetTargetPointer.PERMANENT, true));
}
public LostInTheWoods(final LostInTheWoods card) {

View file

@ -0,0 +1,213 @@
/*
* 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.darksteel;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.EquipAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
import mage.game.events.DamagedPlayerEvent;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetCard;
import mage.util.CardUtil;
import org.apache.log4j.Logger;
/**
*
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
*/
public class Spellbinder extends CardImpl {
public Spellbinder(UUID ownerId) {
super(ownerId, 143, "Spellbinder", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}");
this.expansionSetCode = "DST";
this.subtype.add("Equipment");
// Imprint - When Spellbinder enters the battlefield, you may exile an instant card from your hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SpellbinderImprintEffect(), true, "<i>Imprint &mdash; </i>"));
// Whenever equipped creature deals combat damage to a player, you may copy the exiled card. If you do, you may cast the copy without paying its mana cost.
this.addAbility(new SpellbinderTriggeredAbility());
// Equip {4}
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(4)));
}
public Spellbinder(final Spellbinder card) {
super(card);
}
@Override
public Spellbinder copy() {
return new Spellbinder(this);
}
}
class SpellbinderTriggeredAbility extends TriggeredAbilityImpl {
SpellbinderTriggeredAbility() {
super(Zone.BATTLEFIELD, new SpellbinderCopyEffect(), true);
}
SpellbinderTriggeredAbility(final SpellbinderTriggeredAbility ability) {
super(ability);
}
@Override
public SpellbinderTriggeredAbility copy() {
return new SpellbinderTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == EventType.DAMAGED_PLAYER;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
DamagedPlayerEvent damageEvent = (DamagedPlayerEvent) event;
Permanent p = game.getPermanent(event.getSourceId());
return damageEvent.isCombatDamage() && p != null && p.getAttachments().contains(this.getSourceId());
}
@Override
public String getRule() {
return "Whenever equipped creature deals combat damage to a player, you may copy the exiled card. If you do, you may cast the copy without paying its mana cost.";
}
}
class SpellbinderImprintEffect extends OneShotEffect {
private static final FilterCard filter = new FilterCard("instant card");
static {
filter.add(new CardTypePredicate(CardType.INSTANT));
}
public SpellbinderImprintEffect() {
super(Outcome.Benefit);
staticText = "you may exile an instant card from your hand";
}
public SpellbinderImprintEffect(SpellbinderImprintEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
if (controller != null) {
if (controller.getHand().size() > 0) {
TargetCard target = new TargetCard(Zone.HAND, filter);
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
&& controller.choose(Outcome.Benefit, controller.getHand(), target, game)) {
Card card = controller.getHand().get(target.getFirstTarget(), game);
if (card != null) {
controller.moveCardToExileWithInfo(card, source.getSourceId(), sourcePermanent.getIdName() + " (Imprint)", source.getSourceId(), game, Zone.HAND, true);
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
permanent.imprint(card.getId(), game);
permanent.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card - " + card.getLogName() + "]"), game);
}
}
}
}
return true;
}
return false;
}
@Override
public SpellbinderImprintEffect copy() {
return new SpellbinderImprintEffect(this);
}
}
class SpellbinderCopyEffect extends OneShotEffect {
public SpellbinderCopyEffect() {
super(Outcome.Copy);
this.staticText = "You may copy the exiled card. If you do, you may cast the copy without paying its mana cost";
}
public SpellbinderCopyEffect(final SpellbinderCopyEffect effect) {
super(effect);
}
@Override
public SpellbinderCopyEffect copy() {
return new SpellbinderCopyEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Permanent spellbinder = game.getPermanentOrLKIBattlefield(source.getSourceId());
if (spellbinder != null && spellbinder.getImprinted() != null && !spellbinder.getImprinted().isEmpty()) {
Card imprintedInstant = game.getCard(spellbinder.getImprinted().get(0));
if (imprintedInstant != null && game.getState().getZone(imprintedInstant.getId()).equals(Zone.EXILED)) {
if (controller.chooseUse(outcome, new StringBuilder("Create a copy of ").append(imprintedInstant.getName()).append("?").toString(), source, game)) {
Card copiedCard = game.copyCard(imprintedInstant, source, source.getControllerId());
if (copiedCard != null) {
game.getExile().add(source.getSourceId(), "", copiedCard);
game.getState().setZone(copiedCard.getId(), Zone.EXILED);
if (controller.chooseUse(outcome, "Cast the copied card without paying mana cost?", source, game)) {
if (copiedCard.getSpellAbility() != null) {
controller.cast(copiedCard.getSpellAbility(), game, true);
} else {
Logger.getLogger(SpellbinderCopyEffect.class).error("Spellbinder: spell ability == null " + copiedCard.getName());
}
}
}
}
}
}
return true;
}
return false;
}
}

View file

@ -179,7 +179,7 @@ class DevelopmentEffect extends OneShotEffect {
}
}
if (putToken) {
new CreateTokenEffect(new ElementalToken()).apply(game, source);
new CreateTokenEffect(new ElementalToken("DIS", 1)).apply(game, source);
}
}

View file

@ -42,7 +42,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.stack.Spell;
@ -72,7 +72,7 @@ public class DragonlordKolaghan extends CardImpl {
// Other creatures you control have haste.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent(), true)));
new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent(), true)));
// Whenever an opponent casts a creature or planeswalker spell with the same name as a card in their graveyard, that player loses 10 life.
Effect effect = new LoseLifeTargetEffect(10);

View file

@ -29,12 +29,15 @@ package mage.sets.dragonsoftarkir;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.common.AttackingCreatureCount;
import mage.abilities.dynamicvalue.common.AttackingFilterCreatureCount;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetOpponent;
@ -67,6 +70,11 @@ public class FoulTongueShriek extends CardImpl {
class FoulTongueShriekEffect extends OneShotEffect {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
static {
filter.add(new ControllerPredicate(TargetController.YOU));
}
public FoulTongueShriekEffect() {
super(Outcome.Benefit);
this.staticText = "Target opponent loses 1 life for each attacking creature you control. You gain that much life";
@ -86,7 +94,7 @@ class FoulTongueShriekEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
Player targetOpponent = game.getPlayer(getTargetPointer().getFirst(game, source));
if (controller != null && targetOpponent != null) {
int amount = new AttackingCreatureCount().calculate(game, source, this);
int amount = new AttackingFilterCreatureCount(filter).calculate(game, source, this);
if (amount > 0) {
targetOpponent.loseLife(amount, game);
controller.gainLife(amount, game);

View file

@ -34,7 +34,7 @@ import mage.abilities.keyword.MadnessAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.target.common.TargetCreatureOrPlayer;
import mage.target.common.TargetCreaturePermanent;
/**
*
@ -48,7 +48,8 @@ public class AlchemistsGreeting extends CardImpl {
// Alchemist's Greeting deals 4 damage to target creature.
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// Madness {1}{R}
this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{R}")));
}

View file

@ -30,6 +30,7 @@ package mage.sets.eldritchmoon;
import java.util.UUID;
import mage.abilities.Mode;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.GainLifeTargetEffect;
import mage.abilities.effects.common.SacrificeEffect;
import mage.abilities.effects.common.UntapTargetEffect;
@ -37,10 +38,13 @@ import mage.abilities.keyword.EscalateAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.filter.FilterPlayer;
import mage.filter.common.FilterAttackingCreature;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.other.PlayerPredicate;
import mage.target.TargetPlayer;
import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetOpponent;
/**
*
@ -48,6 +52,14 @@ import mage.target.common.TargetOpponent;
*/
public class BlessedAlliance extends CardImpl {
private static final FilterPlayer filterSacrifice = new FilterPlayer("opponent to sacrifice an attacking creature");
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creatures to untap");
private static final FilterPlayer filterGainLife = new FilterPlayer("player to gain life");
static {
filterSacrifice.add(new PlayerPredicate(TargetController.OPPONENT));
}
public BlessedAlliance(UUID ownerId) {
super(ownerId, 13, "Blessed Alliance", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}");
this.expansionSetCode = "EMN";
@ -60,19 +72,23 @@ public class BlessedAlliance extends CardImpl {
this.getSpellAbility().getModes().setMaxModes(3);
// Target player gains 4 life.
this.getSpellAbility().addEffect(new GainLifeTargetEffect(4));
this.getSpellAbility().addTarget(new TargetPlayer());
Effect effect = new GainLifeTargetEffect(4);
effect.setText("Target player gains 4 life");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetPlayer(1, 1, false, filterGainLife));
// Untap up to two target creatures.
Mode mode = new Mode();
mode.getEffects().add(new UntapTargetEffect());
mode.getTargets().add(new TargetCreaturePermanent(0, 2));
effect = new UntapTargetEffect();
effect.setText("Untap up to two target creatures");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetCreaturePermanent(0, 2, filterCreature, false));
this.getSpellAbility().addMode(mode);
// Target opponent sacrifices an attacking creature.
mode = new Mode();
mode.getEffects().add(new SacrificeEffect(new FilterAttackingCreature(), 1, "Target player"));
mode.getTargets().add(new TargetOpponent());
mode.getEffects().add(new SacrificeEffect(new FilterAttackingCreature(), 1, "Target opponent"));
mode.getTargets().add(new TargetPlayer(1, 1, false, filterSacrifice));
this.getSpellAbility().addMode(mode);
}

View file

@ -30,7 +30,8 @@ package mage.sets.eldritchmoon;
import java.util.UUID;
import mage.abilities.Mode;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.EscalateAbility;
import mage.abilities.keyword.FirstStrikeAbility;
@ -38,6 +39,7 @@ import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
/**
@ -46,24 +48,32 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class BorrowedHostility extends CardImpl {
private static final FilterCreaturePermanent filterBoost = new FilterCreaturePermanent("creature to get +3/+0");
private static final FilterCreaturePermanent filterFirstStrike = new FilterCreaturePermanent("creature to gain first strike");
public BorrowedHostility(UUID ownerId) {
super(ownerId, 121, "Borrowed Hostility", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}");
this.expansionSetCode = "EMN";
// Escalate {3}
this.addAbility(new EscalateAbility(new ManaCostsImpl<>("{3}")));
// Choose one or both &mdash;
this.getSpellAbility().getModes().setMinModes(1);
this.getSpellAbility().getModes().setMaxModes(2);
// Target creature gets +3/+0 until end of turn.;
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new BoostControlledEffect(3, 0, Duration.EndOfTurn));
Effect effect = new BoostTargetEffect(3, 0, Duration.EndOfTurn);
effect.setText("Target creature gets +3/+0 until end of turn");
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterBoost));
this.getSpellAbility().addEffect(effect);
// Target creature gains first strike until end of turn.
Mode mode = new Mode();
mode.getEffects().add(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn));
mode.getTargets().add(new TargetCreaturePermanent());
effect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
effect.setText("Target creature gains first strike until end of turn");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetCreaturePermanent(filterFirstStrike));
this.getSpellAbility().addMode(mode);
}

View file

@ -37,7 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.LifelinkAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.MeldCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
@ -52,7 +52,7 @@ import mage.game.stack.Spell;
*
* @author LevelX2
*/
public class BriselaVoiceOfNightmares extends CardImpl {
public class BriselaVoiceOfNightmares extends MeldCard {
public BriselaVoiceOfNightmares(UUID ownerId) {
super(ownerId, 15, "Brisela, Voice of Nightmares", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "");
@ -67,12 +67,16 @@ public class BriselaVoiceOfNightmares extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// First strike
this.addAbility(FirstStrikeAbility.getInstance());
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Lifelink
this.addAbility(LifelinkAbility.getInstance());
// Your opponents can't cast spells with converted mana cost 3 or less.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BriselaVoiceOfNightmaresCantCastEffect()));
}

View file

@ -31,6 +31,7 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CastSourceTriggeredAbility;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
@ -70,7 +71,9 @@ public class BrunaTheFadingLight extends CardImpl {
this.toughness = new MageInt(7);
// When you cast Bruna, the Fading Light, you may return target Angel or Human creature card from your graveyard to the battlefield.
Ability ability = new CastSourceTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), true);
Effect effect = new ReturnFromGraveyardToBattlefieldTargetEffect();
effect.setText("you may return target Angel or Human creature card from your graveyard to the battlefield");
Ability ability = new CastSourceTriggeredAbility(effect, true);
ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability);

View file

@ -53,7 +53,7 @@ public class CemeteryRecruitment extends CardImpl {
// Return target creature card from your graveyard to your hand. If it's a Zombie card, draw a card.
this.getSpellAbility().addEffect(new CemeteryRecruitmentEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 1, new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
}
public CemeteryRecruitment(final CemeteryRecruitment card) {

View file

@ -68,7 +68,7 @@ class CertainDeathEffect extends OneShotEffect {
public CertainDeathEffect() {
super(Outcome.DestroyPermanent);
this.staticText = "Destroy target creature. Its controler loses 2 life and you gain 2 life";
this.staticText = "Destroy target creature. Its controller loses 2 life and you gain 2 life";
}
public CertainDeathEffect(final CertainDeathEffect effect) {

View file

@ -36,7 +36,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.cards.MeldCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -46,7 +46,7 @@ import mage.filter.common.FilterControlledCreaturePermanent;
*
* @author LevelX2
*/
public class ChitteringHost extends CardImpl {
public class ChitteringHost extends MeldCard {
public ChitteringHost(UUID ownerId) {
super(ownerId, 96, "Chittering Host", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "");
@ -57,18 +57,21 @@ public class ChitteringHost extends CardImpl {
this.toughness = new MageInt(6);
this.nightCard = true; // Meld card
// Haste
this.addAbility(HasteAbility.getInstance());
// Menace <i>(This creature can't be blocked except by two or more creatures.
this.addAbility(new MenaceAbility());
// When Chittering Host enters the battlefield, other creatures you control get +1/+0 and gain menace until end of turn.
Effect effect = new BoostControlledEffect(1, 0, Duration.EndOfTurn, true);
effect.setText("other creatures you control get +1/+0");
Ability ability = new EntersBattlefieldTriggeredAbility(effect, false);
effect = new GainAbilityAllEffect(new MenaceAbility(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("other creatures"), true);
effect.setText("and gain menace until end of turn");
ability.addEffect(effect);
this.addAbility(ability);
}
public ChitteringHost(final ChitteringHost card) {

Some files were not shown because too many files have changed in this diff Show more