mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Fixed a possible NPE in changeHiddenOriginResolveAI.
This commit is contained in:
@@ -768,18 +768,18 @@ public final class AbilityFactory_ChangeZone {
|
|||||||
|
|
||||||
List<Zone> origin = Zone.listValueOf(params.get("Origin"));
|
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");
|
String type = params.get("ChangeType");
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
type = "Card";
|
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();
|
CardList fetched = new CardList();
|
||||||
|
|
||||||
int changeNum = params.containsKey("ChangeNum") ? AbilityFactory.calculateAmount(card, params.get("ChangeNum"), sa) : 1;
|
int changeNum = params.containsKey("ChangeNum") ? AbilityFactory.calculateAmount(card, params.get("ChangeNum"), sa) : 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user