mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
MH3: nethergoyf.txt + support (#5311)
This commit is contained in:
@@ -202,12 +202,23 @@ public class CostExile extends CostPartWithList {
|
||||
type = TextUtil.fastReplace(type, "+withSharedCardType", "");
|
||||
}
|
||||
|
||||
int nTypes = -1;
|
||||
if (type.contains("+withTypesGE")) {
|
||||
String num = type.split("withTypesGE")[1];
|
||||
type = TextUtil.fastReplace(type, TextUtil.concatNoSpace("+withTypesGE", num), "");
|
||||
nTypes = Integer.parseInt(num);
|
||||
}
|
||||
|
||||
if (!type.contains("X") || ability.getXManaCostPaid() != null) {
|
||||
list = CardLists.getValidCards(list, type.split(";"), payer, source, ability);
|
||||
}
|
||||
|
||||
int amount = this.getAbilityAmount(ability);
|
||||
|
||||
if (nTypes > -1) {
|
||||
if (CardFactoryUtil.getCardTypesFromList(list) < nTypes) return false;
|
||||
}
|
||||
|
||||
if (sharedType) { // will need more logic if cost ever wants more than 2 that share a type
|
||||
if (list.size() < amount) return false;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user