mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Tunnel Ignus added
This commit is contained in:
@@ -1123,14 +1123,18 @@ public class CardFactoryUtil {
|
||||
if (l[0].startsWith("SVar$")) {
|
||||
return doXMath(xCount(c, c.getSVar(l[0].substring(5))), m, c);
|
||||
}
|
||||
|
||||
if (l[0].startsWith("Controller$"))
|
||||
return playerXProperty(cc, l[0].substring(11), c);
|
||||
|
||||
|
||||
// Manapool
|
||||
if (l[0].startsWith("ManaPool")) {
|
||||
final String color = l[0].split(":")[1];
|
||||
if (color.equals("All")) {
|
||||
return c.getController().getManaPool().totalMana();
|
||||
return cc.getManaPool().totalMana();
|
||||
} else {
|
||||
return c.getController().getManaPool().getAmountOfColor(color);
|
||||
return cc.getManaPool().getAmountOfColor(color);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1140,8 +1144,8 @@ public class CardFactoryUtil {
|
||||
final String[] rest = lparts[1].split(",");
|
||||
|
||||
final List<Card> cardsInZones = lparts[0].length() > 5
|
||||
? cc.getGame().getCardsIn(ZoneType.listValueOf(lparts[0].substring(5)))
|
||||
: cc.getGame().getCardsIn(ZoneType.Battlefield);
|
||||
? game.getCardsIn(ZoneType.listValueOf(lparts[0].substring(5)))
|
||||
: game.getCardsIn(ZoneType.Battlefield);
|
||||
|
||||
List<Card> cards = CardLists.getValidCards(cardsInZones, rest, cc, c);
|
||||
return doXMath(cards.size(), m, c);
|
||||
|
||||
@@ -88,10 +88,7 @@ public class TriggerChangesZone extends Trigger {
|
||||
final Card host = hostCard.getGame().getCardState(hostCard);
|
||||
final String comparator = condition.length < 2 ? "GE1" : condition[1];
|
||||
final int referenceValue = AbilityUtils.calculateAmount(host, comparator.substring(2), null);
|
||||
final Object triggered = runParams2.get("Card");
|
||||
if(!(triggered instanceof Card))
|
||||
throw new IllegalArgumentException( host + " - CheckOnTriggeredCard being checked for a trigger that has no card!");
|
||||
|
||||
final Card triggered = (Card)runParams2.get("Card");
|
||||
final int actualValue = CardFactoryUtil.xCount((Card)triggered, host.getSVar(condition[0]));
|
||||
if (!Expressions.compare(actualValue, comparator.substring(0, 2), referenceValue)) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user