mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
- 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:
@@ -102,9 +102,44 @@ public class CardFactory implements NewConstants {
|
|||||||
}// readCard()
|
}// readCard()
|
||||||
|
|
||||||
final public Card copyCard(Card in) {
|
final public Card copyCard(Card in) {
|
||||||
Card out = getCard(in.getName(), in.getOwner());
|
/*
|
||||||
|
Card out = getCard(in.getName(), in.getOwner());
|
||||||
out.setUniqueNumber(in.getUniqueNumber());
|
out.setUniqueNumber(in.getUniqueNumber());
|
||||||
return out;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -2670,6 +2670,14 @@ class CardFactory_Planeswalkers {
|
|||||||
card2.setManaCost(card.getManaCost());
|
card2.setManaCost(card.getManaCost());
|
||||||
card2.addSpellAbility(new Spell_Permanent(card2));
|
card2.addSpellAbility(new Spell_Permanent(card2));
|
||||||
card2.addComesIntoPlayCommand(CardFactoryUtil.entersBattleFieldWithCounters(card2, Counters.LOYALTY, 3));
|
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") {
|
final Ability ability1 = new Ability(card2, "0") {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user