diff --git a/src/forge/Card.java b/src/forge/Card.java index 9c38e252f52..bf1a3827927 100644 --- a/src/forge/Card.java +++ b/src/forge/Card.java @@ -2798,11 +2798,15 @@ public class Card extends MyObservable { else if (Property.startsWith("notattacking")) { if(isAttacking()) return false;} else if (Property.startsWith("blocking")) { if(!isBlocking()) return false;} + + else if (Property.startsWith("blockingSource")) { if(!isBlocking(source)) return false;} else if (Property.startsWith("notblocking")) { if(isBlocking()) return false;} else if (Property.startsWith("blocked")) { if(!AllZone.Combat.isBlocked(this)) return false;} + else if (Property.startsWith("blockedBySource")) { if(!isBlockedBy(source)) return false;} + else if (Property.startsWith("unblocked")) { if(!AllZone.Combat.isUnblocked(this)) return false;} else if (Property.startsWith("kicked")) { if(!isKicked()) return false; } @@ -2902,6 +2906,14 @@ public class Card extends MyObservable { return blockers.contains(this); } + public boolean isBlocking(Card attacker) { + return attacker.equals(AllZone.Combat.getAttackerBlockedBy(this)); + } + + public boolean isBlockedBy(Card blocker) { + return this.equals(AllZone.Combat.getAttackerBlockedBy(blocker)); + } + /////////////////////////// // // Damage code