Added GoblinToken and refactored cards using it

This commit is contained in:
North 2011-09-21 23:10:50 +03:00
parent c386e15dff
commit c366f3ed61
3 changed files with 52 additions and 27 deletions

View file

@ -43,7 +43,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.GoblinToken;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreatureOrPlayer;
@ -83,14 +83,3 @@ public class SiegeGangCommander extends CardImpl<SiegeGangCommander> {
return new SiegeGangCommander(this);
}
}
class GoblinToken extends Token {
public GoblinToken() {
super("Goblin", "1/1 red Goblin creature token");
cardType.add(CardType.CREATURE);
color.setRed(true);
subtype.add("Goblin");
power = new MageInt(1);
toughness = new MageInt(1);
}
}

View file

@ -30,14 +30,12 @@ package mage.sets.scarsofmirrodin;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.GoblinToken;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
@ -47,7 +45,7 @@ import java.util.UUID;
* @author Loki
*/
public class KuldothaRebirth extends CardImpl<KuldothaRebirth> {
private static FilterControlledPermanent filter = new FilterControlledPermanent("an artifact");
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact");
static {
filter.getCardType().add(CardType.ARTIFACT);
@ -71,15 +69,4 @@ public class KuldothaRebirth extends CardImpl<KuldothaRebirth> {
return new KuldothaRebirth(this);
}
}
class GoblinToken extends Token {
public GoblinToken() {
super("Goblin", "1/1 red Goblin creature token");
cardType.add(CardType.CREATURE);
color = ObjectColor.RED;
subtype.add("Goblin");
power = new MageInt(1);
toughness = new MageInt(1);
}
}

View file

@ -0,0 +1,49 @@
/*
* 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;
import mage.ObjectColor;
/**
*
* @author North
*/
public class GoblinToken extends Token {
public GoblinToken() {
super("Goblin", "1/1 red Goblin creature token");
cardType.add(CardType.CREATURE);
subtype.add("Goblin");
color = ObjectColor.RED;
power = new MageInt(1);
toughness = new MageInt(1);
}
}