mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Fix being able to pay mana for Hogaak
This commit is contained in:
@@ -2,6 +2,7 @@ package forge.game.ability;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@@ -2381,7 +2382,14 @@ public class AbilityUtils {
|
||||
if (sq[0].contains("CombatDamage")) {
|
||||
isCombat = true;
|
||||
}
|
||||
return doXMath(game.getDamageDoneThisTurn(isCombat, false, props[1], props[2], c, player, ctb).size(), expr, c, ctb);
|
||||
int num;
|
||||
List<Integer> dmgInstances = game.getDamageDoneThisTurn(isCombat, false, props[1], props[2], c, player, ctb);
|
||||
if (sq[0].contains("Max")) {
|
||||
num = Collections.max(dmgInstances);
|
||||
} else {
|
||||
num = dmgInstances.size();
|
||||
}
|
||||
return doXMath(num, expr, c, ctb);
|
||||
}
|
||||
|
||||
if (sq[0].equals("YourTurns")) {
|
||||
|
||||
@@ -923,7 +923,7 @@ public class CardFactoryUtil {
|
||||
|
||||
StringBuilder trigReturn = new StringBuilder();
|
||||
trigReturn.append("Mode$ ChangesZone | Origin$ Battlefield | ValidCard$ Card.Self");
|
||||
trigReturn.append(" | Secondary$ True | TriggerDescription$ When this permanent leaves the battlefield, return the exiled card to the battlefield under its owner’s control.");
|
||||
trigReturn.append(" | Secondary$ True | TriggerDescription$ When this permanent leaves the battlefield, return the exiled card to the battlefield under its owner's control.");
|
||||
|
||||
StringBuilder ab = new StringBuilder();
|
||||
ab.append("DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True ");
|
||||
|
||||
@@ -313,7 +313,7 @@ public class CostPayment extends ManaConversionMatrix {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(restriction) && !thisMana.getSourceCard().getType().hasStringType(restriction)) {
|
||||
if (StringUtils.isNotBlank(restriction) && !thisMana.getSourceCard().isValid(restriction, null, null, null)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ public class ManaPool extends ManaConversionMatrix implements Iterable<Mana> {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(restriction) && !mana.getSourceCard().getType().hasStringType(restriction)) {
|
||||
if (StringUtils.isNotBlank(restriction) && !mana.getSourceCard().isValid(restriction, null, null, null)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user