MH2 and AFR

This commit is contained in:
Hythonia
2021-05-07 19:45:55 +02:00
parent 8c139ad044
commit 8aa72e9397
13 changed files with 79 additions and 3 deletions

View File

@@ -166,7 +166,8 @@ public class ManaEffect extends SpellAbilityEffect {
abMana.setExpressChoice(sb.toString());
} else if (type.startsWith("EachColorAmong")) {
final String res = type.split("_")[1];
final CardCollection list = CardLists.getValidCards(card.getGame().getCardsIn(ZoneType.Battlefield),
final ZoneType zone = type.startsWith("EachColorAmong_") ? ZoneType.Battlefield : ZoneType.smartValueOf(type.split("_")[0].substring(14));
final CardCollection list = CardLists.getValidCards(card.getGame().getCardsIn(zone),
res, sa.getActivatingPlayer(), card, sa);
byte colors = 0;
for (Card c : list) {

View File

@@ -3,6 +3,7 @@ package forge.game.card;
import java.util.Collections;
import java.util.List;
import forge.card.mana.ManaCostParser;
import org.apache.commons.lang3.StringUtils;
import com.google.common.collect.Iterables;
@@ -1457,6 +1458,12 @@ public class CardProperty {
}
}
else if (property.startsWith("ManaCost")) {
if (!card.getManaCost().getShortString().equals(property.substring(8))) {
return false;
}
}
// syntax example: countersGE9 P1P1 or countersLT12TIME (greater number
// than 99 not supported)
/*