From 9386f82bd208e303c97263695038b009558f7f43 Mon Sep 17 00:00:00 2001 From: North Date: Thu, 5 Apr 2012 23:13:05 +0300 Subject: [PATCH] The card objects in ExpansionSet should not be used. Fixes the testing problem where adding multiple copies of the card would cause incorrect behavior. --- Mage.Sets/src/mage/sets/Sets.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/Sets.java b/Mage.Sets/src/mage/sets/Sets.java index b2f378da71..56f9a50586 100644 --- a/Mage.Sets/src/mage/sets/Sets.java +++ b/Mage.Sets/src/mage/sets/Sets.java @@ -255,7 +255,9 @@ public class Sets extends HashMap { } } if (cardsFound.size() > 0) { - return cardsFound.get(rnd.nextInt(cardsFound.size())); + Card card = cardsFound.get(rnd.nextInt(cardsFound.size())); + String cardClassName = card.getClass().getName(); + return CardImpl.createCard(cardClassName); } } return null;