mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- 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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user