mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
* Changes to image handling of copied permanents (image is more often shown now).
This commit is contained in:
parent
7ebb8a9cbe
commit
401d65a17e
4 changed files with 12 additions and 3 deletions
|
@ -337,6 +337,7 @@ public class ImageCache {
|
|||
if (card.getUsesVariousArt()) {
|
||||
key += "#usesVariousArt";
|
||||
}
|
||||
log.warn("getImage: " + key);
|
||||
BufferedImage original = getImage(key);
|
||||
if (original == null) {
|
||||
log.warn(key + " not found");
|
||||
|
|
|
@ -48,6 +48,7 @@ import mage.abilities.keyword.HasteAbility;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.sets.tokens.EmptyToken;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -106,10 +107,10 @@ class SplinterTwinEffect extends OneShotEffect<SplinterTwinEffect> {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
if (card != null) {
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
EmptyToken token = new EmptyToken();
|
||||
CardUtil.copyTo(token).from(card);
|
||||
CardUtil.copyTo(token).from(permanent);
|
||||
|
||||
token.addAbility(HasteAbility.getInstance());
|
||||
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.game.permanent.Permanent;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.game.permanent.PermanentCard;
|
||||
import mage.game.permanent.PermanentToken;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -106,6 +107,9 @@ public class CopyEffect extends ContinuousEffectImpl<CopyEffect> {
|
|||
if (target instanceof PermanentCard) {
|
||||
permanent.setCardNumber(((PermanentCard) target).getCard().getCardNumber());
|
||||
permanent.setExpansionSetCode(((PermanentCard) target).getCard().getExpansionSetCode());
|
||||
} else if (target instanceof PermanentToken) {
|
||||
permanent.setCardNumber(((PermanentToken) target).getCardNumber());
|
||||
permanent.setExpansionSetCode(((PermanentToken) target).getExpansionSetCode());
|
||||
}
|
||||
|
||||
permanent.setCopy(true);
|
||||
|
|
|
@ -66,6 +66,9 @@ public class CopyTokenFunction implements Function<Token, Card> {
|
|||
sourceObj = ((PermanentCard) source).getCard();
|
||||
target.setOriginalExpansionSetCode(source.getExpansionSetCode());
|
||||
target.setOriginalCardNumber(source.getCardNumber());
|
||||
} else {
|
||||
target.setOriginalExpansionSetCode(source.getExpansionSetCode());
|
||||
target.setOriginalCardNumber(source.getCardNumber());
|
||||
}
|
||||
|
||||
target.setName(sourceObj.getName());
|
||||
|
|
Loading…
Reference in a new issue