- Fixed a possible NPE in changeHiddenOriginResolveAI.

This commit is contained in:
Sloth
2011-09-28 12:42:22 +00:00
parent 06616d2c8a
commit 4920f1acc9

View File

@@ -768,18 +768,18 @@ public final class AbilityFactory_ChangeZone {
List<Zone> origin = Zone.listValueOf(params.get("Origin"));
CardList fetchList = player.getCardsIn(origin);
fetchList = AbilityFactory.filterListByType(fetchList, params.get("ChangeType"), sa);
Zone destination = Zone.smartValueOf(params.get("Destination"));
PlayerZone destZone = player.getZone(destination);
String type = params.get("ChangeType");
if (type == null) {
type = "Card";
}
CardList fetchList = player.getCardsIn(origin);
fetchList = AbilityFactory.filterListByType(fetchList, type, sa);
Zone destination = Zone.smartValueOf(params.get("Destination"));
PlayerZone destZone = player.getZone(destination);
CardList fetched = new CardList();
int changeNum = params.containsKey("ChangeNum") ? AbilityFactory.calculateAmount(card, params.get("ChangeNum"), sa) : 1;