Refactoring: replace custom creature tokens with basic class

This commit is contained in:
Oleg Agafonov 2018-05-06 00:50:02 +04:00
parent 459ef9af94
commit e9d5afd530
2 changed files with 3 additions and 28 deletions

View file

@ -447,14 +447,6 @@ public final class ImageCache {
return IMAGE_CACHE.containsKey(key) ? IMAGE_CACHE.get(key) : null;
}
/**
* Returns the Image corresponding to the key only if it already exists in
* the cache.
*/
private static BufferedImage tryGetFaceImage(String key) {
return FACE_IMAGE_CACHE.containsKey(key) ? FACE_IMAGE_CACHE.get(key) : null;
}
/**
* Returns the map key for a card, without any suffixes for the image size.
*/

View file

@ -32,6 +32,7 @@ import java.util.Iterator;
import java.util.UUID;
import mage.MageInt;
import mage.MageObjectReference;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.ContinuousEffectImpl;
@ -49,6 +50,7 @@ import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.TokenImpl;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.custom.ElementalCreatureToken;
import mage.target.Target;
import mage.target.common.TargetLandPermanent;
@ -115,7 +117,7 @@ class LiegeOfTheTangleTriggeredAbility extends TriggeredAbilityImpl {
class LiegeOfTheTangleEffect extends ContinuousEffectImpl {
private static AwakeningLandToken token = new AwakeningLandToken();
private static ElementalCreatureToken token = new ElementalCreatureToken(8, 8, "8/8 green Elemental creature", new ObjectColor("G"));
public LiegeOfTheTangleEffect() {
super(Duration.EndOfGame, Outcome.BecomeCreature);
@ -185,23 +187,4 @@ class LiegeOfTheTangleEffect extends ContinuousEffectImpl {
}
class AwakeningLandToken extends TokenImpl {
public AwakeningLandToken() {
super("", "8/8 green Elemental creature");
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add(SubType.ELEMENTAL);
power = new MageInt(8);
toughness = new MageInt(8);
}
public AwakeningLandToken(final AwakeningLandToken token) {
super(token);
}
public AwakeningLandToken copy() {
return new AwakeningLandToken(this);
}
}