- Updated copyCard in CardFactory.java, it will actually reference the different CardFactories now to make the correct copy (fixes Planeswalkers returning from a bounced/destroyed Oblivion Ring).

This commit is contained in:
jendave
2011-08-06 03:29:28 +00:00
parent 3da25af6a3
commit f1e35a7301
2 changed files with 44 additions and 1 deletions

View File

@@ -102,9 +102,44 @@ public class CardFactory implements NewConstants {
}// readCard()
final public Card copyCard(Card in) {
Card out = getCard(in.getName(), in.getOwner());
/*
Card out = getCard(in.getName(), in.getOwner());
out.setUniqueNumber(in.getUniqueNumber());
return out;
*/
if(in.getType().contains("Creature")) {
Card card2 = new Card();
card2 = CardFactory_Creatures.getCard(in, in.getName(), in.getOwner(), this);
return card2;
} else if(in.getType().contains("Aura")) {
Card card2 = new Card();
card2 = CardFactory_Auras.getCard(in, in.getName(), in.getOwner());
return card2;
} else if(in.getType().contains("Equipment")) {
Card card2 = new Card();
card2 = CardFactory_Equipment.getCard(in, in.getName(), in.getOwner());
return card2;
} else if(in.getType().contains("Planeswalker")) {
Card card2 = new Card();
card2 = CardFactory_Planeswalkers.getCard(in, in.getName(), in.getOwner());
return card2;
} else if(in.getType().contains("Land")) {
Card card2 = new Card();
card2 = CardFactory_Lands.getCard(in, in.getName(), in.getOwner());
return card2;
}
else
{
Card out = getCard(in.getName(), in.getOwner());
out.setUniqueNumber(in.getUniqueNumber());
return out;
}
}
/*

View File

@@ -2670,6 +2670,14 @@ class CardFactory_Planeswalkers {
card2.setManaCost(card.getManaCost());
card2.addSpellAbility(new Spell_Permanent(card2));
card2.addComesIntoPlayCommand(CardFactoryUtil.entersBattleFieldWithCounters(card2, Counters.LOYALTY, 3));
/*
card2.addComesIntoPlayCommand(new Command() {
public void execute()
{
turn[0] = -1;
}
});
*/
final Ability ability1 = new Ability(card2, "0") {
@Override