mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Refactoring: replace custom creature tokens with basic class
This commit is contained in:
parent
459ef9af94
commit
e9d5afd530
2 changed files with 3 additions and 28 deletions
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue