Refactor Magnigoth Treefolk (#4940)

This commit is contained in:
tool4ever
2024-04-02 10:27:31 +02:00
committed by GitHub
parent 2f708ad030
commit a9be4c5c75
2 changed files with 12 additions and 6 deletions

View File

@@ -255,6 +255,17 @@ public final class StaticAbilityContinuous {
}
return true;
}
if (input.contains("YourBasic")) {
CardCollectionView lands = hostCard.getController().getLandsInPlay();
final List<String> basic = MagicColor.Constant.BASIC_LANDS;
for (String type : basic) {
if (Iterables.any(lands, CardPredicates.isType(type))) {
String y = input.replaceAll("YourBasic", type);
newKeywords.add(y);
}
}
return true;
}
if (input.contains("EachCMCAmongDefined")) {
String keywordDefined = params.get("KeywordDefined");
CardCollectionView definedCards = game.getCardsIn(ZoneType.Battlefield);

View File

@@ -2,10 +2,5 @@ Name:Magnigoth Treefolk
ManaCost:4 G
Types:Creature Treefolk
PT:2/6
# TODO without BasicLandTypeNames
S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ Landwalk:Plains | IsPresent$ Plains.YouCtrl | Description$ Domain — For each basic land type among lands you control, CARDNAME has landwalk of that type
S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ Landwalk:Island | IsPresent$ Island.YouCtrl
S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ Landwalk:Swamp | IsPresent$ Swamp.YouCtrl
S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ Landwalk:Mountain | IsPresent$ Mountain.YouCtrl
S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ Landwalk:Forest | IsPresent$ Forest.YouCtrl
S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ Landwalk:YourBasic | Description$ Domain — For each basic land type among lands you control, CARDNAME has landwalk of that type.
Oracle:Domain — For each basic land type among lands you control, Magnigoth Treefolk has landwalk of that type. (It can't be blocked as long as defending player controls a land of that type.)