mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
[Simulated AI] Fix copying tokens with abilities, like Eldrazi Scions.
Also fixes a bug in the main game code where if you have Clone try to copy a token with abilities, like an Eldrazi Scion, it would previously not get those abilities. Adds a test for the game simulation/copy case.
This commit is contained in:
@@ -197,7 +197,10 @@ public class GameCopier {
|
||||
private Card createCardCopy(Game newGame, Player newOwner, Card c) {
|
||||
if (c.isToken() && !c.isEmblem()) {
|
||||
String tokenStr = new CardFactory.TokenInfo(c).toString();
|
||||
return CardFactory.makeOneToken(CardFactory.TokenInfo.fromString(tokenStr), newOwner);
|
||||
Card result = CardFactory.makeOneToken(CardFactory.TokenInfo.fromString(tokenStr), newOwner);
|
||||
CardFactory.copyCopiableCharacteristics(c, result);
|
||||
CardFactory.copyCopiableAbilities(c, result);
|
||||
return result;
|
||||
}
|
||||
if (USE_FROM_PAPER_CARD && !c.isEmblem()) {
|
||||
return Card.fromPaperCard(c.getPaperCard(), newOwner);
|
||||
|
||||
Reference in New Issue
Block a user