From c735003ff519d433c4d2550f4af835036b8d9202 Mon Sep 17 00:00:00 2001 From: slapshot5 Date: Mon, 30 Jan 2012 03:25:04 +0000 Subject: [PATCH] add access to the current set code in Card.hasProperty() in the form setXXX. So a valid expression for all Arabian Nights permanents is: Permanent.setARN --- src/main/java/forge/Card.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/forge/Card.java b/src/main/java/forge/Card.java index e6bf175c5d8..cae40b4ef54 100644 --- a/src/main/java/forge/Card.java +++ b/src/main/java/forge/Card.java @@ -7197,7 +7197,13 @@ public class Card extends GameEntity implements Comparable { if (realZone == this.getCastFrom()) { return false; } - } else { + } else if (property.startsWith("set")) { + final String setCode = property.substring(3, 6); + if (!this.getCurSetCode().equals(setCode)) { + return false; + } + } + else { if (property.equals("ChosenType")) { if (!this.isType(source.getChosenType())) { return false;