mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
add keyword "Protection from CommanderColorID" and "Protection from NotCommanderColorID" support to StaticAbilityContinuous.java
This commit is contained in:
@@ -632,12 +632,29 @@ public final class StaticAbilityContinuous {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// replace one Keyword with list of keywords
|
// replace one Keyword with list of keywords
|
||||||
if (input.startsWith("Protection") && input.contains("CardColors")) {
|
if (input.startsWith("Protection")) {
|
||||||
for (Byte color : affectedCard.determineColor()) {
|
if (input.contains("CardColors")) {
|
||||||
extraKeywords.add(input.replace("CardColors", MagicColor.toLongString(color)));
|
for (Byte color : affectedCard.determineColor()) {
|
||||||
|
extraKeywords.add(input.replace("CardColors", MagicColor.toLongString(color)));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (input.contains("CommanderColorID")) {
|
||||||
|
if (!affectedCard.getController().getCommanders().isEmpty()) {
|
||||||
|
if (input.contains("NotCommanderColorID")) {
|
||||||
|
for (Byte color : affectedCard.getController().getNotCommanderColorID()) {
|
||||||
|
extraKeywords.add(input.replace("NotCommanderColorID", MagicColor.toLongString(color)));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else for (Byte color : affectedCard.getController().getCommanderColorID()) {
|
||||||
|
extraKeywords.add(input.replace("CommanderColorID", MagicColor.toLongString(color)));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user