mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
CantBeCounteredBy : make Autumns veil card text changing work
This commit is contained in:
@@ -1445,7 +1445,10 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (keyword.startsWith("etbCounter")) {
|
||||
if (keyword.startsWith("CantBeCounteredBy")) {
|
||||
final String[] p = keyword.split(":");
|
||||
sbLong.append(p[2]).append("\r\n");
|
||||
} else if (keyword.startsWith("etbCounter")) {
|
||||
final String[] p = keyword.split(":");
|
||||
final StringBuilder s = new StringBuilder();
|
||||
if (p.length > 4) {
|
||||
|
||||
@@ -300,10 +300,15 @@ public class CardFactoryUtil {
|
||||
if (!isCounterable(c)) {
|
||||
return false;
|
||||
}
|
||||
// Autumn's Veil
|
||||
if (c.hasKeyword("CARDNAME can't be countered by blue or black spells.") && sa.isSpell()
|
||||
&& (sa.getHostCard().isBlack() || sa.getHostCard().isBlue())) {
|
||||
return false;
|
||||
|
||||
for (KeywordInterface k : c.getKeywords()) {
|
||||
final String o = k.getOriginal();
|
||||
if (o.startsWith("CantBeCounteredBy")) {
|
||||
final String m[] = o.split(":");
|
||||
if (sa.isValid(m[1].split(","), c.getController(), c, null)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user