Add in Penny Dreadful EDH format (plus filter options for deck editor).

This commit is contained in:
spjspj 2017-08-04 17:13:25 +10:00
parent 15fd74063c
commit 6435b9950a
14 changed files with 19702 additions and 14 deletions

View file

@ -206,6 +206,18 @@
</Component>
<Component class="javax.swing.JToolBar$Separator" name="jSeparator2">
</Component>
<Component class="javax.swing.JCheckBox" name="chkPennyDreadful">
<Properties>
<Property name="text" type="java.lang.String" value="Penny Dreadful Only"/>
<Property name="toolTipText" type="java.lang.String" value="Will only allow Penny Dreadful legal cards to be shown."/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="4"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkPilesActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="btnBooster">
<Properties>
<Property name="text" type="java.lang.String" value="Open Booster"/>
@ -528,10 +540,11 @@
<Component id="chkRules" alignment="1" max="32767" attributes="0"/>
<Component id="chkNames" alignment="1" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jButtonRemoveFromMain" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jButtonAddToSideboard" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jButtonRemoveFromSideboard" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jTextFieldSearch" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jButtonSearch" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jButtonClean" alignment="3" min="-2" max="-2" attributes="0"/>
@ -539,6 +552,7 @@
<Component id="jButtonAddToMain" alignment="3" max="-2" attributes="0"/>
<Component id="cardCountLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>

View file

@ -36,6 +36,7 @@ package mage.client.deckeditor;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.util.Map.Entry;
import javax.swing.*;
import javax.swing.table.DefaultTableCellRenderer;
import mage.MageObject;
@ -74,6 +75,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
private BigCard bigCard;
private boolean limited = false;
private final SortSetting sortSetting;
private static final Map<String, Integer> pdAllowed = new HashMap<>();
private final ActionListener searchAction = evt -> jButtonSearchActionPerformed(evt);
@ -372,6 +374,12 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
try {
java.util.List<Card> filteredCards = new ArrayList<>();
setCursor(new Cursor(Cursor.WAIT_CURSOR));
boolean chkPD = chkPennyDreadful.isSelected();
if (chkPD) {
generatePennyDreadfulHash();
}
if (limited) {
for (Card card : cards) {
if (filter.match(card, null)) {
@ -383,6 +391,11 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
for (CardInfo cardInfo : foundCards) {
Card card = cardInfo.getMockCard();
if (filter.match(card, null)) {
if (chkPD) {
if (!pdAllowed.containsKey(card.getName())) {
continue;
}
}
filteredCards.add(card);
}
}
@ -419,6 +432,22 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
}
}
public void generatePennyDreadfulHash() {
if (pdAllowed.size() > 0) {
return;
}
Properties properties = new Properties();
try {
properties.load(CardSelector.class.getResourceAsStream("pennydreadful.properties"));
} catch (Exception e) {
e.printStackTrace();
}
for (final Entry<Object, Object> entry : properties.entrySet()) {
pdAllowed.put((String) entry.getKey(), 1);
}
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
@ -439,6 +468,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
jSeparator1 = new javax.swing.JToolBar.Separator();
cbExpansionSet = new javax.swing.JComboBox<>();
jSeparator2 = new javax.swing.JToolBar.Separator();
chkPennyDreadful = new javax.swing.JCheckBox();
btnBooster = new javax.swing.JButton();
btnClear = new javax.swing.JButton();
tbTypes = new javax.swing.JToolBar();
@ -583,6 +613,27 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
tbColor.add(cbExpansionSet);
tbColor.add(jSeparator2);
chkPennyDreadful.setText("Penny Dreadful");
chkPennyDreadful.setToolTipText("Will only allow Penny Dreadful legal cards to be shown.");
chkPennyDreadful.setFocusable(false);
chkPennyDreadful.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
chkPennyDreadful.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
chkPennyDreadful.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chkPilesActionPerformed(evt);
}
});
JPopupMenu filterByFormatPopup = new JPopupMenu();
filterByFormatPopup.add(chkPennyDreadful);
filterByFormatPopup.setLayout(new GridBagLayout());
ButtonGroup selectByTypeModeGroup = new ButtonGroup();
JButton filterByFormatButton = new JButton ("Filter by Format");
makeButtonPopup(filterByFormatButton, filterByFormatPopup);
tbColor.add(filterByFormatButton);
btnBooster.setText("Open Booster");
btnBooster.setToolTipText("(CURRENTLY NOT WORKING) Generates a booster of the selected set and adds the cards to the card selector.");
btnBooster.setFocusable(false);
@ -939,16 +990,17 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
.addComponent(chkRules, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(chkNames, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(cardSelectorBottomPanelLayout.createSequentialGroup()
.addGroup(cardSelectorBottomPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addGroup(cardSelectorBottomPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButtonRemoveFromMain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButtonAddToSideboard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButtonRemoveFromSideboard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(cardSelectorBottomPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextFieldSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButtonSearch)
.addComponent(jButtonClean)
.addComponent(cardCount)
.addComponent(jButtonAddToMain, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cardCountLabel))
.addComponent(cardCountLabel)))
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
@ -1204,6 +1256,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
private javax.swing.JComboBox<String> cbExpansionSet;
private javax.swing.JComboBox<SortBy> cbSortBy;
private javax.swing.JCheckBox chkNames;
private javax.swing.JCheckBox chkPennyDreadful;
private javax.swing.JCheckBox chkPiles;
private javax.swing.JCheckBox chkRules;
private javax.swing.JCheckBox chkTypes;
@ -1287,4 +1340,8 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
public void dragCardDrop(MouseEvent e, DragCardSource source, Collection<CardView> cards) {
// Need to add cards back to tally
}
private static void makeButtonPopup(final AbstractButton button, final JPopupMenu popup) {
button.addActionListener(e -> popup.show(button, 0, button.getHeight()));
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,180 @@
/*
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.deck;
import java.util.*;
import java.util.Map.Entry;
import mage.abilities.common.CanBeYourCommanderAbility;
import mage.abilities.keyword.PartnerAbility;
import mage.cards.Card;
import mage.cards.ExpansionSet;
import mage.cards.Sets;
import mage.cards.decks.Constructed;
import mage.cards.decks.Deck;
import mage.constants.SetType;
import mage.filter.FilterMana;
/**
*
* @author spjspj
*/
public class PennyDreadfulCommander extends Constructed {
protected List<String> bannedCommander = new ArrayList<>();
private static final Map<String, Integer> pdAllowed = new HashMap<>();
private static boolean setupAllowed = false;
public PennyDreadfulCommander() {
this("Penny Dreadful Commander");
for (ExpansionSet set : Sets.getInstance().values()) {
if (set.getSetType() != SetType.CUSTOM_SET) {
setCodes.add(set.getCode());
}
}
}
public PennyDreadfulCommander(String name) {
super(name);
}
@Override
public boolean validate(Deck deck) {
boolean valid = true;
FilterMana colorIdentity = new FilterMana();
if (deck.getCards().size() + deck.getSideboard().size() != 100) {
invalid.put("Deck", "Must contain 100 cards: has " + (deck.getCards().size() + deck.getSideboard().size()) + " cards");
valid = false;
}
List<String> basicLandNames = new ArrayList<>(Arrays.asList("Forest", "Island", "Mountain", "Swamp", "Plains", "Wastes"));
Map<String, Integer> counts = new HashMap<>();
countCards(counts, deck.getCards());
countCards(counts, deck.getSideboard());
for (Map.Entry<String, Integer> entry : counts.entrySet()) {
if (entry.getValue() > 1) {
if (!basicLandNames.contains(entry.getKey())) {
invalid.put(entry.getKey(), "Too many: " + entry.getValue());
valid = false;
}
}
}
generatePennyDreadfulHash();
for (String wantedCard : counts.keySet()) {
if (!(pdAllowed.containsKey(wantedCard))) {
invalid.put(wantedCard, "Banned");
valid = false;
}
}
if (deck.getSideboard().size() < 1 || deck.getSideboard().size() > 2) {
invalid.put("Commander", "Sideboard must contain only the commander(s)");
valid = false;
} else {
for (Card commander : deck.getSideboard()) {
if ((!commander.isCreature() || !commander.isLegendary())
&& (!commander.isPlaneswalker() || !commander.getAbilities().contains(CanBeYourCommanderAbility.getInstance()))) {
invalid.put("Commander", "Commander invalid (" + commander.getName() + ')');
valid = false;
}
if (deck.getSideboard().size() == 2 && !commander.getAbilities().contains(PartnerAbility.getInstance())) {
invalid.put("Commander", "Commander without Partner (" + commander.getName() + ')');
valid = false;
}
FilterMana commanderColor = commander.getColorIdentity();
if (commanderColor.isWhite()) {
colorIdentity.setWhite(true);
}
if (commanderColor.isBlue()) {
colorIdentity.setBlue(true);
}
if (commanderColor.isBlack()) {
colorIdentity.setBlack(true);
}
if (commanderColor.isRed()) {
colorIdentity.setRed(true);
}
if (commanderColor.isGreen()) {
colorIdentity.setGreen(true);
}
}
}
for (Card card : deck.getCards()) {
if (!cardHasValidColor(colorIdentity, card)) {
invalid.put(card.getName(), "Invalid color (" + colorIdentity.toString() + ')');
valid = false;
}
}
for (Card card : deck.getCards()) {
if (!isSetAllowed(card.getExpansionSetCode())) {
if (!legalSets(card)) {
invalid.put(card.getName(), "Not allowed Set: " + card.getExpansionSetCode());
valid = false;
}
}
}
for (Card card : deck.getSideboard()) {
if (!isSetAllowed(card.getExpansionSetCode())) {
if (!legalSets(card)) {
invalid.put(card.getName(), "Not allowed Set: " + card.getExpansionSetCode());
valid = false;
}
}
}
return valid;
}
public boolean cardHasValidColor(FilterMana commander, Card card) {
FilterMana cardColor = card.getColorIdentity();
return !(cardColor.isBlack() && !commander.isBlack()
|| cardColor.isBlue() && !commander.isBlue()
|| cardColor.isGreen() && !commander.isGreen()
|| cardColor.isRed() && !commander.isRed()
|| cardColor.isWhite() && !commander.isWhite());
}
public void generatePennyDreadfulHash() {
if (setupAllowed == false) {
setupAllowed = true;
} else {
return;
}
Properties properties = new Properties();
try {
properties.load(PennyDreadfulCommander.class.getResourceAsStream("pennydreadful.properties"));
} catch (Exception e) {
e.printStackTrace();
}
for (final Entry<Object, Object> entry : properties.entrySet()) {
pdAllowed.put((String) entry.getKey(), 1);
}
}
}

View file

@ -0,0 +1,49 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.25</version>
</parent>
<artifactId>mage-game-pennydreadfulcommanderfreeforall</artifactId>
<packaging>jar</packaging>
<name>Mage Game Penny Dreadful Commander Free For All</name>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>mage</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
<finalName>mage-game-freeforall</finalName>
</build>
<properties/>
</project>

View file

@ -0,0 +1,78 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.game;
import java.util.UUID;
import mage.constants.MultiplayerAttackOption;
import mage.constants.RangeOfInfluence;
import mage.game.match.MatchType;
/**
*
* @author spjspj
*/
public class PennyDreadfulCommanderFreeForAll extends GameCommanderImpl {
private int numPlayers;
public PennyDreadfulCommanderFreeForAll(MultiplayerAttackOption attackOption, RangeOfInfluence range, int freeMulligans, int startLife) {
super(attackOption, range, freeMulligans, startLife);
}
public PennyDreadfulCommanderFreeForAll(final PennyDreadfulCommanderFreeForAll game) {
super(game);
this.numPlayers = game.numPlayers;
}
@Override
protected void init(UUID choosingPlayerId) {
startingPlayerSkipsDraw = false;
super.init(choosingPlayerId);
}
@Override
public MatchType getGameType() {
return new PennyDreadfulCommanderFreeForAllType();
}
@Override
public int getNumPlayers() {
return numPlayers;
}
public void setNumPlayers(int numPlayers) {
this.numPlayers = numPlayers;
}
@Override
public PennyDreadfulCommanderFreeForAll copy() {
return new PennyDreadfulCommanderFreeForAll(this);
}
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.game;
import mage.game.match.MatchImpl;
import mage.game.match.MatchOptions;
/**
*
* @author spjspj
*/
public class PennyDreadfulCommanderFreeForAllMatch extends MatchImpl {
public PennyDreadfulCommanderFreeForAllMatch(MatchOptions options) {
super(options);
}
@Override
public void startGame() throws GameException {
int startLife = 40;
boolean alsoHand = true;
if (options.getDeckType().equals("Variant Magic - Duel Penny Dreadful Commander")) {
startLife = 30;
alsoHand = true; // commander going to hand allowed to go to command zone effective July 17, 2015
}
PennyDreadfulCommanderFreeForAll game = new PennyDreadfulCommanderFreeForAll(options.getAttackOption(), options.getRange(), options.getFreeMulligans(), startLife);
game.setStartMessage(this.createGameStartMessage());
game.setAlsoHand(alsoHand);
game.setAlsoLibrary(true);
initGame(game);
games.add(game);
}
}

View file

@ -0,0 +1,58 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.game;
import mage.game.match.MatchType;
/**
*
* @author spjspj
*/
public class PennyDreadfulCommanderFreeForAllType extends MatchType {
public PennyDreadfulCommanderFreeForAllType() {
this.name = "Penny Dreadful Commander Free For All";
this.maxPlayers = 10;
this.minPlayers = 3;
this.numTeams = 0;
this.useAttackOption = true;
this.useRange = true;
this.sideboardingAllowed = false;
}
protected PennyDreadfulCommanderFreeForAllType(final PennyDreadfulCommanderFreeForAllType matchType) {
super(matchType);
}
@Override
public PennyDreadfulCommanderFreeForAllType copy() {
return new PennyDreadfulCommanderFreeForAllType(this);
}
}

View file

@ -0,0 +1,5 @@
#Generated by Maven
#Thu Aug 03 09:40:46 AEST 2017
version=1.4.25
groupId=org.mage
artifactId=mage-game-pennydreadfulcommanderfreeforall

View file

@ -23,6 +23,7 @@
<module>Mage.Game.MomirDuel</module>
<module>Mage.Game.TinyLeadersDuel</module>
<module>Mage.Game.CanadianHighlanderDuel</module>
<module>Mage.Game.PennyDreadfulCommanderFreeForAll</module>
<module>Mage.Game.TwoPlayerDuel</module>
<module>Mage.Player.AI</module>
<module>Mage.Player.AIMinimax</module>

View file

@ -75,6 +75,7 @@
<gameType name="Commander Free For All" jar="mage-game-commanderfreeforall.jar" className="mage.game.CommanderFreeForAllMatch" typeName="mage.game.CommanderFreeForAllType"/>
<gameType name="Tiny Leaders Two Player Duel" jar="mage-game-tinyleadersduel.jar" className="mage.game.TinyLeadersDuelMatch" typeName="mage.game.TinyLeadersDuelType"/>
<gameType name="Canadian Highlander Two Player Duel" jar="mage-game-canadianhighlanderduel.jar" className="mage.game.CanadianHighlanderDuelMatch" typeName="mage.game.CanadianHighlanderDuelType"/>
<gameType name="Penny Dreadful Commander Free For All" jar="mage-game-pennydreadfulcommanderfreeforall.jar" className="mage.game.PennyDreadfulCommanderFreeForAllMatch" typeName="mage.game.PennyDreadfulCommanderFreeForAllType"/>
<gameType name="Momir Basic Two Player Duel" jar="mage-game-momirduel.jar" className="mage.game.MomirDuelMatch" typeName="mage.game.MomirDuelType"/>
</gameTypes>
<tournamentTypes>
@ -148,6 +149,7 @@
<deckType name="Variant Magic - MTGO 1v1 Commander" jar="mage-deck-constructed.jar" className="mage.deck.MTGO1v1Commander"/>
<deckType name="Variant Magic - Tiny Leaders" jar="mage-deck-constructed.jar" className="mage.deck.TinyLeaders"/>
<deckType name="Variant Magic - Momir Basic" jar="mage-deck-constructed.jar" className="mage.deck.Momir"/>
<deckType name="Variant Magic - Penny Dreadful Commander" jar="mage-deck-pennydreadfulconstructed.jar" className="mage.deck.PennyDreadfulCommander"/>
<deckType name="Block Constructed - Amonkhet" jar="mage-deck-constructed.jar" className="mage.deck.AmonkhetBlock"/>
<deckType name="Block Constructed - Battle for Zendikar" jar="mage-deck-constructed.jar" className="mage.deck.BattleForZendikarBlock"/>
<deckType name="Block Constructed - Innistrad" jar="mage-deck-constructed.jar" className="mage.deck.InnistradBlock"/>

View file

@ -148,6 +148,12 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>mage-game-pennydreadfulcommanderfreeforall</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>mage-game-momirduel</artifactId>

View file

@ -72,6 +72,7 @@
<gameType name="Commander Free For All" jar="mage-game-commanderfreeforall-${project.version}.jar" className="mage.game.CommanderFreeForAllMatch" typeName="mage.game.CommanderFreeForAllType"/>
<gameType name="Tiny Leaders Two Player Duel" jar="mage-game-tinyleadersduel-${project.version}.jar" className="mage.game.TinyLeadersDuelMatch" typeName="mage.game.TinyLeadersDuelType"/>
<gameType name="Canadian Highlander Two Player Duel" jar="mage-game-canadianhighlanderduel-${project.version}.jar" className="mage.game.CanadianHighlanderDuelMatch" typeName="mage.game.CanadianHighlanderDuelType"/>
<gameType name="Penny Dreadful Commander Free For All" jar="mage-game-pennydreadfulcommanderfreeforall-${project.version}.jar" className="mage.game.PennyDreadfulCommanderFreeForAllMatch" typeName="mage.game.PennyDreadfulCommanderFreeForAllType"/>
<gameType name="Momir Basic Two Player Duel" jar="mage-game-momirduel-${project.version}.jar" className="mage.game.MomirDuelMatch" typeName="mage.game.MomirDuelType"/>
</gameTypes>
<tournamentTypes>
@ -145,6 +146,7 @@
<deckType name="Variant Magic - MTGO 1v1 Commander" jar="mage-deck-constructed.jar" className="mage.deck.MTGO1v1Commander"/>
<deckType name="Variant Magic - Tiny Leaders" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.TinyLeaders"/>
<deckType name="Variant Magic - Momir Basic" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Momir"/>
<deckType name="Variant Magic - Penny Dreadful Commander" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.PennyDreadfulCommander"/>
<deckType name="Block Constructed - Amonkhet" jar="mage-deck-constructed.jar" className="mage.deck.AmonkhetBlock"/>
<deckType name="Block Constructed - Battle for Zendikar" jar="mage-deck-constructed.jar" className="mage.deck.BattleForZendikarBlock"/>
<deckType name="Block Constructed - Innistrad" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.InnistradBlock"/>

File diff suppressed because it is too large Load diff