mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Card: show CantBlockBy on affected creature
This commit is contained in:
@@ -1910,6 +1910,28 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CantBlockBy static abilities
|
||||||
|
if (game != null && isCreature() && isInZone(ZoneType.Battlefield)) {
|
||||||
|
for (final Card ca : game.getCardsIn(ZoneType.listValueOf("Battlefield,Command"))) {
|
||||||
|
if (equals(ca)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (final StaticAbility stAb : ca.getStaticAbilities()) {
|
||||||
|
if (stAb.isSecondary() ||
|
||||||
|
!stAb.getParam("Mode").equals("CantBlockBy") ||
|
||||||
|
stAb.isSuppressed() || !stAb.checkConditions() ||
|
||||||
|
!stAb.hasParam("ValidAttacker")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Card host = stAb.getHostCard();
|
||||||
|
if (isValid(stAb.getParam("ValidAttacker").split(","), host.getController(), host, null)) {
|
||||||
|
sb.append(stAb.toString());
|
||||||
|
sb.append("\r\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// NOTE:
|
// NOTE:
|
||||||
if (sb.toString().contains(" (NOTE: ")) {
|
if (sb.toString().contains(" (NOTE: ")) {
|
||||||
sb.insert(sb.indexOf("(NOTE: "), "\r\n");
|
sb.insert(sb.indexOf("(NOTE: "), "\r\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user