Tunnel Ignus added

This commit is contained in:
Maxmtg
2013-05-08 08:12:14 +00:00
parent 37797e4562
commit d1b415e39f
4 changed files with 20 additions and 8 deletions

View File

@@ -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);

View File

@@ -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;