- Made getAffectedCards in StaticAbility_Continuous compatible with the new AllZoneUtil.getCardsIn function.

This commit is contained in:
Sloth
2011-09-20 08:28:49 +00:00
parent 578ec40032
commit e44820b3db

View File

@@ -329,15 +329,18 @@ public class StaticAbility_Continuous {
} }
// non - CharacteristicDefining // non - CharacteristicDefining
CardList affectedCards; CardList affectedCards = new CardList();
Zone affectedZone = Zone.Battlefield; // default String[] affectedZones = null;
if (params.containsKey("AffectedZone")) { if (params.containsKey("AffectedZone")) {
affectedZone = Zone.smartValueOf(params.get("AffectedZone")); affectedZones = params.get("AffectedZone").split(",");
for (String az : affectedZones) {
affectedCards.addAll(AllZoneUtil.getCardsIn(Zone.smartValueOf(az)));
}
} else {
affectedCards = AllZoneUtil.getCardsIn(Zone.Battlefield);
} }
affectedCards = AllZoneUtil.getCardsIn(affectedZone);
if (params.containsKey("Affected") && !params.get("Affected").contains(",")) { if (params.containsKey("Affected") && !params.get("Affected").contains(",")) {
if (params.get("Affected").contains("Self")) { if (params.get("Affected").contains("Self")) {
affectedCards = new CardList(hostCard); affectedCards = new CardList(hostCard);