mirror of
https://github.com/magefree/mage.git
synced 2026-01-22 19:29:59 -08:00
commit
897fca52eb
58 changed files with 2735 additions and 105 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.1" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
|
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="1" attributes="0">
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
|
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
|
||||||
<Component id="pnlPacks" alignment="1" pref="563" max="32767" attributes="0"/>
|
<Component id="pnlPacks" alignment="1" max="32767" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
|
@ -41,9 +41,14 @@
|
||||||
<Component id="jLabel1" alignment="1" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel1" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="1" attributes="0">
|
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||||
<Component id="txtName" pref="470" max="32767" attributes="0"/>
|
<Component id="txtName" max="32767" attributes="0"/>
|
||||||
<Component id="cbTournamentType" alignment="0" pref="470" max="32767" attributes="0"/>
|
<Component id="cbTournamentType" pref="420" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace type="unrelated" max="32767" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Component id="spnNumWins" alignment="0" min="-2" pref="50" max="-2" attributes="0"/>
|
||||||
|
<Component id="lblNumWins" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<Group type="102" alignment="1" attributes="0">
|
||||||
|
|
@ -59,25 +64,34 @@
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
<Component id="txtName" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Group type="102" attributes="0">
|
||||||
<Component id="lblName" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
</Group>
|
<Component id="txtName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<Component id="lblName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
</Group>
|
||||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="cbTournamentType" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
|
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="cbTournamentType" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" attributes="0">
|
||||||
|
<Component id="lblNumWins" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||||
|
<Component id="spnNumWins" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="pnlPacks" pref="61" max="32767" attributes="0"/>
|
<Component id="pnlPacks" pref="63" max="32767" attributes="0"/>
|
||||||
<EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="spnNumPlayers" alignment="0" pref="24" max="32767" attributes="1"/>
|
<Component id="spnNumPlayers" alignment="0" pref="26" max="32767" attributes="1"/>
|
||||||
<Component id="pnlDraftOptions" max="32767" attributes="1"/>
|
<Component id="pnlDraftOptions" max="32767" attributes="1"/>
|
||||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||||
|
|
@ -152,7 +166,7 @@
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<Group type="102" alignment="1" attributes="0">
|
||||||
<Group type="103" groupAlignment="1" attributes="0">
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
<Component id="pnlOtherPlayers" alignment="0" pref="563" max="32767" attributes="0"/>
|
<Component id="pnlOtherPlayers" alignment="0" max="32767" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="483" max="-2" attributes="0"/>
|
<EmptySpace pref="483" max="-2" attributes="0"/>
|
||||||
|
|
@ -160,7 +174,7 @@
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="txtPlayer1Name" pref="528" max="32767" attributes="0"/>
|
<Component id="txtPlayer1Name" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
|
|
@ -269,5 +283,15 @@
|
||||||
</Component>
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
|
<Component class="javax.swing.JLabel" name="lblNumWins">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Wins"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JSpinner" name="spnNumWins">
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="spnNumWinsnumPlayersChanged"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
public NewTournamentDialog() {
|
public NewTournamentDialog() {
|
||||||
initComponents();
|
initComponents();
|
||||||
txtName.setText("Tournament");
|
txtName.setText("Tournament");
|
||||||
|
this.spnNumWins.setModel(new SpinnerNumberModel(2, 1, 5, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showDialog(UUID roomId) {
|
public void showDialog(UUID roomId) {
|
||||||
|
|
@ -114,6 +115,8 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
pnlDraftOptions = new javax.swing.JPanel();
|
pnlDraftOptions = new javax.swing.JPanel();
|
||||||
jLabel6 = new javax.swing.JLabel();
|
jLabel6 = new javax.swing.JLabel();
|
||||||
cbDraftTiming = new javax.swing.JComboBox();
|
cbDraftTiming = new javax.swing.JComboBox();
|
||||||
|
lblNumWins = new javax.swing.JLabel();
|
||||||
|
spnNumWins = new javax.swing.JSpinner();
|
||||||
|
|
||||||
setTitle("New Tournament");
|
setTitle("New Tournament");
|
||||||
|
|
||||||
|
|
@ -150,7 +153,7 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
|
|
||||||
pnlPacks.setLayout(new java.awt.GridLayout(0, 1, 2, 0));
|
pnlPacks.setLayout(new java.awt.GridLayout(0, 1, 2, 0));
|
||||||
|
|
||||||
jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11));
|
jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
|
||||||
jLabel3.setText("Player 1 (You)");
|
jLabel3.setText("Player 1 (You)");
|
||||||
|
|
||||||
jLabel4.setText("Name:");
|
jLabel4.setText("Name:");
|
||||||
|
|
@ -165,14 +168,14 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
||||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
.addComponent(pnlOtherPlayers, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 563, Short.MAX_VALUE)
|
.addComponent(pnlOtherPlayers, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
|
||||||
.addComponent(jLabel3)
|
.addComponent(jLabel3)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 483, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 483, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
|
||||||
.addComponent(jLabel4)
|
.addComponent(jLabel4)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(txtPlayer1Name, javax.swing.GroupLayout.DEFAULT_SIZE, 528, Short.MAX_VALUE)))
|
.addComponent(txtPlayer1Name)))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
jPanel1Layout.setVerticalGroup(
|
jPanel1Layout.setVerticalGroup(
|
||||||
|
|
@ -187,7 +190,7 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
.addComponent(pnlOtherPlayers, javax.swing.GroupLayout.DEFAULT_SIZE, 91, Short.MAX_VALUE))
|
.addComponent(pnlOtherPlayers, javax.swing.GroupLayout.DEFAULT_SIZE, 91, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
|
|
||||||
jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11));
|
jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
|
||||||
jLabel5.setText("Packs");
|
jLabel5.setText("Packs");
|
||||||
|
|
||||||
lblName.setText("Name:");
|
lblName.setText("Name:");
|
||||||
|
|
@ -214,6 +217,14 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
.addComponent(jLabel6))
|
.addComponent(jLabel6))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
lblNumWins.setText("Wins");
|
||||||
|
|
||||||
|
spnNumWins.addChangeListener(new javax.swing.event.ChangeListener() {
|
||||||
|
public void stateChanged(javax.swing.event.ChangeEvent evt) {
|
||||||
|
spnNumWinsnumPlayersChanged(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||||
getContentPane().setLayout(layout);
|
getContentPane().setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
|
|
@ -222,7 +233,7 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(pnlPacks, javax.swing.GroupLayout.DEFAULT_SIZE, 563, Short.MAX_VALUE)
|
.addComponent(pnlPacks, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||||
.addComponent(jLabel2)
|
.addComponent(jLabel2)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
|
@ -235,9 +246,13 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
.addComponent(lblName)
|
.addComponent(lblName)
|
||||||
.addComponent(jLabel1))
|
.addComponent(jLabel1))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||||
.addComponent(txtName, javax.swing.GroupLayout.DEFAULT_SIZE, 470, Short.MAX_VALUE)
|
.addComponent(txtName)
|
||||||
.addComponent(cbTournamentType, javax.swing.GroupLayout.Alignment.LEADING, 0, 470, Short.MAX_VALUE)))
|
.addComponent(cbTournamentType, 0, 420, Short.MAX_VALUE))
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(spnNumWins, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(lblNumWins)))
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addComponent(btnOk)
|
.addComponent(btnOk)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
|
@ -248,20 +263,26 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
.addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addComponent(lblName))
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addComponent(lblName))
|
||||||
.addComponent(jLabel1)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(cbTournamentType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
|
.addComponent(jLabel1)
|
||||||
|
.addComponent(cbTournamentType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||||
|
.addGroup(layout.createSequentialGroup()
|
||||||
|
.addComponent(lblNumWins)
|
||||||
|
.addGap(0, 0, 0)
|
||||||
|
.addComponent(spnNumWins, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(jLabel5)
|
.addComponent(jLabel5)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(pnlPacks, javax.swing.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE)
|
.addComponent(pnlPacks, javax.swing.GroupLayout.DEFAULT_SIZE, 63, Short.MAX_VALUE)
|
||||||
.addGap(11, 11, 11)
|
.addGap(11, 11, 11)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(spnNumPlayers, javax.swing.GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE)
|
.addComponent(spnNumPlayers, javax.swing.GroupLayout.DEFAULT_SIZE, 26, Short.MAX_VALUE)
|
||||||
.addComponent(pnlDraftOptions, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(pnlDraftOptions, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(jLabel2))
|
.addComponent(jLabel2))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
|
@ -301,7 +322,7 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tOptions.getMatchOptions().setDeckType("Limited");
|
tOptions.getMatchOptions().setDeckType("Limited");
|
||||||
tOptions.getMatchOptions().setWinsNeeded(2);
|
tOptions.getMatchOptions().setWinsNeeded((Integer)this.spnNumWins.getValue());
|
||||||
tOptions.getMatchOptions().setAttackOption(MultiplayerAttackOption.LEFT);
|
tOptions.getMatchOptions().setAttackOption(MultiplayerAttackOption.LEFT);
|
||||||
tOptions.getMatchOptions().setRange(RangeOfInfluence.ALL);
|
tOptions.getMatchOptions().setRange(RangeOfInfluence.ALL);
|
||||||
tOptions.getMatchOptions().setLimited(true);
|
tOptions.getMatchOptions().setLimited(true);
|
||||||
|
|
@ -340,6 +361,10 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
createPlayers(numPlayers);
|
createPlayers(numPlayers);
|
||||||
}//GEN-LAST:event_spnNumPlayersStateChanged
|
}//GEN-LAST:event_spnNumPlayersStateChanged
|
||||||
|
|
||||||
|
private void spnNumWinsnumPlayersChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spnNumWinsnumPlayersChanged
|
||||||
|
// TODO add your handling code here:
|
||||||
|
}//GEN-LAST:event_spnNumWinsnumPlayersChanged
|
||||||
|
|
||||||
private void setTournamentOptions() {
|
private void setTournamentOptions() {
|
||||||
TournamentTypeView tournamentType = (TournamentTypeView) cbTournamentType.getSelectedItem();
|
TournamentTypeView tournamentType = (TournamentTypeView) cbTournamentType.getSelectedItem();
|
||||||
this.spnNumPlayers.setModel(new SpinnerNumberModel(tournamentType.getMinPlayers(), tournamentType.getMinPlayers(), tournamentType.getMaxPlayers(), 1));
|
this.spnNumPlayers.setModel(new SpinnerNumberModel(tournamentType.getMinPlayers(), tournamentType.getMinPlayers(), tournamentType.getMaxPlayers(), 1));
|
||||||
|
|
@ -366,6 +391,7 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
pnlPacks.add(pack);
|
pnlPacks.add(pack);
|
||||||
packs.add(pack);
|
packs.add(pack);
|
||||||
pack.addActionListener(new java.awt.event.ActionListener() {
|
pack.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
@Override
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
packActionPerformed(evt);
|
packActionPerformed(evt);
|
||||||
}
|
}
|
||||||
|
|
@ -413,6 +439,7 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
for (TournamentPlayerPanel panel: players) {
|
for (TournamentPlayerPanel panel: players) {
|
||||||
this.pnlOtherPlayers.add(panel);
|
this.pnlOtherPlayers.add(panel);
|
||||||
panel.getPlayerType().addActionListener(new java.awt.event.ActionListener() {
|
panel.getPlayerType().addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
@Override
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
playerActionPerformed(evt);
|
playerActionPerformed(evt);
|
||||||
}
|
}
|
||||||
|
|
@ -457,10 +484,12 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
private javax.swing.JLabel jLabel6;
|
private javax.swing.JLabel jLabel6;
|
||||||
private javax.swing.JPanel jPanel1;
|
private javax.swing.JPanel jPanel1;
|
||||||
private javax.swing.JLabel lblName;
|
private javax.swing.JLabel lblName;
|
||||||
|
private javax.swing.JLabel lblNumWins;
|
||||||
private javax.swing.JPanel pnlDraftOptions;
|
private javax.swing.JPanel pnlDraftOptions;
|
||||||
private javax.swing.JPanel pnlOtherPlayers;
|
private javax.swing.JPanel pnlOtherPlayers;
|
||||||
private javax.swing.JPanel pnlPacks;
|
private javax.swing.JPanel pnlPacks;
|
||||||
private javax.swing.JSpinner spnNumPlayers;
|
private javax.swing.JSpinner spnNumPlayers;
|
||||||
|
private javax.swing.JSpinner spnNumWins;
|
||||||
private javax.swing.JTextField txtName;
|
private javax.swing.JTextField txtName;
|
||||||
private javax.swing.JTextField txtPlayer1Name;
|
private javax.swing.JTextField txtPlayer1Name;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
|
|
|
||||||
|
|
@ -120,10 +120,10 @@ public class TablesPanel extends javax.swing.JPanel {
|
||||||
public void actionPerformed(ActionEvent e)
|
public void actionPerformed(ActionEvent e)
|
||||||
{
|
{
|
||||||
int modelRow = Integer.valueOf( e.getActionCommand() );
|
int modelRow = Integer.valueOf( e.getActionCommand() );
|
||||||
UUID tableId = (UUID)tableModel.getValueAt(modelRow, 10);
|
UUID tableId = (UUID)tableModel.getValueAt(modelRow, TableTableModel.ACTION_COLUMN + 3);
|
||||||
UUID gameId = (UUID)tableModel.getValueAt(modelRow, 9);
|
UUID gameId = (UUID)tableModel.getValueAt(modelRow, TableTableModel.ACTION_COLUMN + 2);
|
||||||
String state = (String)tableModel.getValueAt(modelRow, 7);
|
String state = (String)tableModel.getValueAt(modelRow, TableTableModel.ACTION_COLUMN);
|
||||||
boolean isTournament = (Boolean)tableModel.getValueAt(modelRow, 8);
|
boolean isTournament = (Boolean)tableModel.getValueAt(modelRow, TableTableModel.ACTION_COLUMN + 1);
|
||||||
String owner = (String)tableModel.getValueAt(modelRow, 1);
|
String owner = (String)tableModel.getValueAt(modelRow, 1);
|
||||||
|
|
||||||
if (state.equals("Join")) {
|
if (state.equals("Join")) {
|
||||||
|
|
@ -180,7 +180,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
||||||
public void actionPerformed(ActionEvent e)
|
public void actionPerformed(ActionEvent e)
|
||||||
{
|
{
|
||||||
int modelRow = Integer.valueOf( e.getActionCommand() );
|
int modelRow = Integer.valueOf( e.getActionCommand() );
|
||||||
List<UUID> games = (List<UUID>)matchesModel.getValueAt(modelRow, 6);
|
List<UUID> games = (List<UUID>)matchesModel.getValueAt(modelRow, MatchesTableModel.ACTION_COLUMN);
|
||||||
if (games.size() == 1) {
|
if (games.size() == 1) {
|
||||||
session.replayGame(games.get(0));
|
session.replayGame(games.get(0));
|
||||||
}
|
}
|
||||||
|
|
@ -191,9 +191,9 @@ public class TablesPanel extends javax.swing.JPanel {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// adds buttons (don't delete this)
|
// adds buttons to the table panel (don't delete this)
|
||||||
new ButtonColumn(tableTables, joinTable, 7);
|
new ButtonColumn(tableTables, joinTable, TableTableModel.ACTION_COLUMN);
|
||||||
new ButtonColumn(tableCompleted, replayMatch, 5);
|
new ButtonColumn(tableCompleted, replayMatch, MatchesTableModel.ACTION_COLUMN);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, JComponent> getUIComponents() {
|
public Map<String, JComponent> getUIComponents() {
|
||||||
|
|
@ -605,7 +605,10 @@ private void chkShowCompletedActionPerformed(java.awt.event.ActionEvent evt) {//
|
||||||
}
|
}
|
||||||
|
|
||||||
class TableTableModel extends AbstractTableModel {
|
class TableTableModel extends AbstractTableModel {
|
||||||
private String[] columnNames = new String[]{"Match Name", "Owner / Players", "Game Type", "Deck Type", "Info", "Status", "Created", "Action"};
|
|
||||||
|
public static int ACTION_COLUMN = 8; // column the action is located (starting with 0)
|
||||||
|
|
||||||
|
private String[] columnNames = new String[]{"Match Name", "Owner / Players", "Game Type", "Wins", "Deck Type", "Info", "Status", "Created", "Action"};
|
||||||
private TableView[] tables = new TableView[0];
|
private TableView[] tables = new TableView[0];
|
||||||
private static final DateFormat timeFormatter = SimpleDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
|
private static final DateFormat timeFormatter = SimpleDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
|
||||||
|
|
||||||
|
|
@ -638,16 +641,18 @@ class TableTableModel extends AbstractTableModel {
|
||||||
case 1:
|
case 1:
|
||||||
return tables[arg0].getControllerName();
|
return tables[arg0].getControllerName();
|
||||||
case 2:
|
case 2:
|
||||||
return tables[arg0].getGameType().toString();
|
return tables[arg0].getGameType();
|
||||||
case 3:
|
case 3:
|
||||||
return tables[arg0].getDeckType().toString();
|
return Integer.toString(tables[arg0].getWins());
|
||||||
case 4:
|
case 4:
|
||||||
return tables[arg0].getAdditionalInfo().toString();
|
return tables[arg0].getDeckType();
|
||||||
case 5:
|
case 5:
|
||||||
return tables[arg0].getTableState().toString();
|
return tables[arg0].getAdditionalInfo();
|
||||||
case 6:
|
case 6:
|
||||||
return timeFormatter.format(tables[arg0].getCreateTime());
|
return tables[arg0].getTableState().toString();
|
||||||
case 7:
|
case 7:
|
||||||
|
return timeFormatter.format(tables[arg0].getCreateTime());
|
||||||
|
case 8:
|
||||||
switch (tables[arg0].getTableState()) {
|
switch (tables[arg0].getTableState()) {
|
||||||
case WAITING:
|
case WAITING:
|
||||||
String owner = tables[arg0].getControllerName();
|
String owner = tables[arg0].getControllerName();
|
||||||
|
|
@ -675,14 +680,14 @@ class TableTableModel extends AbstractTableModel {
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
case 8:
|
|
||||||
return tables[arg0].isTournament();
|
|
||||||
case 9:
|
case 9:
|
||||||
|
return tables[arg0].isTournament();
|
||||||
|
case 10:
|
||||||
if (!tables[arg0].getGames().isEmpty()) {
|
if (!tables[arg0].getGames().isEmpty()) {
|
||||||
return tables[arg0].getGames().get(0);
|
return tables[arg0].getGames().get(0);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
case 10:
|
case 11:
|
||||||
return tables[arg0].getTableId();
|
return tables[arg0].getTableId();
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
|
@ -706,7 +711,7 @@ class TableTableModel extends AbstractTableModel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
||||||
if (columnIndex != 7) {
|
if (columnIndex != ACTION_COLUMN) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -807,9 +812,12 @@ class UpdatePlayersTask extends SwingWorker<Void, Collection<String>> {
|
||||||
}
|
}
|
||||||
|
|
||||||
class MatchesTableModel extends AbstractTableModel {
|
class MatchesTableModel extends AbstractTableModel {
|
||||||
private String[] columnNames = new String[]{"Match Name", "Game Type", "Deck Type", "Players", "Result", "Action"};
|
|
||||||
|
public static int ACTION_COLUMN = 7; // column the action is located (starting with 0)
|
||||||
|
|
||||||
|
private String[] columnNames = new String[]{"Match Name", "Game Type", "Deck Type", "Players", "Result", "Start Time", "End Time","Action"};
|
||||||
private MatchView[] matches = new MatchView[0];
|
private MatchView[] matches = new MatchView[0];
|
||||||
private static final DateFormat timeFormatter = SimpleDateFormat.getTimeInstance(SimpleDateFormat.SHORT);
|
private static final DateFormat timeFormatter = SimpleDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
|
||||||
|
|
||||||
public void loadData(Collection<MatchView> matches) throws MageRemoteException {
|
public void loadData(Collection<MatchView> matches) throws MageRemoteException {
|
||||||
this.matches = matches.toArray(new MatchView[0]);
|
this.matches = matches.toArray(new MatchView[0]);
|
||||||
|
|
@ -840,8 +848,12 @@ class MatchesTableModel extends AbstractTableModel {
|
||||||
case 4:
|
case 4:
|
||||||
return matches[arg0].getResult();
|
return matches[arg0].getResult();
|
||||||
case 5:
|
case 5:
|
||||||
return "None";
|
return timeFormatter.format(matches[arg0].getStartTime());
|
||||||
case 6:
|
case 6:
|
||||||
|
return timeFormatter.format(matches[arg0].getEndTime());
|
||||||
|
case 7:
|
||||||
|
return "None";
|
||||||
|
case 8:
|
||||||
return matches[arg0].getGames();
|
return matches[arg0].getGames();
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
|
@ -865,7 +877,7 @@ class MatchesTableModel extends AbstractTableModel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
||||||
if (columnIndex != 5) {
|
if (columnIndex != ACTION_COLUMN) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ package mage.view;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
|
@ -49,9 +50,12 @@ public class MatchView implements Serializable {
|
||||||
private String deckType;
|
private String deckType;
|
||||||
|
|
||||||
private List<UUID> games = new ArrayList<UUID>();
|
private List<UUID> games = new ArrayList<UUID>();
|
||||||
private String result;
|
private String result;
|
||||||
private String players;
|
private String players;
|
||||||
|
|
||||||
|
private Date startTime;
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
public MatchView(Match match) {
|
public MatchView(Match match) {
|
||||||
this.matchId = match.getId();
|
this.matchId = match.getId();
|
||||||
this.matchName = match.getName();
|
this.matchName = match.getName();
|
||||||
|
|
@ -68,7 +72,8 @@ public class MatchView implements Serializable {
|
||||||
players = sb1.substring(0, sb1.length() - 2);
|
players = sb1.substring(0, sb1.length() - 2);
|
||||||
result = sb2.substring(0, sb2.length() - 2);
|
result = sb2.substring(0, sb2.length() - 2);
|
||||||
}
|
}
|
||||||
|
this.startTime = match.getStartTime();
|
||||||
|
this.endTime = match.getEndTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
// used for tournaments
|
// used for tournaments
|
||||||
|
|
@ -88,6 +93,8 @@ public class MatchView implements Serializable {
|
||||||
sb2.append(tPlayer.getPlayer().getName()).append(": ").append(tPlayer.getResults()).append(" ");
|
sb2.append(tPlayer.getPlayer().getName()).append(": ").append(tPlayer.getResults()).append(" ");
|
||||||
}
|
}
|
||||||
this.result = sb2.toString();
|
this.result = sb2.toString();
|
||||||
|
this.startTime = table.getTournament().getStartTime();
|
||||||
|
this.endTime = table.getTournament().getEndTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID getMatchId() {
|
public UUID getMatchId() {
|
||||||
|
|
@ -118,4 +125,11 @@ public class MatchView implements Serializable {
|
||||||
return players;
|
return players;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getStartTime() {
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getEndTime() {
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ public class TableView implements Serializable {
|
||||||
|
|
||||||
private UUID tableId;
|
private UUID tableId;
|
||||||
private String gameType;
|
private String gameType;
|
||||||
|
private int wins;
|
||||||
private String deckType;
|
private String deckType;
|
||||||
private String tableName;
|
private String tableName;
|
||||||
private String controllerName;
|
private String controllerName;
|
||||||
|
|
@ -65,25 +66,36 @@ public class TableView implements Serializable {
|
||||||
this.tableName = table.getName();
|
this.tableName = table.getName();
|
||||||
this.controllerName = table.getControllerName();
|
this.controllerName = table.getControllerName();
|
||||||
this.createTime = table.getCreateTime();
|
this.createTime = table.getCreateTime();
|
||||||
this.deckType = table.getDeckType();
|
|
||||||
this.tableState = table.getState();
|
this.tableState = table.getState();
|
||||||
this.isTournament = table.isTournament();
|
this.isTournament = table.isTournament();
|
||||||
for (Seat seat: table.getSeats()) {
|
for (Seat seat: table.getSeats()) {
|
||||||
seats.add(new SeatView(seat));
|
seats.add(new SeatView(seat));
|
||||||
}
|
}
|
||||||
if (!table.isTournament()) {
|
if (!table.isTournament()) {
|
||||||
this.additionalInfo = new StringBuilder("Wins: ").append(table.getMatch().getWinsNeeded()).toString();
|
this.wins = table.getMatch().getWinsNeeded();
|
||||||
for (Game game: table.getMatch().getGames()) {
|
for (Game game: table.getMatch().getGames()) {
|
||||||
games.add(game.getId());
|
games.add(game.getId());
|
||||||
}
|
}
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
StringBuilder sbScore = new StringBuilder("Score: ");
|
||||||
for(MatchPlayer matchPlayer: table.getMatch().getPlayers()) {
|
for(MatchPlayer matchPlayer: table.getMatch().getPlayers()) {
|
||||||
if (!matchPlayer.getPlayer().getName().equals(table.getControllerName())) {
|
if (!matchPlayer.getPlayer().getName().equals(table.getControllerName())) {
|
||||||
sb.append(", ").append(matchPlayer.getPlayer().getName());
|
sb.append(", ").append(matchPlayer.getPlayer().getName());
|
||||||
|
sbScore.append("-").append(matchPlayer.getWins());
|
||||||
|
} else {
|
||||||
|
sbScore.insert(0,matchPlayer.getWins()).insert(0,"Score: ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.controllerName += sb.toString();
|
this.controllerName += sb.toString();
|
||||||
|
this.deckType = table.getDeckType();
|
||||||
|
if (table.getMatch().getGames().isEmpty()) {
|
||||||
|
this.additionalInfo = "";
|
||||||
|
} else {
|
||||||
|
this.additionalInfo = sbScore.toString();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
this.wins = table.getTournament().getOptions().getMatchOptions().getWinsNeeded();
|
||||||
StringBuilder sb1 = new StringBuilder();
|
StringBuilder sb1 = new StringBuilder();
|
||||||
for (TournamentPlayer tp: table.getTournament().getPlayers()) {
|
for (TournamentPlayer tp: table.getTournament().getPlayers()) {
|
||||||
if (!tp.getPlayer().getName().equals(table.getControllerName())) {
|
if (!tp.getPlayer().getName().equals(table.getControllerName())) {
|
||||||
|
|
@ -96,8 +108,8 @@ public class TableView implements Serializable {
|
||||||
sb.append(" - Running round: ").append(table.getTournament().getRounds().size());
|
sb.append(" - Running round: ").append(table.getTournament().getRounds().size());
|
||||||
}
|
}
|
||||||
this.additionalInfo = sb.toString();
|
this.additionalInfo = sb.toString();
|
||||||
|
this.deckType = new StringBuilder(table.getDeckType()).append(" ").append(table.getTournament().getSetsFormatedShort()).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID getTableId() {
|
public UUID getTableId() {
|
||||||
|
|
@ -116,6 +128,10 @@ public class TableView implements Serializable {
|
||||||
return gameType;
|
return gameType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getWins() {
|
||||||
|
return wins;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDeckType() {
|
public String getDeckType() {
|
||||||
return deckType;
|
return deckType;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ public class Modern extends Constructed {
|
||||||
public Modern() {
|
public Modern() {
|
||||||
super("Constructed - Modern");
|
super("Constructed - Modern");
|
||||||
|
|
||||||
Date cutoff = EighthEdition.getInstance().getReleaseDate();
|
Date cutoff = EighthEdition.getInstance().getReleaseDate(); // 2003 / 07 / 28
|
||||||
for (ExpansionSet set: Sets.getInstance().values()) {
|
for (ExpansionSet set: Sets.getInstance().values()) {
|
||||||
if ((set.getReleaseDate().after(cutoff) || set.getReleaseDate().equals(cutoff)) && set.getSetType() != SetType.REPRINT) {
|
if ((set.getReleaseDate().after(cutoff) || set.getReleaseDate().equals(cutoff)) && set.getSetType() != SetType.REPRINT) {
|
||||||
setCodes.add(set.getCode());
|
setCodes.add(set.getCode());
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ package mage.server.tournament;
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import mage.cards.Sets;
|
import mage.cards.Sets;
|
||||||
|
|
@ -65,9 +66,18 @@ public class TournamentFactory {
|
||||||
try {
|
try {
|
||||||
con = tournaments.get(tournamentType).getConstructor(new Class[]{TournamentOptions.class});
|
con = tournaments.get(tournamentType).getConstructor(new Class[]{TournamentOptions.class});
|
||||||
tournament = con.newInstance(new Object[] {options});
|
tournament = con.newInstance(new Object[] {options});
|
||||||
|
// transfer set information, create short info string for included sets
|
||||||
|
Map<String,Integer> setInfo = new LinkedHashMap<String,Integer>();
|
||||||
for (String setCode: options.getLimitedOptions().getSetCodes()) {
|
for (String setCode: options.getLimitedOptions().getSetCodes()) {
|
||||||
tournament.getSets().add(Sets.findSet(setCode));
|
tournament.getSets().add(Sets.findSet(setCode));
|
||||||
|
int count = setInfo.containsKey(setCode) ? setInfo.get(setCode) : 0;
|
||||||
|
setInfo.put(setCode, count + 1);
|
||||||
}
|
}
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (Map.Entry<String,Integer> entry:setInfo.entrySet()) {
|
||||||
|
sb.append(entry.getValue().toString()).append("x").append(entry.getKey()).append(" ");
|
||||||
|
}
|
||||||
|
tournament.setSetsFormatedShort(sb.toString());
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
logger.fatal("TournamentFactory error ", ex);
|
logger.fatal("TournamentFactory error ", ex);
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
*/
|
*/
|
||||||
package mage.sets.avacynrestored;
|
package mage.sets.avacynrestored;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
import mage.Constants;
|
import mage.Constants;
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
|
|
@ -43,7 +44,6 @@ import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.PermanentCard;
|
import mage.game.permanent.PermanentCard;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author noxx
|
* @author noxx
|
||||||
|
|
@ -106,7 +106,7 @@ class SigardaHostOfHeronsEffect extends ReplacementEffectImpl<SigardaHostOfHeron
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
if (event.getType() == GameEvent.EventType.SACRIFICE_PERMANENT) {
|
if (event.getType() == GameEvent.EventType.SACRIFICE_PERMANENT && event.getPlayerId().equals(source.getControllerId())) {
|
||||||
MageObject object = game.getObject(event.getSourceId());
|
MageObject object = game.getObject(event.getSourceId());
|
||||||
if (object instanceof PermanentCard) {
|
if (object instanceof PermanentCard) {
|
||||||
if (game.getOpponents(source.getControllerId()).contains(((PermanentCard)object).getControllerId())) {
|
if (game.getOpponents(source.getControllerId()).contains(((PermanentCard)object).getControllerId())) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* 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.championsofkamigawa;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class PetalsOfInsight extends mage.sets.modernmasters.PetalsOfInsight {
|
||||||
|
|
||||||
|
public PetalsOfInsight(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 79;
|
||||||
|
this.expansionSetCode = "CHK";
|
||||||
|
this.rarity = Rarity.UNCOMMON;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PetalsOfInsight(final PetalsOfInsight card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PetalsOfInsight copy() {
|
||||||
|
return new PetalsOfInsight(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
52
Mage.Sets/src/mage/sets/coldsnap/PerilousResearch.java
Normal file
52
Mage.Sets/src/mage/sets/coldsnap/PerilousResearch.java
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.coldsnap;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class PerilousResearch extends mage.sets.commander.PerilousResearch {
|
||||||
|
|
||||||
|
public PerilousResearch(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 41;
|
||||||
|
this.expansionSetCode = "CSP";
|
||||||
|
}
|
||||||
|
|
||||||
|
public PerilousResearch(final PerilousResearch card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PerilousResearch copy() {
|
||||||
|
return new PerilousResearch(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
105
Mage.Sets/src/mage/sets/commander/PerilousResearch.java
Normal file
105
Mage.Sets/src/mage/sets/commander/PerilousResearch.java
Normal file
|
|
@ -0,0 +1,105 @@
|
||||||
|
/*
|
||||||
|
* 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.commander;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
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.DrawCardControllerEffect;
|
||||||
|
import mage.abilities.effects.common.SacrificeEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class PerilousResearch extends CardImpl<PerilousResearch> {
|
||||||
|
|
||||||
|
public PerilousResearch(UUID ownerId) {
|
||||||
|
super(ownerId, 54, "Perilous Research", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||||
|
this.expansionSetCode = "CMD";
|
||||||
|
|
||||||
|
this.color.setBlue(true);
|
||||||
|
|
||||||
|
// Draw two cards, then sacrifice a permanent.
|
||||||
|
this.getSpellAbility().addEffect(new DrawCardControllerEffect(2));
|
||||||
|
this.getSpellAbility().addEffect(new PerilousResearchEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
public PerilousResearch(final PerilousResearch card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PerilousResearch copy() {
|
||||||
|
return new PerilousResearch(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PerilousResearchEffect extends OneShotEffect<PerilousResearchEffect> {
|
||||||
|
|
||||||
|
public PerilousResearchEffect() {
|
||||||
|
super(Outcome.Sacrifice);
|
||||||
|
this.staticText = "then sacrifice a permanent";
|
||||||
|
}
|
||||||
|
|
||||||
|
public PerilousResearchEffect(final PerilousResearchEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PerilousResearchEffect copy() {
|
||||||
|
return new PerilousResearchEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (player != null) {
|
||||||
|
Target target = new TargetControlledPermanent();
|
||||||
|
|
||||||
|
if (target.canChoose(player.getId(), game) && player.choose(Outcome.Sacrifice, target, source.getSourceId(), game)) {
|
||||||
|
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||||
|
if (permanent != null) {
|
||||||
|
return permanent.sacrifice(source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -29,6 +29,7 @@ package mage.sets.conflux;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Outcome;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.Constants.Zone;
|
import mage.Constants.Zone;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
|
@ -37,10 +38,15 @@ import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.ReturnToHandTargetCost;
|
import mage.abilities.costs.common.ReturnToHandTargetCost;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.PutOntoBattlefieldTargetEffect;
|
import mage.abilities.effects.common.PutOntoBattlefieldTargetEffect;
|
||||||
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.common.FilterArtifactCard;
|
import mage.filter.common.FilterArtifactCard;
|
||||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.Target;
|
||||||
import mage.target.common.TargetCardInHand;
|
import mage.target.common.TargetCardInHand;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
|
@ -61,10 +67,9 @@ public class MasterTransmuter extends CardImpl<MasterTransmuter> {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// {U}, {tap}, Return an artifact you control to its owner's hand: You may put an artifact card from your hand onto the battlefield.
|
// {U}, {tap}, Return an artifact you control to its owner's hand: You may put an artifact card from your hand onto the battlefield.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutOntoBattlefieldTargetEffect(false, true), new ManaCostsImpl("{U}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MasterTransmuterEffect(), new ManaCostsImpl("{U}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact"))));
|
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact"))));
|
||||||
ability.addTarget(new TargetCardInHand(new FilterArtifactCard("an artifact card from your hand")));
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -78,3 +83,40 @@ public class MasterTransmuter extends CardImpl<MasterTransmuter> {
|
||||||
return new MasterTransmuter(this);
|
return new MasterTransmuter(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class MasterTransmuterEffect extends OneShotEffect<MasterTransmuterEffect> {
|
||||||
|
|
||||||
|
public MasterTransmuterEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "You may put an artifact card from your hand onto the battlefield";
|
||||||
|
}
|
||||||
|
|
||||||
|
public MasterTransmuterEffect(final MasterTransmuterEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MasterTransmuterEffect copy() {
|
||||||
|
return new MasterTransmuterEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
Target target = new TargetCardInHand(new FilterArtifactCard("an artifact card from your hand"));
|
||||||
|
target.setRequired(true);
|
||||||
|
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
|
||||||
|
&& controller.chooseUse(outcome, "Put an artifact from your hand to battlefield??", game)
|
||||||
|
&& controller.chooseTarget(outcome, target, source, game)) {
|
||||||
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
|
if (card != null) {
|
||||||
|
controller.getHand().remove(card);
|
||||||
|
return card.moveToZone(Zone.BATTLEFIELD, source.getId(), game, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
52
Mage.Sets/src/mage/sets/darksteel/DeathCloud.java
Normal file
52
Mage.Sets/src/mage/sets/darksteel/DeathCloud.java
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.darksteel;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class DeathCloud extends mage.sets.modernmasters.DeathCloud {
|
||||||
|
|
||||||
|
public DeathCloud(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 40;
|
||||||
|
this.expansionSetCode = "DST";
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeathCloud(final DeathCloud card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeathCloud copy() {
|
||||||
|
return new DeathCloud(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.dissension;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class GrandArbiterAugustinIV extends mage.sets.modernmasters.GrandArbiterAugustinIV {
|
||||||
|
|
||||||
|
public GrandArbiterAugustinIV(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 112;
|
||||||
|
this.expansionSetCode = "DIS";
|
||||||
|
}
|
||||||
|
|
||||||
|
public GrandArbiterAugustinIV(final GrandArbiterAugustinIV card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GrandArbiterAugustinIV copy() {
|
||||||
|
return new GrandArbiterAugustinIV(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -34,6 +34,7 @@ import mage.Constants.Duration;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.Constants.Zone;
|
import mage.Constants.Zone;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.MustBlockSourceEffect;
|
import mage.abilities.effects.common.MustBlockSourceEffect;
|
||||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||||
|
|
@ -66,10 +67,12 @@ public class ArmedDangerous extends SplitCard<ArmedDangerous> {
|
||||||
// Dangerous
|
// Dangerous
|
||||||
// All creatures able to block target creature this turn do so.
|
// All creatures able to block target creature this turn do so.
|
||||||
getRightHalfCard().getColor().setGreen(true);
|
getRightHalfCard().getColor().setGreen(true);
|
||||||
getRightHalfCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBlockSourceEffect()), Duration.EndOfTurn));
|
Effect effect = new GainAbilityTargetEffect(
|
||||||
|
new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBlockSourceEffect(Duration.EndOfCombat)), Duration.EndOfTurn,
|
||||||
|
"All creatures able to block target creature this turn do so");
|
||||||
|
getRightHalfCard().getSpellAbility().addEffect(effect);
|
||||||
getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent(true));
|
getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent(true));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArmedDangerous(final ArmedDangerous card) {
|
public ArmedDangerous(final ArmedDangerous card) {
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ public class HaazdaSnareSquad extends CardImpl<HaazdaSnareSquad> {
|
||||||
this.toughness = new MageInt(4);
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
// Whenever Haazda Snare Squad attacks you may pay {W}. If you do, tap target creature an opponent controls.
|
// Whenever Haazda Snare Squad attacks you may pay {W}. If you do, tap target creature an opponent controls.
|
||||||
Ability ability = new AttacksTriggeredAbility(new DoIfCostPaid(new TapTargetEffect(""), new ManaCostsImpl("{W}")),true,
|
Ability ability = new AttacksTriggeredAbility(new DoIfCostPaid(new TapTargetEffect(""), new ManaCostsImpl("{W}")),false,
|
||||||
"Whenever {this} attacks you may pay {W}. If you do, tap target creature an opponent controls.");
|
"Whenever {this} attacks you may pay {W}. If you do, tap target creature an opponent controls.");
|
||||||
Target target = new TargetCreaturePermanent(filter);
|
Target target = new TargetCreaturePermanent(filter);
|
||||||
target.setRequired(true);
|
target.setRequired(true);
|
||||||
|
|
|
||||||
52
Mage.Sets/src/mage/sets/lorwyn/MarshFlitter.java
Normal file
52
Mage.Sets/src/mage/sets/lorwyn/MarshFlitter.java
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.lorwyn;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class MarshFlitter extends mage.sets.modernmasters.MarshFlitter {
|
||||||
|
|
||||||
|
public MarshFlitter(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 125;
|
||||||
|
this.expansionSetCode = "LRW";
|
||||||
|
}
|
||||||
|
|
||||||
|
public MarshFlitter(final MarshFlitter card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MarshFlitter copy() {
|
||||||
|
return new MarshFlitter(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
52
Mage.Sets/src/mage/sets/lorwyn/Peppersmoke.java
Normal file
52
Mage.Sets/src/mage/sets/lorwyn/Peppersmoke.java
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.lorwyn;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class Peppersmoke extends mage.sets.modernmasters.Peppersmoke {
|
||||||
|
|
||||||
|
public Peppersmoke(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 134;
|
||||||
|
this.expansionSetCode = "LRW";
|
||||||
|
}
|
||||||
|
|
||||||
|
public Peppersmoke(final Peppersmoke card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Peppersmoke copy() {
|
||||||
|
return new Peppersmoke(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -36,8 +36,6 @@ import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.target.common.TargetCardInHand;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
|
@ -62,7 +60,6 @@ public class ElvishPiper extends CardImpl<ElvishPiper> {
|
||||||
new PutCreatureOnBattlefieldEffect(),
|
new PutCreatureOnBattlefieldEffect(),
|
||||||
new ManaCostsImpl("{G}"));
|
new ManaCostsImpl("{G}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addTarget(new TargetCardInHand(new FilterCreatureCard()));
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
52
Mage.Sets/src/mage/sets/modernmasters/BruteForce.java
Normal file
52
Mage.Sets/src/mage/sets/modernmasters/BruteForce.java
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class BruteForce extends mage.sets.planarchaos.BruteForce {
|
||||||
|
|
||||||
|
public BruteForce(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 107;
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
}
|
||||||
|
|
||||||
|
public BruteForce(final BruteForce card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BruteForce copy() {
|
||||||
|
return new BruteForce(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class CitanulWoodreaders extends mage.sets.planarchaos.CitanulWoodreaders {
|
||||||
|
|
||||||
|
public CitanulWoodreaders(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 140;
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
}
|
||||||
|
|
||||||
|
public CitanulWoodreaders(final CitanulWoodreaders card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CitanulWoodreaders copy() {
|
||||||
|
return new CitanulWoodreaders(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
70
Mage.Sets/src/mage/sets/modernmasters/DeathCloud.java
Normal file
70
Mage.Sets/src/mage/sets/modernmasters/DeathCloud.java
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
/*
|
||||||
|
* 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.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||||
|
import mage.abilities.effects.common.DiscardEachPlayerEffect;
|
||||||
|
import mage.abilities.effects.common.LoseLifePlayersEffect;
|
||||||
|
import mage.abilities.effects.common.SacrificeAllEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
|
import mage.filter.common.FilterControlledLandPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class DeathCloud extends CardImpl<DeathCloud> {
|
||||||
|
|
||||||
|
public DeathCloud(UUID ownerId) {
|
||||||
|
super(ownerId, 76, "Death Cloud", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{B}{B}{B}");
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
|
||||||
|
this.color.setBlack(true);
|
||||||
|
|
||||||
|
// Each player loses X life, discards X cards, sacrifices X creatures, then sacrifices X lands.
|
||||||
|
DynamicValue xValue = new ManacostVariableValue();
|
||||||
|
this.getSpellAbility().addEffect(new LoseLifePlayersEffect(xValue));
|
||||||
|
this.getSpellAbility().addEffect(new DiscardEachPlayerEffect(xValue, false));
|
||||||
|
this.getSpellAbility().addEffect(new SacrificeAllEffect(xValue, new FilterControlledCreaturePermanent("creatures")));
|
||||||
|
this.getSpellAbility().addEffect(new SacrificeAllEffect(xValue, new FilterControlledLandPermanent("lands")));
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeathCloud(final DeathCloud card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeathCloud copy() {
|
||||||
|
return new DeathCloud(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
52
Mage.Sets/src/mage/sets/modernmasters/ErrantEphemeron.java
Normal file
52
Mage.Sets/src/mage/sets/modernmasters/ErrantEphemeron.java
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class ErrantEphemeron extends mage.sets.timespiral.ErrantEphemeron {
|
||||||
|
|
||||||
|
public ErrantEphemeron(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 41;
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
}
|
||||||
|
|
||||||
|
public ErrantEphemeron(final ErrantEphemeron card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ErrantEphemeron copy() {
|
||||||
|
return new ErrantEphemeron(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
121
Mage.Sets/src/mage/sets/modernmasters/FeudkillersVerdict.java
Normal file
121
Mage.Sets/src/mage/sets/modernmasters/FeudkillersVerdict.java
Normal file
|
|
@ -0,0 +1,121 @@
|
||||||
|
/*
|
||||||
|
* 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.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Outcome;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.token.Token;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class FeudkillersVerdict extends CardImpl<FeudkillersVerdict> {
|
||||||
|
|
||||||
|
public FeudkillersVerdict(UUID ownerId) {
|
||||||
|
super(ownerId, 15, "Feudkiller's Verdict", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{W}{W}");
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
this.supertype.add("Tribal");
|
||||||
|
this.subtype.add("Giant");
|
||||||
|
|
||||||
|
this.color.setWhite(true);
|
||||||
|
|
||||||
|
// You gain 10 life. Then if you have more life than an opponent, put a 5/5 white Giant Warrior creature token onto the battlefield.
|
||||||
|
this.getSpellAbility().addEffect(new FeudkillersVerdictEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
public FeudkillersVerdict(final FeudkillersVerdict card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FeudkillersVerdict copy() {
|
||||||
|
return new FeudkillersVerdict(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class FeudkillersVerdictEffect extends OneShotEffect<FeudkillersVerdictEffect> {
|
||||||
|
|
||||||
|
public FeudkillersVerdictEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "You gain 10 life. Then if you have more life than an opponent, put a 5/5 white Giant Warrior creature token onto the battlefield";
|
||||||
|
}
|
||||||
|
|
||||||
|
public FeudkillersVerdictEffect(final FeudkillersVerdictEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FeudkillersVerdictEffect copy() {
|
||||||
|
return new FeudkillersVerdictEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
controller.gainLife(10, game);
|
||||||
|
boolean moreLife = false;
|
||||||
|
for (UUID opponentId :game.getOpponents(source.getControllerId())) {
|
||||||
|
Player opponent = game.getPlayer(opponentId);
|
||||||
|
if (opponent != null) {
|
||||||
|
if (controller.getLife() > opponent.getLife()) {
|
||||||
|
moreLife = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (moreLife) {
|
||||||
|
return new CreateTokenEffect(new GiantWarriorToken(), 1).apply(game, source);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class GiantWarriorToken extends Token {
|
||||||
|
GiantWarriorToken() {
|
||||||
|
super("Warrior", "5/5 white Giant Warrior creature token");
|
||||||
|
cardType.add(CardType.CREATURE);
|
||||||
|
color.setWhite(true);
|
||||||
|
subtype.add("Warrior");
|
||||||
|
power = new MageInt(5);
|
||||||
|
toughness = new MageInt(5);
|
||||||
|
}
|
||||||
|
}
|
||||||
52
Mage.Sets/src/mage/sets/modernmasters/GiantDustwasp.java
Normal file
52
Mage.Sets/src/mage/sets/modernmasters/GiantDustwasp.java
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class GiantDustwasp extends mage.sets.planarchaos.GiantDustwasp {
|
||||||
|
|
||||||
|
public GiantDustwasp(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 145;
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiantDustwasp(final GiantDustwasp card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GiantDustwasp copy() {
|
||||||
|
return new GiantDustwasp(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
/*
|
||||||
|
* 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.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Outcome;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.Constants.Zone;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.SpellAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.CostModificationEffectImpl;
|
||||||
|
import mage.abilities.effects.common.cost.SpellsCostReductionEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class GrandArbiterAugustinIV extends CardImpl<GrandArbiterAugustinIV> {
|
||||||
|
|
||||||
|
private static final FilterCard filterWhite = new FilterCard("White spells");
|
||||||
|
private static final FilterCard filterBlue = new FilterCard("Blue spells");
|
||||||
|
static {
|
||||||
|
filterWhite.add(new ColorPredicate(ObjectColor.WHITE));
|
||||||
|
filterBlue.add(new ColorPredicate(ObjectColor.BLUE));
|
||||||
|
}
|
||||||
|
|
||||||
|
public GrandArbiterAugustinIV(UUID ownerId) {
|
||||||
|
super(ownerId, 176, "Grand Arbiter Augustin IV", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}{U}");
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
this.supertype.add("Legendary");
|
||||||
|
this.subtype.add("Human");
|
||||||
|
this.subtype.add("Advisor");
|
||||||
|
|
||||||
|
this.color.setBlue(true);
|
||||||
|
this.color.setWhite(true);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// White spells you cast cost {1} less to cast.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionEffect(filterWhite, 1)));
|
||||||
|
// Blue spells you cast cost {1} less to cast.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionEffect(filterBlue, 1)));
|
||||||
|
// Spells your opponents cast cost {1} more to cast.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GrandArbiterAugustinIVCostIncreaseEffect()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public GrandArbiterAugustinIV(final GrandArbiterAugustinIV card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GrandArbiterAugustinIV copy() {
|
||||||
|
return new GrandArbiterAugustinIV(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class GrandArbiterAugustinIVCostIncreaseEffect extends CostModificationEffectImpl<GrandArbiterAugustinIVCostIncreaseEffect> {
|
||||||
|
|
||||||
|
private static final String effectText = "Spells your opponents cast cost {1} more to cast";
|
||||||
|
|
||||||
|
GrandArbiterAugustinIVCostIncreaseEffect() {
|
||||||
|
super(Constants.Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||||
|
staticText = effectText;
|
||||||
|
}
|
||||||
|
|
||||||
|
GrandArbiterAugustinIVCostIncreaseEffect(GrandArbiterAugustinIVCostIncreaseEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||||
|
SpellAbility spellAbility = (SpellAbility) abilityToModify;
|
||||||
|
CardUtil.adjustCost(spellAbility, -1);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||||
|
if (abilityToModify instanceof SpellAbility) {
|
||||||
|
if (game.getOpponents(source.getControllerId()).contains(abilityToModify.getControllerId())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GrandArbiterAugustinIVCostIncreaseEffect copy() {
|
||||||
|
return new GrandArbiterAugustinIVCostIncreaseEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
100
Mage.Sets/src/mage/sets/modernmasters/MarshFlitter.java
Normal file
100
Mage.Sets/src/mage/sets/modernmasters/MarshFlitter.java
Normal file
|
|
@ -0,0 +1,100 @@
|
||||||
|
/*
|
||||||
|
* 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.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Duration;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.Constants.Zone;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.game.permanent.token.Token;
|
||||||
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class MarshFlitter extends CardImpl<MarshFlitter> {
|
||||||
|
|
||||||
|
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Goblin");
|
||||||
|
static {
|
||||||
|
filter.add(new SubtypePredicate("Goblin"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public MarshFlitter(UUID ownerId) {
|
||||||
|
super(ownerId, 91, "Marsh Flitter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
this.subtype.add("Faerie");
|
||||||
|
this.subtype.add("Rogue");
|
||||||
|
|
||||||
|
this.color.setBlack(true);
|
||||||
|
this.power = new MageInt(1);
|
||||||
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
// When Marsh Flitter enters the battlefield, put two 1/1 black Goblin Rogue creature tokens onto the battlefield.
|
||||||
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new BlackGoblinRogueToken(), 2), false));
|
||||||
|
// Sacrifice a Goblin: Marsh Flitter becomes 3/3 until end of turn.
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(3, 3, Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public MarshFlitter(final MarshFlitter card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MarshFlitter copy() {
|
||||||
|
return new MarshFlitter(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BlackGoblinRogueToken extends Token {
|
||||||
|
BlackGoblinRogueToken() {
|
||||||
|
super("Goblin Rogue", "1/1 black Goblin Rogue creature tokens");
|
||||||
|
cardType.add(CardType.CREATURE);
|
||||||
|
color.setBlack(true);
|
||||||
|
subtype.add("Goblin");
|
||||||
|
subtype.add("Rogue");
|
||||||
|
power = new MageInt(1);
|
||||||
|
toughness = new MageInt(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
52
Mage.Sets/src/mage/sets/modernmasters/NantukoShaman.java
Normal file
52
Mage.Sets/src/mage/sets/modernmasters/NantukoShaman.java
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class NantukoShaman extends mage.sets.timespiral.NantukoShaman {
|
||||||
|
|
||||||
|
public NantukoShaman(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 156;
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
}
|
||||||
|
|
||||||
|
public NantukoShaman(final NantukoShaman card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NantukoShaman copy() {
|
||||||
|
return new NantukoShaman(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
79
Mage.Sets/src/mage/sets/modernmasters/Peppersmoke.java
Normal file
79
Mage.Sets/src/mage/sets/modernmasters/Peppersmoke.java
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Duration;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||||
|
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||||
|
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||||
|
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class Peppersmoke extends CardImpl<Peppersmoke> {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("If you control a Faerie,");
|
||||||
|
static {
|
||||||
|
filter.add(new SubtypePredicate("Faerie"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Peppersmoke(UUID ownerId) {
|
||||||
|
super(ownerId, 92, "Peppersmoke", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{B}");
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
this.supertype.add("Tribal");
|
||||||
|
this.subtype.add("Faerie");
|
||||||
|
|
||||||
|
this.color.setBlack(true);
|
||||||
|
|
||||||
|
// Target creature gets -1/-1 until end of turn. If you control a Faerie, draw a card.
|
||||||
|
this.getSpellAbility().addEffect(new BoostTargetEffect(-1,-1,Duration.EndOfTurn));
|
||||||
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent(true));
|
||||||
|
this.getSpellAbility().addEffect(
|
||||||
|
new ConditionalOneShotEffect(new DrawCardControllerEffect(1),
|
||||||
|
new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0),
|
||||||
|
"If you control a Faerie, draw a card"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Peppersmoke(final Peppersmoke card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Peppersmoke copy() {
|
||||||
|
return new Peppersmoke(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
54
Mage.Sets/src/mage/sets/modernmasters/PerilousResearch.java
Normal file
54
Mage.Sets/src/mage/sets/modernmasters/PerilousResearch.java
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* 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.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class PerilousResearch extends mage.sets.commander.PerilousResearch {
|
||||||
|
|
||||||
|
public PerilousResearch(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 58;
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
this.rarity = Rarity.COMMON;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PerilousResearch(final PerilousResearch card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PerilousResearch copy() {
|
||||||
|
return new PerilousResearch(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
133
Mage.Sets/src/mage/sets/modernmasters/PetalsOfInsight.java
Normal file
133
Mage.Sets/src/mage/sets/modernmasters/PetalsOfInsight.java
Normal file
|
|
@ -0,0 +1,133 @@
|
||||||
|
/*
|
||||||
|
* 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.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Outcome;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.Constants.Zone;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.Cards;
|
||||||
|
import mage.cards.CardsImpl;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetCard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class PetalsOfInsight extends CardImpl<PetalsOfInsight> {
|
||||||
|
|
||||||
|
public PetalsOfInsight(UUID ownerId) {
|
||||||
|
super(ownerId, 60, "Petals of Insight", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{4}{U}");
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
this.subtype.add("Arcane");
|
||||||
|
|
||||||
|
this.color.setBlue(true);
|
||||||
|
|
||||||
|
// Look at the top three cards of your library. You may put those cards on the bottom of your library in any order. If you do, return Petals of Insight to its owner's hand. Otherwise, draw three cards.
|
||||||
|
this.getSpellAbility().addEffect(new PetalsOfInsightEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
public PetalsOfInsight(final PetalsOfInsight card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PetalsOfInsight copy() {
|
||||||
|
return new PetalsOfInsight(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PetalsOfInsightEffect extends OneShotEffect<PetalsOfInsightEffect> {
|
||||||
|
|
||||||
|
public PetalsOfInsightEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "Look at the top three cards of your library. You may put those cards on the bottom of your library in any order. If you do, return Petals of Insight to its owner's hand. Otherwise, draw three cards";
|
||||||
|
}
|
||||||
|
|
||||||
|
public PetalsOfInsightEffect(final PetalsOfInsightEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PetalsOfInsightEffect copy() {
|
||||||
|
return new PetalsOfInsightEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (player == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Cards cards = new CardsImpl(Zone.PICK);
|
||||||
|
int count = Math.min(player.getLibrary().size(), 3);
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
Card card = player.getLibrary().removeFromTop(game);
|
||||||
|
if (card != null) {
|
||||||
|
cards.add(card);
|
||||||
|
game.setZone(card.getId(), Zone.PICK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
player.lookAtCards("Petals of Insight", cards, game);
|
||||||
|
if (player.chooseUse(outcome, "Put the cards on the bottom of your library in any order?", game)) {
|
||||||
|
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
|
||||||
|
target.setRequired(true);
|
||||||
|
while (cards.size() > 1) {
|
||||||
|
player.choose(Outcome.Neutral, cards, target, game);
|
||||||
|
Card card = cards.get(target.getFirstTarget(), game);
|
||||||
|
if (card != null) {
|
||||||
|
cards.remove(card);
|
||||||
|
card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
|
||||||
|
}
|
||||||
|
target.clearChosen();
|
||||||
|
}
|
||||||
|
if (cards.size() == 1) {
|
||||||
|
Card card = cards.get(cards.iterator().next(), game);
|
||||||
|
card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (UUID cardId: cards) {
|
||||||
|
Card card = game.getCard(cardId);
|
||||||
|
if (card != null) {
|
||||||
|
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
player.drawCards(3, game, null);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
89
Mage.Sets/src/mage/sets/modernmasters/ReachOfBranches.java
Normal file
89
Mage.Sets/src/mage/sets/modernmasters/ReachOfBranches.java
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
/*
|
||||||
|
* 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.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.Constants.Zone;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
||||||
|
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.filter.common.FilterLandPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.game.permanent.token.Token;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class ReachOfBranches extends CardImpl<ReachOfBranches> {
|
||||||
|
|
||||||
|
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest");
|
||||||
|
static {
|
||||||
|
filter.add(new SubtypePredicate("Forest"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReachOfBranches(UUID ownerId) {
|
||||||
|
super(ownerId, 158, "Reach of Branches", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{4}{G}");
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
this.supertype.add("Tribal");
|
||||||
|
this.subtype.add("Treefolk");
|
||||||
|
|
||||||
|
this.color.setGreen(true);
|
||||||
|
|
||||||
|
// Put a 2/5 green Treefolk Shaman creature token onto the battlefield.
|
||||||
|
this.getSpellAbility().addEffect(new CreateTokenEffect(new TreefolkShamanToken()));
|
||||||
|
// Whenever a Forest enters the battlefield under your control, you may return Reach of Branches from your graveyard to your hand.
|
||||||
|
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(),filter, true, "", true));
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReachOfBranches(final ReachOfBranches card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReachOfBranches copy() {
|
||||||
|
return new ReachOfBranches(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TreefolkShamanToken extends Token {
|
||||||
|
TreefolkShamanToken() {
|
||||||
|
super("Treefolk Shaman", "2/5 green Treefolk Shaman creature token");
|
||||||
|
cardType.add(CardType.CREATURE);
|
||||||
|
color.setBlack(true);
|
||||||
|
subtype.add("Shaman");
|
||||||
|
subtype.add("Rogue");
|
||||||
|
power = new MageInt(2);
|
||||||
|
toughness = new MageInt(5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class RiftwingCloudskate extends mage.sets.timespiral.RiftwingCloudskate {
|
||||||
|
|
||||||
|
public RiftwingCloudskate(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 62;
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
}
|
||||||
|
|
||||||
|
public RiftwingCloudskate(final RiftwingCloudskate card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RiftwingCloudskate copy() {
|
||||||
|
return new RiftwingCloudskate(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
130
Mage.Sets/src/mage/sets/modernmasters/StonehewerGiant.java
Normal file
130
Mage.Sets/src/mage/sets/modernmasters/StonehewerGiant.java
Normal file
|
|
@ -0,0 +1,130 @@
|
||||||
|
/*
|
||||||
|
* 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.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Outcome;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.Constants.Zone;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class StonehewerGiant extends CardImpl<StonehewerGiant> {
|
||||||
|
|
||||||
|
public StonehewerGiant(UUID ownerId) {
|
||||||
|
super(ownerId, 31, "Stonehewer Giant", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
this.subtype.add("Giant");
|
||||||
|
this.subtype.add("Warrior");
|
||||||
|
|
||||||
|
this.color.setWhite(true);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Vigilance
|
||||||
|
this.addAbility(VigilanceAbility.getInstance());
|
||||||
|
// {1}{W}, {tap}: Search your library for an Equipment card and put it onto the battlefield. Attach it to a creature you control. Then shuffle your library.
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new StonehewerGiantEffect(), new ManaCostsImpl("{1}{W}"));
|
||||||
|
ability.addCost(new TapSourceCost());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public StonehewerGiant(final StonehewerGiant card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StonehewerGiant copy() {
|
||||||
|
return new StonehewerGiant(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class StonehewerGiantEffect extends OneShotEffect<StonehewerGiantEffect> {
|
||||||
|
|
||||||
|
public StonehewerGiantEffect() {
|
||||||
|
super(Outcome.PutCardInPlay);
|
||||||
|
this.staticText = "Search your library for an Equipment card and put it onto the battlefield. Attach it to a creature you control. Then shuffle your library";
|
||||||
|
}
|
||||||
|
|
||||||
|
public StonehewerGiantEffect(final StonehewerGiantEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StonehewerGiantEffect copy() {
|
||||||
|
return new StonehewerGiantEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (player == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
FilterCard filter = new FilterCard("Equipment");
|
||||||
|
filter.add(new SubtypePredicate("Equipment"));
|
||||||
|
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||||
|
if (player.searchLibrary(target, game)) {
|
||||||
|
Card card = player.getLibrary().getCard(target.getFirstTarget(), game);
|
||||||
|
if (card != null) {
|
||||||
|
card.putOntoBattlefield(game, Zone.LIBRARY, source.getId(), source.getControllerId());
|
||||||
|
Permanent equipment = game.getPermanent(card.getId());
|
||||||
|
|
||||||
|
Target targetCreature = new TargetControlledCreaturePermanent();
|
||||||
|
if (equipment != null && player.choose(Outcome.BoostCreature, targetCreature, source.getSourceId(), game)) {
|
||||||
|
Permanent permanent = game.getPermanent(targetCreature.getFirstTarget());
|
||||||
|
permanent.addAttachment(equipment.getId(), game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
player.shuffleLibrary(game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
52
Mage.Sets/src/mage/sets/modernmasters/WoodfallPrimus.java
Normal file
52
Mage.Sets/src/mage/sets/modernmasters/WoodfallPrimus.java
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.modernmasters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class WoodfallPrimus extends mage.sets.shadowmoor.WoodfallPrimus {
|
||||||
|
|
||||||
|
public WoodfallPrimus(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 174;
|
||||||
|
this.expansionSetCode = "MMA";
|
||||||
|
}
|
||||||
|
|
||||||
|
public WoodfallPrimus(final WoodfallPrimus card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WoodfallPrimus copy() {
|
||||||
|
return new WoodfallPrimus(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
54
Mage.Sets/src/mage/sets/morningtide/FeudkillersVerdict.java
Normal file
54
Mage.Sets/src/mage/sets/morningtide/FeudkillersVerdict.java
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* 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.morningtide;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class FeudkillersVerdict extends mage.sets.modernmasters.FeudkillersVerdict {
|
||||||
|
|
||||||
|
public FeudkillersVerdict(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 9;
|
||||||
|
this.expansionSetCode = "MOR";
|
||||||
|
this.rarity = Rarity.RARE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FeudkillersVerdict(final FeudkillersVerdict card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FeudkillersVerdict copy() {
|
||||||
|
return new FeudkillersVerdict(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
54
Mage.Sets/src/mage/sets/morningtide/ReachOfBranches.java
Normal file
54
Mage.Sets/src/mage/sets/morningtide/ReachOfBranches.java
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* 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.morningtide;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class ReachOfBranches extends mage.sets.modernmasters.ReachOfBranches {
|
||||||
|
|
||||||
|
public ReachOfBranches(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 132;
|
||||||
|
this.expansionSetCode = "MOR";
|
||||||
|
this.rarity = Rarity.RARE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReachOfBranches(final ReachOfBranches card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReachOfBranches copy() {
|
||||||
|
return new ReachOfBranches(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
52
Mage.Sets/src/mage/sets/morningtide/StonehewerGiant.java
Normal file
52
Mage.Sets/src/mage/sets/morningtide/StonehewerGiant.java
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.morningtide;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class StonehewerGiant extends mage.sets.modernmasters.StonehewerGiant {
|
||||||
|
|
||||||
|
public StonehewerGiant(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 24;
|
||||||
|
this.expansionSetCode = "MOR";
|
||||||
|
}
|
||||||
|
|
||||||
|
public StonehewerGiant(final StonehewerGiant card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StonehewerGiant copy() {
|
||||||
|
return new StonehewerGiant(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
63
Mage.Sets/src/mage/sets/planarchaos/BruteForce.java
Normal file
63
Mage.Sets/src/mage/sets/planarchaos/BruteForce.java
Normal file
|
|
@ -0,0 +1,63 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.planarchaos;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Duration;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class BruteForce extends CardImpl<BruteForce> {
|
||||||
|
|
||||||
|
public BruteForce(UUID ownerId) {
|
||||||
|
super(ownerId, 116, "Brute Force", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}");
|
||||||
|
this.expansionSetCode = "PLC";
|
||||||
|
|
||||||
|
this.color.setRed(true);
|
||||||
|
|
||||||
|
// Target creature gets +3/+3 until end of turn.
|
||||||
|
this.getSpellAbility().getEffects().add(new BoostTargetEffect(3,3, Duration.EndOfTurn));
|
||||||
|
this.getSpellAbility().getTargets().add(new TargetCreaturePermanent(true));
|
||||||
|
}
|
||||||
|
|
||||||
|
public BruteForce(final BruteForce card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BruteForce copy() {
|
||||||
|
return new BruteForce(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
73
Mage.Sets/src/mage/sets/planarchaos/CitanulWoodreaders.java
Normal file
73
Mage.Sets/src/mage/sets/planarchaos/CitanulWoodreaders.java
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.planarchaos;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.condition.common.KickedCondition;
|
||||||
|
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||||
|
import mage.abilities.keyword.KickerAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class CitanulWoodreaders extends CardImpl<CitanulWoodreaders> {
|
||||||
|
|
||||||
|
public CitanulWoodreaders(UUID ownerId) {
|
||||||
|
super(ownerId, 125, "Citanul Woodreaders", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||||
|
this.expansionSetCode = "PLC";
|
||||||
|
this.subtype.add("Human");
|
||||||
|
this.subtype.add("Druid");
|
||||||
|
|
||||||
|
this.color.setGreen(true);
|
||||||
|
this.power = new MageInt(1);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Kicker {2}{G}
|
||||||
|
this.addAbility(new KickerAbility("{2}{G}"));
|
||||||
|
// When Citanul Woodreaders enters the battlefield, if it was kicked, draw two cards.
|
||||||
|
this.addAbility(new ConditionalTriggeredAbility(
|
||||||
|
new EntersBattlefieldTriggeredAbility(new DrawCardControllerEffect(2)),
|
||||||
|
KickedCondition.getInstance(),"When Citanul Woodreaders enters the battlefield, if it was kicked, draw two cards."));
|
||||||
|
}
|
||||||
|
|
||||||
|
public CitanulWoodreaders(final CitanulWoodreaders card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CitanulWoodreaders copy() {
|
||||||
|
return new CitanulWoodreaders(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
68
Mage.Sets/src/mage/sets/planarchaos/GiantDustwasp.java
Normal file
68
Mage.Sets/src/mage/sets/planarchaos/GiantDustwasp.java
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.planarchaos;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.keyword.SuspendAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class GiantDustwasp extends CardImpl<GiantDustwasp> {
|
||||||
|
|
||||||
|
public GiantDustwasp(UUID ownerId) {
|
||||||
|
super(ownerId, 129, "Giant Dustwasp", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
|
||||||
|
this.expansionSetCode = "PLC";
|
||||||
|
this.subtype.add("Insect");
|
||||||
|
|
||||||
|
this.color.setGreen(true);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
// Suspend 4-{1}{G}
|
||||||
|
this.addAbility(new SuspendAbility(4, new ManaCostsImpl("{1}{G}"), this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiantDustwasp(final GiantDustwasp card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GiantDustwasp copy() {
|
||||||
|
return new GiantDustwasp(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -54,7 +54,7 @@ public class FesteringGoblin extends CardImpl<FesteringGoblin> {
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
Ability ability = new DiesTriggeredAbility(new BoostTargetEffect(-1, -1, Constants.Duration.EndOfTurn), false);
|
Ability ability = new DiesTriggeredAbility(new BoostTargetEffect(-1, -1, Constants.Duration.EndOfTurn), false);
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent(true));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ public class ElderwoodScion extends CardImpl<ElderwoodScion> {
|
||||||
|
|
||||||
class ElderwoodScionCostReductionEffect extends CostModificationEffectImpl<ElderwoodScionCostReductionEffect> {
|
class ElderwoodScionCostReductionEffect extends CostModificationEffectImpl<ElderwoodScionCostReductionEffect> {
|
||||||
|
|
||||||
private static final String effectText = "Spells your opponents cast that target Elderwood Scion cost {2} more to cast";
|
private static final String effectText = "Spells you cast that target {this} cost {2} less to cast";
|
||||||
|
|
||||||
ElderwoodScionCostReductionEffect() {
|
ElderwoodScionCostReductionEffect() {
|
||||||
super(Constants.Duration.WhileOnBattlefield, Constants.Outcome.Benefit);
|
super(Constants.Duration.WhileOnBattlefield, Constants.Outcome.Benefit);
|
||||||
|
|
@ -128,7 +128,7 @@ class ElderwoodScionCostReductionEffect extends CostModificationEffectImpl<Elder
|
||||||
|
|
||||||
class ElderwoodScionCostReductionEffect2 extends CostModificationEffectImpl<ElderwoodScionCostReductionEffect2> {
|
class ElderwoodScionCostReductionEffect2 extends CostModificationEffectImpl<ElderwoodScionCostReductionEffect2> {
|
||||||
|
|
||||||
private static final String effectText = "Spells you cast that target {this} cost {2} less to cast";
|
private static final String effectText = "Spells your opponents cast that target Elderwood Scion cost {2} more to cast";
|
||||||
|
|
||||||
ElderwoodScionCostReductionEffect2() {
|
ElderwoodScionCostReductionEffect2() {
|
||||||
super(Constants.Duration.WhileOnBattlefield, Constants.Outcome.Benefit);
|
super(Constants.Duration.WhileOnBattlefield, Constants.Outcome.Benefit);
|
||||||
|
|
|
||||||
84
Mage.Sets/src/mage/sets/shadowmoor/WoodfallPrimus.java
Normal file
84
Mage.Sets/src/mage/sets/shadowmoor/WoodfallPrimus.java
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
/*
|
||||||
|
* 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.shadowmoor;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
|
import mage.abilities.keyword.PersistAbility;
|
||||||
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class WoodfallPrimus extends CardImpl<WoodfallPrimus> {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public WoodfallPrimus(UUID ownerId) {
|
||||||
|
super(ownerId, 135, "Woodfall Primus", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{G}{G}{G}");
|
||||||
|
this.expansionSetCode = "SHM";
|
||||||
|
this.subtype.add("Treefolk");
|
||||||
|
this.subtype.add("Shaman");
|
||||||
|
|
||||||
|
this.color.setGreen(true);
|
||||||
|
this.power = new MageInt(6);
|
||||||
|
this.toughness = new MageInt(6);
|
||||||
|
|
||||||
|
// Trample
|
||||||
|
this.addAbility(TrampleAbility.getInstance());
|
||||||
|
// When Woodfall Primus enters the battlefield, destroy target noncreature permanent.
|
||||||
|
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
|
||||||
|
ability.addTarget(new TargetPermanent(filter));
|
||||||
|
this.addAbility(ability);
|
||||||
|
// Persist
|
||||||
|
this.addAbility(new PersistAbility());
|
||||||
|
}
|
||||||
|
|
||||||
|
public WoodfallPrimus(final WoodfallPrimus card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WoodfallPrimus copy() {
|
||||||
|
return new WoodfallPrimus(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -32,17 +32,21 @@ import mage.Constants;
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Duration;
|
import mage.Constants.Duration;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
|
import mage.Constants.TargetController;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.ObjectColor;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.RequirementEffect;
|
import mage.abilities.effects.RequirementEffect;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.keyword.HasteAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.token.GoblinToken;
|
import mage.game.permanent.token.Token;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -57,7 +61,7 @@ public class GoblinAssault extends CardImpl<GoblinAssault> {
|
||||||
this.color.setRed(true);
|
this.color.setRed(true);
|
||||||
|
|
||||||
// At the beginning of your upkeep, put a 1/1 red Goblin creature token with haste onto the battlefield.
|
// At the beginning of your upkeep, put a 1/1 red Goblin creature token with haste onto the battlefield.
|
||||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new GoblinToken()), Constants.TargetController.YOU, false));
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new GoblinAssaultToken()), TargetController.YOU, false));
|
||||||
// Goblin creatures attack each turn if able.
|
// Goblin creatures attack each turn if able.
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GoblinAssaultEffect()));
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GoblinAssaultEffect()));
|
||||||
}
|
}
|
||||||
|
|
@ -113,3 +117,17 @@ class GoblinAssaultEffect extends RequirementEffect<GoblinAssaultEffect> {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class GoblinAssaultToken extends Token {
|
||||||
|
|
||||||
|
public GoblinAssaultToken() {
|
||||||
|
super("Goblin", "1/1 red Goblin creature token with haste");
|
||||||
|
cardType.add(CardType.CREATURE);
|
||||||
|
subtype.add("Goblin");
|
||||||
|
|
||||||
|
color = ObjectColor.RED;
|
||||||
|
power = new MageInt(1);
|
||||||
|
toughness = new MageInt(1);
|
||||||
|
this.addAbility(HasteAbility.getInstance());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,21 +64,23 @@ public class SarkhanVol extends CardImpl<SarkhanVol> {
|
||||||
this.color.setGreen(true);
|
this.color.setGreen(true);
|
||||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false));
|
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false));
|
||||||
|
|
||||||
|
// +1: Creatures you control get +1/+1 and gain haste until end of turn.
|
||||||
Effects effects1 = new Effects();
|
Effects effects1 = new Effects();
|
||||||
effects1.add(new BoostControlledEffect(1, 1, Duration.EndOfTurn));
|
effects1.add(new BoostControlledEffect(1, 1, Duration.EndOfTurn));
|
||||||
effects1.add(new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent()));
|
effects1.add(new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent()));
|
||||||
this.addAbility(new LoyaltyAbility(effects1, 1));
|
this.addAbility(new LoyaltyAbility(effects1, 1));
|
||||||
|
|
||||||
|
// -2: Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
|
||||||
Effects effects2 = new Effects();
|
Effects effects2 = new Effects();
|
||||||
effects2.add(new GainControlTargetEffect(Duration.EndOfTurn));
|
effects2.add(new GainControlTargetEffect(Duration.EndOfTurn));
|
||||||
effects2.add(new UntapTargetEffect());
|
effects2.add(new UntapTargetEffect());
|
||||||
effects2.add(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
|
effects2.add(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
|
||||||
|
|
||||||
LoyaltyAbility ability = new LoyaltyAbility(effects2, -2);
|
LoyaltyAbility ability = new LoyaltyAbility(effects2, -2);
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(dragonToken), -6));
|
// -6: Put five 4/4 red Dragon creature tokens with flying onto the battlefield.
|
||||||
|
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(dragonToken, 5), -6));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SarkhanVol(final SarkhanVol card) {
|
public SarkhanVol(final SarkhanVol card) {
|
||||||
|
|
|
||||||
68
Mage.Sets/src/mage/sets/timespiral/ErrantEphemeron.java
Normal file
68
Mage.Sets/src/mage/sets/timespiral/ErrantEphemeron.java
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.timespiral;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.keyword.SuspendAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class ErrantEphemeron extends CardImpl<ErrantEphemeron> {
|
||||||
|
|
||||||
|
public ErrantEphemeron(UUID ownerId) {
|
||||||
|
super(ownerId, 60, "Errant Ephemeron", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{6}{U}");
|
||||||
|
this.expansionSetCode = "TSP";
|
||||||
|
this.subtype.add("Illusion");
|
||||||
|
|
||||||
|
this.color.setBlue(true);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
// Suspend 4-{1}{U}
|
||||||
|
this.addAbility(new SuspendAbility(4, new ManaCostsImpl("{1}{U}"), this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public ErrantEphemeron(final ErrantEphemeron card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ErrantEphemeron copy() {
|
||||||
|
return new ErrantEphemeron(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
85
Mage.Sets/src/mage/sets/timespiral/NantukoShaman.java
Normal file
85
Mage.Sets/src/mage/sets/timespiral/NantukoShaman.java
Normal file
|
|
@ -0,0 +1,85 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.timespiral;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||||
|
import mage.abilities.keyword.SuspendAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.filter.common.FilterLandPermanent;
|
||||||
|
import mage.filter.predicate.permanent.TappedPredicate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class NantukoShaman extends CardImpl<NantukoShaman> {
|
||||||
|
|
||||||
|
private static final FilterLandPermanent filter = new FilterLandPermanent();
|
||||||
|
static {
|
||||||
|
filter.add(new TappedPredicate());
|
||||||
|
}
|
||||||
|
|
||||||
|
public NantukoShaman(UUID ownerId) {
|
||||||
|
super(ownerId, 208, "Nantuko Shaman", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||||
|
this.expansionSetCode = "TSP";
|
||||||
|
this.subtype.add("Insect");
|
||||||
|
this.subtype.add("Shaman");
|
||||||
|
|
||||||
|
this.color.setGreen(true);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// When Nantuko Shaman enters the battlefield, if you control no tapped lands, draw a card.
|
||||||
|
Ability ability = new ConditionalTriggeredAbility(
|
||||||
|
new EntersBattlefieldTriggeredAbility(new DrawCardControllerEffect(1)),
|
||||||
|
new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.EQUAL_TO, 0),
|
||||||
|
"When {this} enters the battlefield, if you control no tapped lands, draw a card");
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Suspend 1-{2}{G}{G}
|
||||||
|
this.addAbility(new SuspendAbility(1, new ManaCostsImpl("{2}{G}{G}"), this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public NantukoShaman(final NantukoShaman card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NantukoShaman copy() {
|
||||||
|
return new NantukoShaman(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
77
Mage.Sets/src/mage/sets/timespiral/RiftwingCloudskate.java
Normal file
77
Mage.Sets/src/mage/sets/timespiral/RiftwingCloudskate.java
Normal file
|
|
@ -0,0 +1,77 @@
|
||||||
|
/*
|
||||||
|
* 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.timespiral;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.keyword.SuspendAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class RiftwingCloudskate extends CardImpl<RiftwingCloudskate> {
|
||||||
|
|
||||||
|
public RiftwingCloudskate(UUID ownerId) {
|
||||||
|
super(ownerId, 73, "Riftwing Cloudskate", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
|
||||||
|
this.expansionSetCode = "TSP";
|
||||||
|
this.subtype.add("Illusion");
|
||||||
|
|
||||||
|
this.color.setBlue(true);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
// When Riftwing Cloudskate enters the battlefield, return target permanent to its owner's hand.
|
||||||
|
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false);
|
||||||
|
ability.addTarget(new TargetPermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Suspend 3-{1}{U}
|
||||||
|
this.addAbility(new SuspendAbility(3, new ManaCostsImpl("{1}{U}"),this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public RiftwingCloudskate(final RiftwingCloudskate card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RiftwingCloudskate copy() {
|
||||||
|
return new RiftwingCloudskate(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -79,7 +79,7 @@ public class EntersBattlefieldAllTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntersBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional, boolean setTargetPointer, String rule, boolean controlled) {
|
public EntersBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional, boolean setTargetPointer, String rule, boolean controlled) {
|
||||||
super(Zone.BATTLEFIELD, effect, optional);
|
super(zone, effect, optional);
|
||||||
this.filter = filter;
|
this.filter = filter;
|
||||||
this.rule = rule;
|
this.rule = rule;
|
||||||
this.controlled = controlled;
|
this.controlled = controlled;
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,11 @@ public class ConditionalTriggeredAbility extends TriggeredAbilityImpl<Conditiona
|
||||||
this.text = triggered.text;
|
this.text = triggered.text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkInterveningIfClause(Game game) {
|
||||||
|
return condition.apply(game, this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ConditionalTriggeredAbility copy() {
|
public ConditionalTriggeredAbility copy() {
|
||||||
return new ConditionalTriggeredAbility(this);
|
return new ConditionalTriggeredAbility(this);
|
||||||
|
|
@ -47,9 +52,9 @@ public class ConditionalTriggeredAbility extends TriggeredAbilityImpl<Conditiona
|
||||||
ability.setSourceId(this.getSourceId());
|
ability.setSourceId(this.getSourceId());
|
||||||
ability.setControllerId(this.getControllerId());
|
ability.setControllerId(this.getControllerId());
|
||||||
if (ability.checkTrigger(event, game)) {
|
if (ability.checkTrigger(event, game)) {
|
||||||
if (condition.apply(game, this)) {
|
// if (condition.apply(game, this)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,18 +28,21 @@
|
||||||
|
|
||||||
package mage.abilities.effects.common;
|
package mage.abilities.effects.common;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
import mage.Constants.Outcome;
|
import mage.Constants.Outcome;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -47,18 +50,21 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class SacrificeAllEffect extends OneShotEffect<SacrificeAllEffect> {
|
public class SacrificeAllEffect extends OneShotEffect<SacrificeAllEffect> {
|
||||||
|
|
||||||
protected int amount;
|
protected DynamicValue amount;
|
||||||
protected FilterControlledPermanent filter;
|
protected FilterControlledPermanent filter;
|
||||||
|
|
||||||
public SacrificeAllEffect(FilterControlledPermanent filter) {
|
public SacrificeAllEffect(FilterControlledPermanent filter) {
|
||||||
this(1, filter);
|
this(1, filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SacrificeAllEffect(int amount, FilterControlledPermanent filter) {
|
public SacrificeAllEffect(int amount, FilterControlledPermanent filter) {
|
||||||
|
this(new StaticValue(amount), filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SacrificeAllEffect(DynamicValue amount, FilterControlledPermanent filter) {
|
||||||
super(Outcome.Sacrifice);
|
super(Outcome.Sacrifice);
|
||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
this.filter = filter;
|
this.filter = filter;
|
||||||
setText();
|
setText();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SacrificeAllEffect(final SacrificeAllEffect effect) {
|
public SacrificeAllEffect(final SacrificeAllEffect effect) {
|
||||||
|
|
@ -83,7 +89,7 @@ public class SacrificeAllEffect extends OneShotEffect<SacrificeAllEffect> {
|
||||||
for (UUID playerId : controller.getInRange()) {
|
for (UUID playerId : controller.getInRange()) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
int numTargets = Math.min(amount, game.getBattlefield().countAll(filter, player.getId(), game));
|
int numTargets = Math.min(amount.calculate(game, source), game.getBattlefield().countAll(filter, player.getId(), game));
|
||||||
TargetControlledPermanent target = new TargetControlledPermanent(numTargets, numTargets, filter, false);
|
TargetControlledPermanent target = new TargetControlledPermanent(numTargets, numTargets, filter, false);
|
||||||
if (target.canChoose(player.getId(), game)) {
|
if (target.canChoose(player.getId(), game)) {
|
||||||
while (!target.isChosen()) {
|
while (!target.isChosen()) {
|
||||||
|
|
@ -105,13 +111,13 @@ public class SacrificeAllEffect extends OneShotEffect<SacrificeAllEffect> {
|
||||||
private void setText() {
|
private void setText() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("Each players sacrifices ");
|
sb.append("Each players sacrifices ");
|
||||||
if (amount > 1)
|
if (amount.toString().equals("X")) {
|
||||||
sb.append(amount).append(" ");
|
sb.append(amount.toString()).append(" ");
|
||||||
else
|
} else {
|
||||||
sb.append("a ");
|
sb.append(CardUtil.numberToText(amount.toString()));
|
||||||
|
}
|
||||||
sb.append(filter.getMessage());
|
sb.append(filter.getMessage());
|
||||||
staticText = sb.toString();
|
staticText = sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,15 +87,17 @@ public class CardsImpl extends LinkedHashSet<UUID> implements Cards, Serializabl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Card get(UUID cardId, Game game) {
|
public Card get(UUID cardId, Game game) {
|
||||||
if (this.contains(cardId))
|
if (this.contains(cardId)) {
|
||||||
return game.getCard(cardId);
|
return game.getCard(cardId);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void remove(Card card) {
|
public void remove(Card card) {
|
||||||
if (card == null)
|
if (card == null) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
this.remove(card.getId());
|
this.remove(card.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -109,8 +111,9 @@ public class CardsImpl extends LinkedHashSet<UUID> implements Cards, Serializabl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Card getRandom(Game game) {
|
public Card getRandom(Game game) {
|
||||||
if (this.size() == 0)
|
if (this.size() == 0) {
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
UUID[] cards = this.toArray(new UUID[0]);
|
UUID[] cards = this.toArray(new UUID[0]);
|
||||||
return game.getCard(cards[rnd.nextInt(cards.length)]);
|
return game.getCard(cards[rnd.nextInt(cards.length)]);
|
||||||
}
|
}
|
||||||
|
|
@ -118,9 +121,10 @@ public class CardsImpl extends LinkedHashSet<UUID> implements Cards, Serializabl
|
||||||
@Override
|
@Override
|
||||||
public int count(FilterCard filter, Game game) {
|
public int count(FilterCard filter, Game game) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
for (UUID card: this) {
|
for (UUID cardId: this) {
|
||||||
if (filter.match(game.getCard(card), game))
|
if (filter.match(game.getCard(cardId), game)) {
|
||||||
result++;
|
result++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
|
import mage.cards.repository.CardInfo;
|
||||||
|
import mage.cards.repository.CardRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -99,7 +101,16 @@ public class Constructed extends DeckValidatorImpl {
|
||||||
if (!setCodes.isEmpty()) {
|
if (!setCodes.isEmpty()) {
|
||||||
for (Card card: deck.getCards()) {
|
for (Card card: deck.getCards()) {
|
||||||
if (!setCodes.contains(card.getExpansionSetCode())) {
|
if (!setCodes.contains(card.getExpansionSetCode())) {
|
||||||
if (!invalid.containsKey(card.getName())) {
|
// check if card is legal if taken from other set
|
||||||
|
boolean legal = false;
|
||||||
|
List<CardInfo> cardInfos = CardRepository.instance.findCards(card.getName());
|
||||||
|
for (CardInfo cardInfo: cardInfos) {
|
||||||
|
if (setCodes.contains(cardInfo.getSetCode())) {
|
||||||
|
legal = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!legal && !invalid.containsKey(card.getName())) {
|
||||||
invalid.put(card.getName(), "Invalid set: " + card.getExpansionSetCode());
|
invalid.put(card.getName(), "Invalid set: " + card.getExpansionSetCode());
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
|
|
@ -107,7 +118,16 @@ public class Constructed extends DeckValidatorImpl {
|
||||||
}
|
}
|
||||||
for (Card card: deck.getSideboard()) {
|
for (Card card: deck.getSideboard()) {
|
||||||
if (!setCodes.contains(card.getExpansionSetCode())) {
|
if (!setCodes.contains(card.getExpansionSetCode())) {
|
||||||
if (!invalid.containsKey(card.getName())) {
|
// check if card is legal if taken from other set
|
||||||
|
boolean legal = false;
|
||||||
|
List<CardInfo> cardInfos = CardRepository.instance.findCards(card.getName());
|
||||||
|
for (CardInfo cardInfo: cardInfos) {
|
||||||
|
if (setCodes.contains(cardInfo.getSetCode())) {
|
||||||
|
legal = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!legal && !invalid.containsKey(card.getName())) {
|
||||||
invalid.put(card.getName(), "Invalid set: " + card.getExpansionSetCode());
|
invalid.put(card.getName(), "Invalid set: " + card.getExpansionSetCode());
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
package mage.game.match;
|
package mage.game.match;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.cards.decks.Deck;
|
import mage.cards.decks.Deck;
|
||||||
|
|
@ -71,4 +72,7 @@ public interface Match {
|
||||||
void addTableEventListener(Listener<TableEvent> listener);
|
void addTableEventListener(Listener<TableEvent> listener);
|
||||||
void fireSideboardEvent(UUID playerId, Deck deck);
|
void fireSideboardEvent(UUID playerId, Deck deck);
|
||||||
|
|
||||||
|
// match times
|
||||||
|
Date getStartTime();
|
||||||
|
Date getEndTime();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ package mage.game.match;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -56,8 +57,12 @@ public abstract class MatchImpl implements Match {
|
||||||
|
|
||||||
protected TableEventSource tableEventSource = new TableEventSource();
|
protected TableEventSource tableEventSource = new TableEventSource();
|
||||||
|
|
||||||
|
protected Date startTime;
|
||||||
|
protected Date endTime;
|
||||||
|
|
||||||
public MatchImpl(MatchOptions options) {
|
public MatchImpl(MatchOptions options) {
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
startTime = new Date();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -114,6 +119,7 @@ public abstract class MatchImpl implements Match {
|
||||||
public boolean isMatchOver() {
|
public boolean isMatchOver() {
|
||||||
for (MatchPlayer player: players) {
|
for (MatchPlayer player: players) {
|
||||||
if (player.getWins() >= options.getWinsNeeded()) {
|
if (player.getWins() >= options.getWinsNeeded()) {
|
||||||
|
endTime = new Date();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -256,4 +262,14 @@ public abstract class MatchImpl implements Match {
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date getStartTime() {
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date getEndTime() {
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
package mage.game.tournament;
|
package mage.game.tournament;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.cards.ExpansionSet;
|
import mage.cards.ExpansionSet;
|
||||||
|
|
@ -50,6 +51,13 @@ public interface Tournament {
|
||||||
Collection<TournamentPlayer> getPlayers();
|
Collection<TournamentPlayer> getPlayers();
|
||||||
Collection<Round> getRounds();
|
Collection<Round> getRounds();
|
||||||
List<ExpansionSet> getSets();
|
List<ExpansionSet> getSets();
|
||||||
|
|
||||||
|
void setSetsFormatedShort(String setInfo);
|
||||||
|
/**
|
||||||
|
* Gives back a String that shows the included sets (e.g. "3xRTR" or "1xDGM 1xGTC 1xRTR")
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
String getSetsFormatedShort();
|
||||||
void submitDeck(UUID playerId, Deck deck);
|
void submitDeck(UUID playerId, Deck deck);
|
||||||
void updateDeck(UUID playerId, Deck deck);
|
void updateDeck(UUID playerId, Deck deck);
|
||||||
void autoSubmit(UUID playerId, Deck deck);
|
void autoSubmit(UUID playerId, Deck deck);
|
||||||
|
|
@ -62,4 +70,9 @@ public interface Tournament {
|
||||||
void addPlayerQueryEventListener(Listener<PlayerQueryEvent> listener);
|
void addPlayerQueryEventListener(Listener<PlayerQueryEvent> listener);
|
||||||
void fireConstructEvent(UUID playerId);
|
void fireConstructEvent(UUID playerId);
|
||||||
|
|
||||||
|
TournamentOptions getOptions();
|
||||||
|
|
||||||
|
// tournament times
|
||||||
|
Date getStartTime();
|
||||||
|
Date getEndTime();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,14 +53,19 @@ public abstract class TournamentImpl implements Tournament {
|
||||||
protected String matchName;
|
protected String matchName;
|
||||||
protected TournamentOptions options;
|
protected TournamentOptions options;
|
||||||
protected List<ExpansionSet> sets = new ArrayList<ExpansionSet>();
|
protected List<ExpansionSet> sets = new ArrayList<ExpansionSet>();
|
||||||
|
protected String setsInfoShort;
|
||||||
|
|
||||||
protected TableEventSource tableEventSource = new TableEventSource();
|
protected TableEventSource tableEventSource = new TableEventSource();
|
||||||
protected PlayerQueryEventSource playerQueryEventSource = new PlayerQueryEventSource();
|
protected PlayerQueryEventSource playerQueryEventSource = new PlayerQueryEventSource();
|
||||||
|
|
||||||
|
protected Date startTime;
|
||||||
|
protected Date endTime;
|
||||||
|
|
||||||
private static final int CONSTRUCT_TIME = 600;
|
private static final int CONSTRUCT_TIME = 600;
|
||||||
|
|
||||||
public TournamentImpl(TournamentOptions options) {
|
public TournamentImpl(TournamentOptions options) {
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
startTime = new Date();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -85,6 +90,11 @@ public abstract class TournamentImpl implements Tournament {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TournamentOptions getOptions() {
|
||||||
|
return options;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<TournamentPlayer> getPlayers() {
|
public Collection<TournamentPlayer> getPlayers() {
|
||||||
return players.values();
|
return players.values();
|
||||||
|
|
@ -100,6 +110,16 @@ public abstract class TournamentImpl implements Tournament {
|
||||||
return sets;
|
return sets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setSetsFormatedShort(String setsInfoShort) {
|
||||||
|
this.setsInfoShort = setsInfoShort;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSetsFormatedShort() {
|
||||||
|
return setsInfoShort;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void leave(UUID playerId) {
|
public void leave(UUID playerId) {
|
||||||
if (players.containsKey(playerId)) {
|
if (players.containsKey(playerId)) {
|
||||||
|
|
@ -281,9 +301,20 @@ public abstract class TournamentImpl implements Tournament {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void end() {
|
public void end() {
|
||||||
|
endTime = new Date();
|
||||||
tableEventSource.fireTableEvent(EventType.END);
|
tableEventSource.fireTableEvent(EventType.END);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void runTournament();
|
protected abstract void runTournament();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date getStartTime() {
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date getEndTime() {
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue