mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
* Marshland Bloodcaster - fixed game freeze on usage;
* Kentaro, the Smiling Cat - fixed game freeze on usage;
This commit is contained in:
parent
042b58dc5d
commit
a5b41ea920
2 changed files with 22 additions and 5 deletions
|
@ -60,6 +60,21 @@ public class SerializationTest extends CardTestPlayerBase {
|
|||
Assert.assertEquals("Must get infected counter", 1, permanent.getCounters(currentGame).getCount(CounterType.M1M1));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_Single_KentaroTheSmilingCat() {
|
||||
CardInfo cardInfo = CardRepository.instance.findCard("Kentaro, the Smiling Cat");
|
||||
Card newCard = cardInfo.getCard();
|
||||
Card permCard = CardUtil.getDefaultCardSideForBattlefield(newCard);
|
||||
PermanentImpl permanent = new PermanentCard(permCard, playerA.getId(), currentGame);
|
||||
currentGame.addPermanent(permanent, 0);
|
||||
|
||||
// test compress (it uses default java serialization)
|
||||
Object compressed = CompressUtil.compress(permanent);
|
||||
Assert.assertTrue("Must be zip", compressed instanceof ZippedObjectImpl);
|
||||
PermanentImpl uncompressed = (PermanentImpl) CompressUtil.decompress(compressed);
|
||||
Assert.assertEquals("Must be same", permanent.getName(), uncompressed.getName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_LondonMulligan() {
|
||||
LondonMulligan mulligan = new LondonMulligan(15);
|
||||
|
|
|
@ -3,7 +3,9 @@ package mage.abilities.costs;
|
|||
import mage.abilities.Ability;
|
||||
import mage.game.Game;
|
||||
|
||||
public interface DynamicCost {
|
||||
import java.io.Serializable;
|
||||
|
||||
public interface DynamicCost extends Serializable {
|
||||
|
||||
Cost getCost(Ability ability, Game game);
|
||||
|
||||
|
|
Loading…
Reference in a new issue