mirror of
https://github.com/correl/mage.git
synced 2024-12-24 03:00:14 +00:00
Add 4/4 Beast token and use it for existing cards.
This commit is contained in:
parent
e16bec3472
commit
c47d39390f
5 changed files with 85 additions and 76 deletions
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.odyssey;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
|
@ -37,7 +36,7 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.BeastToken2;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,10 +48,9 @@ public class BeastAttack extends CardImpl {
|
|||
super(ownerId, 230, "Beast Attack", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}{G}{G}");
|
||||
this.expansionSetCode = "ODY";
|
||||
|
||||
|
||||
// Put a 4/4 green Beast creature token onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken_44()));
|
||||
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken2()));
|
||||
|
||||
// Flashback {2}{G}{G}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{G}{G}{G}"), TimingRule.INSTANT));
|
||||
}
|
||||
|
@ -66,18 +64,3 @@ public class BeastAttack extends CardImpl {
|
|||
return new BeastAttack(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BeastToken_44 extends Token {
|
||||
|
||||
public BeastToken_44() {
|
||||
super("Beast", "4/4 green Beast creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add("Beast");
|
||||
power = new MageInt(4);
|
||||
toughness = new MageInt(4);
|
||||
// to get an image for the token
|
||||
this.setOriginalExpansionSetCode("ZEN");
|
||||
}
|
||||
|
||||
}
|
|
@ -30,12 +30,10 @@ package mage.sets.scourge;
|
|||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.StormAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
import mage.game.permanent.token.BeastToken2;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -47,9 +45,8 @@ public class HuntingPack extends CardImpl {
|
|||
super(ownerId, 121, "Hunting Pack", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{5}{G}{G}");
|
||||
this.expansionSetCode = "SCG";
|
||||
|
||||
|
||||
// Put a 4/4 green Beast creature token onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new HuntingPackToken(), 1));
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken2(), 1));
|
||||
// Storm
|
||||
this.addAbility(new StormAbility());
|
||||
}
|
||||
|
@ -63,15 +60,3 @@ public class HuntingPack extends CardImpl {
|
|||
return new HuntingPack(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HuntingPackToken extends Token {
|
||||
|
||||
public HuntingPackToken() {
|
||||
super("Beast", "4/4 green Beast creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Beast");
|
||||
this.color.setGreen(true);
|
||||
power = new MageInt(4);
|
||||
toughness = new MageInt(4);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,21 +28,19 @@
|
|||
package mage.sets.zendikar;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.AlternativeCostImpl;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.BeastToken2;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
/**
|
||||
|
@ -62,7 +60,7 @@ public class BalothCageTrap extends CardImpl {
|
|||
this.getSpellAbility().addWatcher(new BalothCageTrapWatcher());
|
||||
|
||||
// Put a 4/4 green Beast creature token onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastGreenToken()));
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken2()));
|
||||
}
|
||||
|
||||
public BalothCageTrap(final BalothCageTrap card) {
|
||||
|
@ -140,15 +138,3 @@ class BalothCageTrapAlternativeCost extends AlternativeCostImpl {
|
|||
return "If an opponent had an artifact enter the battlefield under his or her control this turn, you may pay {1}{G} rather than pay Baloth Cage Trap's mana cost";
|
||||
}
|
||||
}
|
||||
|
||||
class BeastGreenToken extends Token {
|
||||
|
||||
public BeastGreenToken() {
|
||||
super("Beast", "4/4 green Beast creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add("Beast");
|
||||
power = new MageInt(4);
|
||||
toughness = new MageInt(4);
|
||||
}
|
||||
}
|
|
@ -1,16 +1,16 @@
|
|||
/*
|
||||
* 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
|
||||
|
@ -20,7 +20,7 @@
|
|||
* 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.
|
||||
|
@ -29,14 +29,14 @@
|
|||
package mage.sets.zendikar;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.LandfallAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.permanent.token.BeastToken2;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,7 +52,7 @@ public class RampagingBaloths extends CardImpl {
|
|||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(6);
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
this.addAbility(new LandfallAbility(new CreateTokenEffect(new RampagingBalothsToken()), true));
|
||||
this.addAbility(new LandfallAbility(new CreateTokenEffect(new BeastToken2()), true));
|
||||
}
|
||||
|
||||
public RampagingBaloths(final RampagingBaloths card) {
|
||||
|
@ -65,15 +65,3 @@ public class RampagingBaloths extends CardImpl {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class RampagingBalothsToken extends Token {
|
||||
|
||||
public RampagingBalothsToken() {
|
||||
super("Beast", "4/4 green Beast creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Beast");
|
||||
this.color.setGreen(true);
|
||||
power = new MageInt(4);
|
||||
toughness = new MageInt(4);
|
||||
}
|
||||
}
|
67
Mage/src/mage/game/permanent/token/BeastToken2.java
Normal file
67
Mage/src/mage/game/permanent/token/BeastToken2.java
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* 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 java.util.Arrays;
|
||||
import mage.constants.CardType;
|
||||
import mage.MageInt;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class BeastToken2 extends Token {
|
||||
|
||||
public BeastToken2() {
|
||||
super("Beast", "4/4 green Beast creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add("Beast");
|
||||
power = new MageInt(4);
|
||||
toughness = new MageInt(4);
|
||||
availableImageSetCodes.addAll(Arrays.asList("ZEN", "C14", "DDD"));
|
||||
}
|
||||
|
||||
public BeastToken2(final BeastToken2 token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeastToken2 copy() {
|
||||
return new BeastToken2(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExpansionSetCodeForImage(String code) {
|
||||
super.setExpansionSetCodeForImage(code);
|
||||
if(getOriginalExpansionSetCode().equals("C14") || getOriginalExpansionSetCode().equals("DDD")) {
|
||||
this.setTokenType(2);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue