mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Added "blockingSource" and "blockedBySource" to Valid restrictions.
This commit is contained in:
@@ -2799,10 +2799,14 @@ public class Card extends MyObservable {
|
|||||||
|
|
||||||
else if (Property.startsWith("blocking")) { if(!isBlocking()) 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("notblocking")) { if(isBlocking()) return false;}
|
||||||
|
|
||||||
else if (Property.startsWith("blocked")) { if(!AllZone.Combat.isBlocked(this)) 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("unblocked")) { if(!AllZone.Combat.isUnblocked(this)) return false;}
|
||||||
|
|
||||||
else if (Property.startsWith("kicked")) { if(!isKicked()) return false; }
|
else if (Property.startsWith("kicked")) { if(!isKicked()) return false; }
|
||||||
@@ -2902,6 +2906,14 @@ public class Card extends MyObservable {
|
|||||||
return blockers.contains(this);
|
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
|
// Damage code
|
||||||
|
|||||||
Reference in New Issue
Block a user