Token refactor

This commit is contained in:
spjspj 2017-05-06 23:35:14 +10:00
parent a532368b84
commit e73e7d8600
20 changed files with 1449 additions and 744 deletions

View file

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

View file

@ -306,6 +306,7 @@ public class MageBook extends JComponent {
}
PermanentToken newToken = new PermanentToken(token, null, token.getOriginalExpansionSetCode(), null);
PermanentView theToken = new PermanentView(newToken, null, null, null);
theToken.setInViewerOnly(true);
final MageCard cardImg = Plugins.instance.getMagePermanent(theToken, bigCard, cardDimension, gameId, true);
cardImg.setBounds(rectangle);
jLayeredPane.add(cardImg, JLayeredPane.DEFAULT_LAYER, 10);
@ -339,6 +340,9 @@ public class MageBook extends JComponent {
String className = token.getName();
className = className.replaceAll("[^a-zA-Z0-9]", "");
className = className + "Token";
if (token.getTokenClassName() != null && token.getTokenClassName().length() > 0) {
className = token.getTokenClassName();
}
Class<?> c = Class.forName("mage.game.permanent.token." + className);
Constructor<?> cons = c.getConstructor();
Object newToken = cons.newInstance();
@ -346,19 +350,19 @@ public class MageBook extends JComponent {
tokens.add((Token) newToken);
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(MageBook.class.getName()).log(Level.SEVERE, null, ex);
// Swallow exception
} catch (NoSuchMethodException ex) {
java.util.logging.Logger.getLogger(MageBook.class.getName()).log(Level.SEVERE, null, ex);
// Swallow exception
} catch (SecurityException ex) {
java.util.logging.Logger.getLogger(MageBook.class.getName()).log(Level.SEVERE, null, ex);
// Swallow exception
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(MageBook.class.getName()).log(Level.SEVERE, null, ex);
// Swallow exception
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(MageBook.class.getName()).log(Level.SEVERE, null, ex);
// Swallow exception
} catch (IllegalArgumentException ex) {
java.util.logging.Logger.getLogger(MageBook.class.getName()).log(Level.SEVERE, null, ex);
// Swallow exception
} 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;
private TransferData data = new TransferData();
private final boolean isPermanent;
private boolean isPermanent;
private boolean hasSickness;
private String zone;
@ -102,7 +102,7 @@ public abstract class CardPanel extends MagePermanent implements MouseListener,
this.gameId = gameId;
// Gather info about the card
this.isPermanent = this.gameCard instanceof PermanentView;
this.isPermanent = this.gameCard instanceof PermanentView && !this.gameCard.inViewerOnly();
if (isPermanent) {
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() {
if (dayNightButton != null) {
for (ActionListener al : dayNightButton.getActionListeners()) {

View file

@ -23,22 +23,27 @@ public class CardDownloadData {
private boolean flippedSide;
private boolean splitCard;
private final boolean usesVariousArt;
private String tokenClassName;
private boolean isType2;
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) {
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) {
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;
}
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.set = set;
this.collectorId = collectorId;
@ -49,6 +54,7 @@ public class CardDownloadData {
this.secondSide = secondSide;
this.tokenSetCode = tokenSetCode;
this.tokenDescriptor = tokenDescriptor;
this.tokenClassName = tokenClassName;
if (this.tokenDescriptor == null || this.tokenDescriptor.equalsIgnoreCase("")) {
this.tokenDescriptor = lastDitchTokenDescriptor();
@ -66,6 +72,7 @@ public class CardDownloadData {
this.usesVariousArt = card.usesVariousArt;
this.tokenSetCode = card.tokenSetCode;
this.tokenDescriptor = card.tokenDescriptor;
this.tokenClassName = tokenClassName;
this.fileName = card.fileName;
}
@ -157,6 +164,14 @@ public class CardDownloadData {
return tokenDescriptor;
}
public void setTokenClassName(String tokenClassName) {
this.tokenClassName = tokenClassName;
}
public String getTokenClassName() {
return tokenClassName;
}
public void setTokenDescriptor(String 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()) {
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:")) {
String set = params[2].substring(4);
CardDownloadData card = new CardDownloadData(params[3], set, "0", false, type, "", "", true);
card.setTokenClassName(tokenClassName);
list.add(card);
} else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM:")) {
String set = params[2].substring(7);
CardDownloadData card = new CardDownloadData("Emblem " + params[3], set, "0", false, type, "", "", true, fileName);
card.setTokenClassName(tokenClassName);
list.add(card);
} else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM-:")) {
String set = params[2].substring(8);
CardDownloadData card = new CardDownloadData(params[3] + " Emblem", set, "0", false, type, "", "", true, fileName);
card.setTokenClassName(tokenClassName);
list.add(card);
} else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM!:")) {
String set = params[2].substring(8);
CardDownloadData card = new CardDownloadData(params[3], set, "0", false, type, "", "", true, fileName);
card.setTokenClassName(tokenClassName);
list.add(card);
}
} else {

View file

@ -27,10 +27,12 @@ public final class CardImageUtils {
*/
public static String generateTokenImagePath(CardDownloadData card) {
if (card.isToken()) {
if (pathCache.containsKey(card)) {
return pathCache.get(card);
}
String filePath = getTokenImagePath(card);
if (pathCache.containsKey(card)) {
if (filePath.equals(pathCache.get(card))) {
return pathCache.get(card);
}
}
TFile file = new TFile(filePath);
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 selected;
protected boolean canAttack;
protected boolean inViewerOnly;
public CardView(Card card) {
this(card, null, false);
@ -213,6 +214,7 @@ public class CardView extends SimpleCardView {
this.isChoosable = cardView.isChoosable;
this.selected = cardView.selected;
this.canAttack = cardView.canAttack;
this.inViewerOnly = cardView.inViewerOnly;
}
/**
@ -1009,4 +1011,12 @@ public class CardView extends SimpleCardView {
public boolean isTribal() {
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.TargetController;
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));
// 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) {

View file

@ -36,7 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
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());
// 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) {

View file

@ -35,7 +35,7 @@ import mage.abilities.keyword.DefenderAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
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());
// 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.constants.*;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.HeliodGodOfTheSunToken;
import java.util.UUID;
@ -53,7 +53,7 @@ import java.util.UUID;
public class HeliodGodOfTheSun extends CardImpl {
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);
this.subtype.add("God");
@ -85,19 +85,3 @@ public class HeliodGodOfTheSun extends CardImpl {
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.CardSetInfo;
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,
// 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,
"<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."));

View file

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

View file

@ -0,0 +1,47 @@
/*
* 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.constants.CardType;
/**
*
* @author spjspj
*/
public class BreedingPitThrullToken extends Token {
public BreedingPitThrullToken() {
super("Thrull", "0/1 black Thrull creature token");
cardType.add(CardType.CREATURE);
subtype.add("Thrull");
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

@ -0,0 +1,50 @@
/*
* 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.constants.CardType;
import mage.MageInt;
/**
*
* @author spjspj
*/
public 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

@ -0,0 +1,47 @@
/*
* 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.constants.CardType;
import mage.MageInt;
/**
*
* @author spjspj
*/
public class InexorableBlobOozeToken extends Token {
public InexorableBlobOozeToken() {
super("Ooze", "3/3 green Ooze creature token");
cardType.add(CardType.CREATURE);
subtype.add("Ooze");
color.setGreen(true);
power = new MageInt(3);
toughness = new MageInt(3);
}
}

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);
}
}