*Made ReplaceMoved work with zone lists for origin and destination.

This commit is contained in:
Hellfish
2013-06-01 10:31:17 +00:00
parent e5774dbaa9
commit b2f356b133

View File

@@ -36,16 +36,20 @@ public class ReplaceMoved extends ReplacementEffect {
} }
} }
if (this.getMapParams().containsKey("Origin")) { if (this.getMapParams().containsKey("Origin")) {
ZoneType z = ZoneType.smartValueOf(this.getMapParams().get("Origin")); for(ZoneType z : ZoneType.listValueOf(this.getMapParams().get("Origin"))) {
if (z != (ZoneType) runParams.get("Origin")) { if(z == (ZoneType) runParams.get("Origin"))
return false; return true;
} }
return false;
} }
if (this.getMapParams().containsKey("Destination")) { if (this.getMapParams().containsKey("Destination")) {
ZoneType z = ZoneType.smartValueOf(this.getMapParams().get("Destination")); for(ZoneType z : ZoneType.listValueOf(this.getMapParams().get("Destination"))) {
if (z != (ZoneType) runParams.get("Destination")) { if(z == (ZoneType) runParams.get("Destination"))
return false; return true;
} }
return false;
} }
return true; return true;
} }