Merge origin/master

This commit is contained in:
LevelX2 2017-05-06 15:43:34 +02:00
commit 62947573d6
20 changed files with 1331 additions and 767 deletions

View file

@ -146,13 +146,13 @@ public final class CollectionViewerPanel extends JPanel {
JLabel label4 = new JLabel("Show cards or tokens:"); JLabel label4 = new JLabel("Show cards or tokens:");
label3.setAlignmentX(Component.LEFT_ALIGNMENT); label3.setAlignmentX(Component.LEFT_ALIGNMENT);
label3.setForeground(Color.white); label3.setForeground(Color.white);
// spjspj - put back in after reorg of tokens -- jPanel1.add(label4); jPanel1.add(label4);
JCheckBox cardsOrTokens = new JCheckBox("Display Cards"); JCheckBox cardsOrTokens = new JCheckBox("Display Cards");
cardsOrTokens.setSelected(true); cardsOrTokens.setSelected(true);
cardsOrTokens.setToolTipText("Select to show Cards or Tokens(and emblems) for the chosen set"); cardsOrTokens.setToolTipText("Select to show Cards or Tokens(and emblems) for the chosen set");
cardsOrTokens.addActionListener(e -> mageBook.cardsOrTokens(cardsOrTokens.isSelected())); cardsOrTokens.addActionListener(e -> mageBook.cardsOrTokens(cardsOrTokens.isSelected()));
// spjspj - put back in after reorg of tokens -- jPanel1.add(cardsOrTokens); jPanel1.add(cardsOrTokens);
formats.addActionListener(e -> { formats.addActionListener(e -> {
if (mageBook != null) { if (mageBook != null) {

View file

@ -306,6 +306,7 @@ public class MageBook extends JComponent {
} }
PermanentToken newToken = new PermanentToken(token, null, token.getOriginalExpansionSetCode(), null); PermanentToken newToken = new PermanentToken(token, null, token.getOriginalExpansionSetCode(), null);
PermanentView theToken = new PermanentView(newToken, null, null, null); PermanentView theToken = new PermanentView(newToken, null, null, null);
theToken.setInViewerOnly(true);
final MageCard cardImg = Plugins.instance.getMagePermanent(theToken, bigCard, cardDimension, gameId, true); final MageCard cardImg = Plugins.instance.getMagePermanent(theToken, bigCard, cardDimension, gameId, true);
cardImg.setBounds(rectangle); cardImg.setBounds(rectangle);
jLayeredPane.add(cardImg, JLayeredPane.DEFAULT_LAYER, 10); jLayeredPane.add(cardImg, JLayeredPane.DEFAULT_LAYER, 10);
@ -339,6 +340,9 @@ public class MageBook extends JComponent {
String className = token.getName(); String className = token.getName();
className = className.replaceAll("[^a-zA-Z0-9]", ""); className = className.replaceAll("[^a-zA-Z0-9]", "");
className = className + "Token"; className = className + "Token";
if (token.getTokenClassName() != null && token.getTokenClassName().length() > 0) {
className = token.getTokenClassName();
}
Class<?> c = Class.forName("mage.game.permanent.token." + className); Class<?> c = Class.forName("mage.game.permanent.token." + className);
Constructor<?> cons = c.getConstructor(); Constructor<?> cons = c.getConstructor();
Object newToken = cons.newInstance(); Object newToken = cons.newInstance();
@ -346,19 +350,19 @@ public class MageBook extends JComponent {
tokens.add((Token) newToken); tokens.add((Token) newToken);
} }
} catch (ClassNotFoundException ex) { } catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(MageBook.class.getName()).log(Level.SEVERE, null, ex); // Swallow exception
} catch (NoSuchMethodException ex) { } catch (NoSuchMethodException ex) {
java.util.logging.Logger.getLogger(MageBook.class.getName()).log(Level.SEVERE, null, ex); // Swallow exception
} catch (SecurityException ex) { } catch (SecurityException ex) {
java.util.logging.Logger.getLogger(MageBook.class.getName()).log(Level.SEVERE, null, ex); // Swallow exception
} catch (InstantiationException ex) { } catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(MageBook.class.getName()).log(Level.SEVERE, null, ex); // Swallow exception
} catch (IllegalAccessException ex) { } catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(MageBook.class.getName()).log(Level.SEVERE, null, ex); // Swallow exception
} catch (IllegalArgumentException ex) { } catch (IllegalArgumentException ex) {
java.util.logging.Logger.getLogger(MageBook.class.getName()).log(Level.SEVERE, null, ex); // Swallow exception
} catch (InvocationTargetException ex) { } catch (InvocationTargetException ex) {
java.util.logging.Logger.getLogger(MageBook.class.getName()).log(Level.SEVERE, null, ex); // Swallow exception
} }
} }
} }

View file

@ -79,7 +79,7 @@ public abstract class CardPanel extends MagePermanent implements MouseListener,
protected UUID gameId; protected UUID gameId;
private TransferData data = new TransferData(); private TransferData data = new TransferData();
private final boolean isPermanent; private boolean isPermanent;
private boolean hasSickness; private boolean hasSickness;
private String zone; private String zone;
@ -102,7 +102,7 @@ public abstract class CardPanel extends MagePermanent implements MouseListener,
this.gameId = gameId; this.gameId = gameId;
// Gather info about the card // Gather info about the card
this.isPermanent = this.gameCard instanceof PermanentView; this.isPermanent = this.gameCard instanceof PermanentView && !this.gameCard.inViewerOnly();
if (isPermanent) { if (isPermanent) {
this.hasSickness = ((PermanentView) this.gameCard).hasSummoningSickness(); this.hasSickness = ((PermanentView) this.gameCard).hasSummoningSickness();
} }
@ -203,6 +203,10 @@ public abstract class CardPanel extends MagePermanent implements MouseListener,
} }
} }
public void setIsPermanent(boolean isPermanent) {
this.isPermanent = isPermanent;
}
public void cleanUp() { public void cleanUp() {
if (dayNightButton != null) { if (dayNightButton != null) {
for (ActionListener al : dayNightButton.getActionListeners()) { for (ActionListener al : dayNightButton.getActionListeners()) {

View file

@ -23,22 +23,27 @@ public class CardDownloadData {
private boolean flippedSide; private boolean flippedSide;
private boolean splitCard; private boolean splitCard;
private final boolean usesVariousArt; private final boolean usesVariousArt;
private String tokenClassName;
private boolean isType2; private boolean isType2;
public CardDownloadData(String name, String set, String collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, String tokenDescriptor) { public CardDownloadData(String name, String set, String collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, String tokenDescriptor) {
this(name, set, collectorId, usesVariousArt, type, tokenSetCode, tokenDescriptor, false); this(name, set, collectorId, usesVariousArt, type, tokenSetCode, tokenDescriptor, false, "");
} }
public CardDownloadData(String name, String set, String collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, String tokenDescriptor, boolean token) { public CardDownloadData(String name, String set, String collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, String tokenDescriptor, boolean token) {
this(name, set, collectorId, usesVariousArt, type, tokenSetCode, tokenDescriptor, token, false, false); this(name, set, collectorId, usesVariousArt, type, tokenSetCode, tokenDescriptor, token, false, false, "");
} }
public CardDownloadData(String name, String set, String collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, String tokenDescriptor, boolean token, String fileName) { public CardDownloadData(String name, String set, String collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, String tokenDescriptor, boolean token, String fileName) {
this(name, set, collectorId, usesVariousArt, type, tokenSetCode, tokenDescriptor, token, false, false); this(name, set, collectorId, usesVariousArt, type, tokenSetCode, tokenDescriptor, token, false, false, "");
this.fileName = fileName; this.fileName = fileName;
} }
public CardDownloadData(String name, String set, String collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, String tokenDescriptor, boolean token, boolean twoFacedCard, boolean secondSide) { public CardDownloadData(String name, String set, String collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, String tokenDescriptor, boolean token, boolean twoFacedCard, boolean secondSide) {
this(name, set, collectorId, usesVariousArt, type, tokenSetCode, tokenDescriptor, token, false, false, "");
}
public CardDownloadData(String name, String set, String collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, String tokenDescriptor, boolean token, boolean twoFacedCard, boolean secondSide, String tokenClassName) {
this.name = name; this.name = name;
this.set = set; this.set = set;
this.collectorId = collectorId; this.collectorId = collectorId;
@ -49,6 +54,7 @@ public class CardDownloadData {
this.secondSide = secondSide; this.secondSide = secondSide;
this.tokenSetCode = tokenSetCode; this.tokenSetCode = tokenSetCode;
this.tokenDescriptor = tokenDescriptor; this.tokenDescriptor = tokenDescriptor;
this.tokenClassName = tokenClassName;
if (this.tokenDescriptor == null || this.tokenDescriptor.equalsIgnoreCase("")) { if (this.tokenDescriptor == null || this.tokenDescriptor.equalsIgnoreCase("")) {
this.tokenDescriptor = lastDitchTokenDescriptor(); this.tokenDescriptor = lastDitchTokenDescriptor();
@ -66,6 +72,7 @@ public class CardDownloadData {
this.usesVariousArt = card.usesVariousArt; this.usesVariousArt = card.usesVariousArt;
this.tokenSetCode = card.tokenSetCode; this.tokenSetCode = card.tokenSetCode;
this.tokenDescriptor = card.tokenDescriptor; this.tokenDescriptor = card.tokenDescriptor;
this.tokenClassName = tokenClassName;
this.fileName = card.fileName; this.fileName = card.fileName;
} }
@ -157,6 +164,14 @@ public class CardDownloadData {
return tokenDescriptor; return tokenDescriptor;
} }
public void setTokenClassName(String tokenClassName) {
this.tokenClassName = tokenClassName;
}
public String getTokenClassName() {
return tokenClassName;
}
public void setTokenDescriptor(String tokenDescriptor) { public void setTokenDescriptor(String tokenDescriptor) {
this.tokenDescriptor = tokenDescriptor; this.tokenDescriptor = tokenDescriptor;
} }

View file

@ -362,22 +362,30 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
if (params.length > 5 && params[5] != null && !params[5].isEmpty()) { if (params.length > 5 && params[5] != null && !params[5].isEmpty()) {
fileName = params[5].trim(); fileName = params[5].trim();
} }
String tokenClassName = "";
if (params.length > 7 && params[6] != null && !params[6].isEmpty()) {
tokenClassName = params[6].trim();
}
if (params[1].toLowerCase().equals("generate") && params[2].startsWith("TOK:")) { if (params[1].toLowerCase().equals("generate") && params[2].startsWith("TOK:")) {
String set = params[2].substring(4); String set = params[2].substring(4);
CardDownloadData card = new CardDownloadData(params[3], set, "0", false, type, "", "", true); CardDownloadData card = new CardDownloadData(params[3], set, "0", false, type, "", "", true);
card.setTokenClassName(tokenClassName);
list.add(card); list.add(card);
} else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM:")) { } else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM:")) {
String set = params[2].substring(7); String set = params[2].substring(7);
CardDownloadData card = new CardDownloadData("Emblem " + params[3], set, "0", false, type, "", "", true, fileName); CardDownloadData card = new CardDownloadData("Emblem " + params[3], set, "0", false, type, "", "", true, fileName);
card.setTokenClassName(tokenClassName);
list.add(card); list.add(card);
} else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM-:")) { } else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM-:")) {
String set = params[2].substring(8); String set = params[2].substring(8);
CardDownloadData card = new CardDownloadData(params[3] + " Emblem", set, "0", false, type, "", "", true, fileName); CardDownloadData card = new CardDownloadData(params[3] + " Emblem", set, "0", false, type, "", "", true, fileName);
card.setTokenClassName(tokenClassName);
list.add(card); list.add(card);
} else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM!:")) { } else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM!:")) {
String set = params[2].substring(8); String set = params[2].substring(8);
CardDownloadData card = new CardDownloadData(params[3], set, "0", false, type, "", "", true, fileName); CardDownloadData card = new CardDownloadData(params[3], set, "0", false, type, "", "", true, fileName);
card.setTokenClassName(tokenClassName);
list.add(card); list.add(card);
} }
} else { } else {

View file

@ -27,10 +27,12 @@ public final class CardImageUtils {
*/ */
public static String generateTokenImagePath(CardDownloadData card) { public static String generateTokenImagePath(CardDownloadData card) {
if (card.isToken()) { if (card.isToken()) {
String filePath = getTokenImagePath(card);
if (pathCache.containsKey(card)) { if (pathCache.containsKey(card)) {
if (filePath.equals(pathCache.get(card))) {
return pathCache.get(card); return pathCache.get(card);
} }
String filePath = getTokenImagePath(card); }
TFile file = new TFile(filePath); TFile file = new TFile(filePath);
if (!file.exists() && card.getTokenSetCode() != null) { if (!file.exists() && card.getTokenSetCode() != null) {

File diff suppressed because it is too large Load diff

View file

@ -125,6 +125,7 @@ public class CardView extends SimpleCardView {
protected boolean isChoosable; protected boolean isChoosable;
protected boolean selected; protected boolean selected;
protected boolean canAttack; protected boolean canAttack;
protected boolean inViewerOnly;
public CardView(Card card) { public CardView(Card card) {
this(card, null, false); this(card, null, false);
@ -213,6 +214,7 @@ public class CardView extends SimpleCardView {
this.isChoosable = cardView.isChoosable; this.isChoosable = cardView.isChoosable;
this.selected = cardView.selected; this.selected = cardView.selected;
this.canAttack = cardView.canAttack; this.canAttack = cardView.canAttack;
this.inViewerOnly = cardView.inViewerOnly;
} }
/** /**
@ -1009,4 +1011,12 @@ public class CardView extends SimpleCardView {
public boolean isTribal() { public boolean isTribal() {
return cardTypes.contains(CardType.TRIBAL); return cardTypes.contains(CardType.TRIBAL);
} }
public void setInViewerOnly(boolean inViewerOnly) {
this.inViewerOnly = inViewerOnly;
}
public boolean inViewerOnly() {
return inViewerOnly;
}
} }

View file

@ -38,7 +38,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
import mage.game.permanent.token.ThrullToken; import mage.game.permanent.token.BreedingPitThrullToken;
/** /**
* *
@ -53,7 +53,7 @@ public class BreedingPit extends CardImpl {
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{B}{B}")), TargetController.YOU, false)); this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{B}{B}")), TargetController.YOU, false));
// At the beginning of your end step, create a 0/1 black Thrull creature token. // At the beginning of your end step, create a 0/1 black Thrull creature token.
this.addAbility(new BeginningOfYourEndStepTriggeredAbility(new CreateTokenEffect(new ThrullToken()), false)); this.addAbility(new BeginningOfYourEndStepTriggeredAbility(new CreateTokenEffect(new BreedingPitThrullToken()), false));
} }
public BreedingPit(final BreedingPit card) { public BreedingPit(final BreedingPit card) {

View file

@ -36,7 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.game.permanent.token.DragonToken; import mage.game.permanent.token.DragonBroodmotherDragonToken;
/** /**
* *
@ -55,7 +55,7 @@ public class DragonBroodmother extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// At the beginning of each upkeep, create a 1/1 red and green Dragon creature token with flying and devour 2. (As the token enters the battlefield, you may sacrifice any number of creatures. It enters the battlefield with twice that many +1/+1 counters on it.) // At the beginning of each upkeep, create a 1/1 red and green Dragon creature token with flying and devour 2. (As the token enters the battlefield, you may sacrifice any number of creatures. It enters the battlefield with twice that many +1/+1 counters on it.)
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new DragonToken()), TargetController.ANY, false)); this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new DragonBroodmotherDragonToken()), TargetController.ANY, false));
} }
public DragonBroodmother(final DragonBroodmother card) { public DragonBroodmother(final DragonBroodmother card) {

View file

@ -35,7 +35,7 @@ import mage.abilities.keyword.DefenderAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.game.permanent.token.DragonToken; import mage.game.permanent.token.DragonEggDragonToken;
/** /**
* *
@ -54,7 +54,7 @@ public class DragonEgg extends CardImpl {
this.addAbility(DefenderAbility.getInstance()); this.addAbility(DefenderAbility.getInstance());
// When Dragon Egg dies, create a 2/2 red Dragon creature token with flying. It has "{R}: This creature gets +1/+0 until end of turn". // When Dragon Egg dies, create a 2/2 red Dragon creature token with flying. It has "{R}: This creature gets +1/+0 until end of turn".
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new DragonToken()), false)); this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new DragonEggDragonToken()), false));
} }

View file

@ -42,7 +42,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.game.permanent.token.Token; import mage.game.permanent.token.HeliodGodOfTheSunToken;
import java.util.UUID; import java.util.UUID;
@ -53,7 +53,7 @@ import java.util.UUID;
public class HeliodGodOfTheSun extends CardImpl { public class HeliodGodOfTheSun extends CardImpl {
public HeliodGodOfTheSun(UUID ownerId, CardSetInfo setInfo) { public HeliodGodOfTheSun(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{W}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{W}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
this.subtype.add("God"); this.subtype.add("God");
@ -85,19 +85,3 @@ public class HeliodGodOfTheSun extends CardImpl {
return new HeliodGodOfTheSun(this); return new HeliodGodOfTheSun(this);
} }
} }
class HeliodGodOfTheSunToken extends Token {
public HeliodGodOfTheSunToken() {
super("Cleric", "2/1 white Cleric enchantment creature token");
this.cardType.add(CardType.CREATURE);
this.cardType.add(CardType.ENCHANTMENT);
this.subtype.add("Cleric");
this.color.setWhite(true);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
}
}

View file

@ -36,7 +36,7 @@ import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.game.permanent.token.OozeToken; import mage.game.permanent.token.InexorableBlobOozeToken;
/** /**
* *
@ -52,7 +52,7 @@ public class InexorableBlob extends CardImpl {
// <i>Delirium</i> &mdash; Whenever Inexorable Blob attacks and there are at least four card types among cards in your graveyard, // <i>Delirium</i> &mdash; Whenever Inexorable Blob attacks and there are at least four card types among cards in your graveyard,
// create a 3/3 green Ooze creature token tapped and attacking. // create a 3/3 green Ooze creature token tapped and attacking.
this.addAbility(new ConditionalTriggeredAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new OozeToken(3, 3), 1, true, true), false), this.addAbility(new ConditionalTriggeredAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new InexorableBlobOozeToken(), 1, true, true), false),
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; Whenever {this} attacks and there are at least four card types among cards in your graveyard, " "<i>Delirium</i> &mdash; Whenever {this} attacks and there are at least four card types among cards in your graveyard, "
+ "create a 3/3 green Ooze creature token tapped and attacking.")); + "create a 3/3 green Ooze creature token tapped and attacking."));

View file

@ -39,7 +39,7 @@ import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.game.permanent.token.RedHumanToken; import mage.game.permanent.token.ThatcherHumanToken;
import mage.target.targetpointer.FixedTargets; import mage.target.targetpointer.FixedTargets;
/** /**
@ -83,7 +83,7 @@ class ThatcherRevoltEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
RedHumanToken token = new RedHumanToken(); ThatcherHumanToken token = new ThatcherHumanToken();
token.putOntoBattlefield(3, game, source.getSourceId(), source.getControllerId()); token.putOntoBattlefield(3, game, source.getSourceId(), source.getControllerId());
ArrayList<Permanent> toSacrifice = new ArrayList<>(); ArrayList<Permanent> toSacrifice = new ArrayList<>();
for (UUID tokenId : token.getLastAddedTokenIds()) { for (UUID tokenId : token.getLastAddedTokenIds()) {

View file

@ -11,7 +11,7 @@
* of conditions and the following disclaimer in the documentation and/or other materials * of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution. * provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com AS IS AND ANY EXPRESS OR IMPLIED * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
@ -25,20 +25,23 @@
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.game.permanent.token; package mage.game.permanent.token;
import mage.MageInt; import mage.MageInt;
import mage.constants.CardType;
/** /**
* *
* @author spjspj * @author spjspj
*/ */
public class OmnibianFrogToken extends Token { public class BreedingPitThrullToken extends Token {
public OmnibianFrogToken() { public BreedingPitThrullToken() {
super("", "3/3 Frog"); super("Thrull", "0/1 black Thrull creature token");
this.subtype.add("Frog"); cardType.add(CardType.CREATURE);
this.power = new MageInt(3); subtype.add("Thrull");
this.toughness = new MageInt(3); color.setBlack(true);
power = new MageInt(0);
toughness = new MageInt(1);
} }
} }

View file

@ -0,0 +1,53 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.effects.common.DevourEffect;
import mage.abilities.keyword.DevourAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.constants.CardType;
/**
*
* @author spjspj
*/
public class DragonBroodmotherDragonToken extends Token {
public DragonBroodmotherDragonToken() {
super("Dragon", "1/1 red and green Dragon creature token with flying and devour 2");
cardType.add(CardType.CREATURE);
color.setGreen(true);
color.setRed(true);
subtype.add("Dragon");
power = new MageInt(1);
toughness = new MageInt(1);
addAbility(FlyingAbility.getInstance());
addAbility(new DevourAbility(DevourEffect.DevourFactor.Devour2));
}
}

View file

@ -0,0 +1,57 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
/**
*
* @author spjspj
*/
public class DragonEggDragonToken extends Token {
public DragonEggDragonToken() {
super("Dragon", "2/2 red Dragon creature token with flying that has \"{R}: This creature gets +1/+0 until end of turn");
this.setOriginalExpansionSetCode("M14");
cardType.add(CardType.CREATURE);
color.setRed(true);
subtype.add("Dragon");
power = new MageInt(2);
toughness = new MageInt(2);
addAbility(FlyingAbility.getInstance());
addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}")));
}
}

View file

@ -25,8 +25,8 @@
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.game.permanent.token; package mage.game.permanent.token;
import mage.constants.CardType; import mage.constants.CardType;
import mage.MageInt; import mage.MageInt;
@ -34,13 +34,17 @@ import mage.MageInt;
* *
* @author spjspj * @author spjspj
*/ */
public class KamahlFistOfKrosaLandToken extends Token { public class HeliodGodOfTheSunToken extends Token {
public KamahlFistOfKrosaLandToken() { public HeliodGodOfTheSunToken() {
super("", "1/1 creature"); super("Cleric", "2/1 white Cleric enchantment creature token");
this.cardType.add(CardType.CREATURE); this.cardType.add(CardType.CREATURE);
this.cardType.add(CardType.ENCHANTMENT);
this.power = new MageInt(1); this.subtype.add("Cleric");
this.color.setWhite(true);
this.power = new MageInt(2);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
} }
} }

View file

@ -25,27 +25,23 @@
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.game.permanent.token; package mage.game.permanent.token;
import mage.constants.CardType; import mage.constants.CardType;
import mage.MageInt; import mage.MageInt;
import mage.abilities.keyword.FlyingAbility;
/** /**
* *
* @author spjspj * @author spjspj
*/ */
public class AngelTombToken extends Token { public class InexorableBlobOozeToken extends Token {
public AngelTombToken() { public InexorableBlobOozeToken() {
super("", "3/3 white Angel artifact creature with flying"); super("Ooze", "3/3 green Ooze creature token");
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE); cardType.add(CardType.CREATURE);
color.setWhite(true); subtype.add("Ooze");
color.setGreen(true);
subtype.add("Angel");
power = new MageInt(3); power = new MageInt(3);
toughness = new MageInt(3); toughness = new MageInt(3);
addAbility(FlyingAbility.getInstance());
} }
} }

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com AS IS AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.game.permanent.token;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.keyword.HasteAbility;
import mage.constants.CardType;
/**
*
* @author spjspj
*/
public class ThatcherHumanToken extends Token {
public ThatcherHumanToken() {
super("Human", "1/1 red Human creature token with haste");
this.cardType.add(CardType.CREATURE);
this.subtype.add("Human");
addAbility(HasteAbility.getInstance());
this.color = ObjectColor.RED;
this.power = new MageInt(1);
this.toughness = new MageInt(1);
}
}