mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
add EachCMCAmongDefined multiple keyword builder to StaticAbilityContinuous
This commit is contained in:
@@ -651,6 +651,21 @@ public final class StaticAbilityContinuous {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (input.contains("EachCMCAmongDefined")) {
|
||||
String keywordDefined = params.get("KeywordDefined");
|
||||
CardCollectionView definedCards = game.getCardsIn(ZoneType.Battlefield);
|
||||
definedCards = CardLists.getValidCards(definedCards, keywordDefined, hostCard.getController(),
|
||||
hostCard, null);
|
||||
for (Card c : definedCards) {
|
||||
final int cmc = c.getCMC();
|
||||
String newKW = (input.replace(" from EachCMCAmongDefined", ":Card.cmcEQ"
|
||||
+ (cmc) + ":Protection from converted mana cost " + (cmc)));
|
||||
if (!extraKeywords.contains(newKW)) {
|
||||
extraKeywords.add(newKW);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user