- Reverted the copyCard change (it caused some funky bugs - CIP / leaves play triggers got added twice to cards), and moved it to a separate method.

This commit is contained in:
jendave
2011-08-06 03:29:45 +00:00
parent bbc34a5b5a
commit 28e6c209f1

View File

@@ -101,13 +101,8 @@ public class CardFactory implements NewConstants {
}
}// readCard()
final public Card copyCard(Card in) {
/*
Card out = getCard(in.getName(), in.getOwner());
out.setUniqueNumber(in.getUniqueNumber());
return out;
*/
final public Card dynamicCopyCard(Card in)
{
if(in.getType().contains("Creature")) {
Card card2 = new Card();
card2 = CardFactory_Creatures.getCard(in, in.getName(), in.getOwner(), this);
@@ -142,6 +137,14 @@ public class CardFactory implements NewConstants {
}
}
final public Card copyCard(Card in) {
Card out = getCard(in.getName(), in.getOwner());
out.setUniqueNumber(in.getUniqueNumber());
return out;
}
/*
final public Card getCard(String cardName, String owner) {
cardName = AllZone.NameChanger.getOriginalName(cardName);
@@ -4386,7 +4389,7 @@ public class CardFactory implements NewConstants {
//copy card to reset card attributes like attack and defense
Card c = abilityComes.getTargetCard();
if(!c.isToken()) {
c = AllZone.CardFactory.copyCard(c);
c = AllZone.CardFactory.dynamicCopyCard(c);
c.setController(c.getOwner());
PlayerZone play = AllZone.getZone(Constant.Zone.Play, c.getOwner());