From b2f356b133ef70cda7cb5b8a4efc25fc741b54a8 Mon Sep 17 00:00:00 2001 From: Hellfish Date: Sat, 1 Jun 2013 10:31:17 +0000 Subject: [PATCH] *Made ReplaceMoved work with zone lists for origin and destination. --- .../forge/card/replacement/ReplaceMoved.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main/java/forge/card/replacement/ReplaceMoved.java b/src/main/java/forge/card/replacement/ReplaceMoved.java index c8b26d8dda5..3b3829655a7 100644 --- a/src/main/java/forge/card/replacement/ReplaceMoved.java +++ b/src/main/java/forge/card/replacement/ReplaceMoved.java @@ -36,16 +36,20 @@ public class ReplaceMoved extends ReplacementEffect { } } if (this.getMapParams().containsKey("Origin")) { - ZoneType z = ZoneType.smartValueOf(this.getMapParams().get("Origin")); - if (z != (ZoneType) runParams.get("Origin")) { - return false; + for(ZoneType z : ZoneType.listValueOf(this.getMapParams().get("Origin"))) { + if(z == (ZoneType) runParams.get("Origin")) + return true; } + + return false; } - if (this.getMapParams().containsKey("Destination")) { - ZoneType z = ZoneType.smartValueOf(this.getMapParams().get("Destination")); - if (z != (ZoneType) runParams.get("Destination")) { - return false; + if (this.getMapParams().containsKey("Destination")) { + for(ZoneType z : ZoneType.listValueOf(this.getMapParams().get("Destination"))) { + if(z == (ZoneType) runParams.get("Destination")) + return true; } + + return false; } return true; }