mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
merge latest trunk
This commit is contained in:
@@ -6891,6 +6891,13 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
else if (list.get(1) != this) {
|
||||
return false;
|
||||
}
|
||||
} else if (property.equals("ThisTurnCast")) {
|
||||
for (final Card card : CardUtil.getThisTurnCast("Card", source)) {
|
||||
if (this.equals(card)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} else if (property.startsWith("sharesTypeWith")) {
|
||||
if (!this.sharesTypeWith(source)) {
|
||||
return false;
|
||||
@@ -7523,7 +7530,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
}
|
||||
|
||||
for (final String type : this.getType()) {
|
||||
if (type.equals("AllCreatureTypes") && c1.hasACreatureType()) {
|
||||
if (type.equals("AllCreatureTypes")
|
||||
&& (c1.hasACreatureType() || c1.typeContains("AllCreatureTypes"))) {
|
||||
return true;
|
||||
}
|
||||
if (forge.card.CardType.isACreatureType(type) && c1.isType(type)) {
|
||||
|
||||
@@ -290,15 +290,14 @@ public final class CardRulesPredicates {
|
||||
boolean shouldContain;
|
||||
switch (this.field) {
|
||||
case NAME:
|
||||
return this.op(card.getName(), this.operand);
|
||||
return op(card.getName(), this.operand);
|
||||
case SUBTYPE:
|
||||
shouldContain = (this.getOperator() == StringOp.CONTAINS) || (this.getOperator() == StringOp.EQUALS);
|
||||
return shouldContain == card.getType().subTypeContains(this.operand);
|
||||
case ORACLE_TEXT:
|
||||
shouldContain = (this.getOperator() == StringOp.CONTAINS) || (this.getOperator() == StringOp.EQUALS);
|
||||
return shouldContain == card.getOracleText().contains(this.operand);
|
||||
return op(card.getOracleText(), operand);
|
||||
case JOINED_TYPE:
|
||||
return this.op(card.getType().toString(), this.operand);
|
||||
return op(card.getType().toString(), operand);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ public class ComputerUtilMana {
|
||||
} else {
|
||||
m.setExpressChoice("0");
|
||||
}
|
||||
}
|
||||
}
|
||||
// check if ability produces any color
|
||||
else if (m.isAnyMana()) {
|
||||
String colorChoice = costParts[nPart];
|
||||
@@ -156,7 +156,7 @@ public class ComputerUtilMana {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (costParts[nPart].contains("/")) {
|
||||
} else if (costParts[nPart].contains("2/")) {
|
||||
colorChoice = costParts[nPart].replace("2/", "");
|
||||
} else if (costParts[nPart].length() > 1) {
|
||||
colorChoice = costParts[nPart].substring(0, 1);
|
||||
|
||||
@@ -148,7 +148,9 @@ public class Upkeep extends Phase {
|
||||
|
||||
}
|
||||
};
|
||||
upkeepAbility.setActivatingPlayer(c.getController());
|
||||
upkeepAbility.setStackDescription(sb.toString());
|
||||
upkeepAbility.setDescription(sb.toString());
|
||||
|
||||
game.getStack().addSimultaneousStackEntry(upkeepAbility);
|
||||
|
||||
@@ -206,6 +208,7 @@ public class Upkeep extends Phase {
|
||||
}
|
||||
}
|
||||
};
|
||||
sacAbility.setActivatingPlayer(c.getController());
|
||||
sacAbility.setStackDescription(sb.toString());
|
||||
sacAbility.setDescription(sb.toString());
|
||||
|
||||
@@ -514,7 +517,9 @@ public class Upkeep extends Phase {
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append(abyss.getName()).append(" - destroy a nonartifact creature of your choice.");
|
||||
sacrificeCreature.setActivatingPlayer(c.getController());
|
||||
sacrificeCreature.setStackDescription(sb.toString());
|
||||
sacrificeCreature.setDescription(sb.toString());
|
||||
game.getStack().addAndUnfreeze(sacrificeCreature);
|
||||
} // end for
|
||||
} // The Abyss
|
||||
@@ -587,7 +592,9 @@ public class Upkeep extends Phase {
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append(c.getName()).append(" - destroy 1 creature with lowest power.");
|
||||
ability.setActivatingPlayer(c.getController());
|
||||
ability.setStackDescription(sb.toString());
|
||||
ability.setDescription(sb.toString());
|
||||
|
||||
game.getStack().addSimultaneousStackEntry(ability);
|
||||
|
||||
@@ -997,6 +1004,7 @@ public class Upkeep extends Phase {
|
||||
sb.append(source).append(" - deals ").append(damage).append(" damage to ").append(player);
|
||||
ability.setStackDescription(sb.toString());
|
||||
ability.setDescription(sb.toString());
|
||||
ability.setActivatingPlayer(surge.getController());
|
||||
|
||||
if (damage > 0) {
|
||||
game.getStack().addSimultaneousStackEntry(ability);
|
||||
@@ -1084,6 +1092,7 @@ public class Upkeep extends Phase {
|
||||
+ " taps X artifacts, creatures or lands he or she controls.");
|
||||
ability.setDescription(source.getName() + " - " + player
|
||||
+ " taps X artifacts, creatures or lands he or she controls.");
|
||||
ability.setActivatingPlayer(source.getController());
|
||||
|
||||
game.getStack().addSimultaneousStackEntry(ability);
|
||||
|
||||
@@ -1119,6 +1128,8 @@ public class Upkeep extends Phase {
|
||||
sb.append(blaze.get(i)).append(" - has a blaze counter and deals 1 damage to ");
|
||||
sb.append(player).append(".");
|
||||
ability.setStackDescription(sb.toString());
|
||||
ability.setDescription(sb.toString());
|
||||
ability.setActivatingPlayer(source.getController());
|
||||
|
||||
game.getStack().addSimultaneousStackEntry(ability);
|
||||
|
||||
|
||||
@@ -88,20 +88,15 @@ public class SFilterUtil {
|
||||
return Predicates.alwaysTrue();
|
||||
}
|
||||
|
||||
String[] splitText = text
|
||||
.replaceAll(",", "")
|
||||
.replaceAll(" ", " ")
|
||||
.toLowerCase().split(" ");
|
||||
String[] splitText = text.replaceAll(",", "").replaceAll(" ", " ").split(" ");
|
||||
|
||||
List<Predicate<CardRules>> terms = new ArrayList<Predicate<CardRules>>();
|
||||
for (String s : splitText) {
|
||||
List<Predicate<CardRules>> subands = new ArrayList<Predicate<CardRules>>();
|
||||
|
||||
if (inName) { subands.add(CardRulesPredicates.name(StringOp.CONTAINS_IC, s)); }
|
||||
if (inName) { subands.add(CardRulesPredicates.name(StringOp.CONTAINS_IC, s)); }
|
||||
if (inType) { subands.add(CardRulesPredicates.joinedType(StringOp.CONTAINS_IC, s)); }
|
||||
|
||||
// rules cannot compare in ignore-case way
|
||||
if (inText) { subands.add(CardRulesPredicates.rules(StringOp.CONTAINS, s)); }
|
||||
if (inText) { subands.add(CardRulesPredicates.rules(StringOp.CONTAINS_IC, s)); }
|
||||
|
||||
terms.add(Predicates.or(subands));
|
||||
}
|
||||
|
||||
@@ -130,16 +130,16 @@ public enum VSubmenuPlanechase implements IVSubmenu<CSubmenuPlanechase> {
|
||||
|
||||
deckChoosers.add(tempChooser);
|
||||
|
||||
tempPanel.add(tempChooser, "span 1 2, w 44%!, gap 0 0 20px 20px, growy, pushy, wrap");
|
||||
tempPanel.add(tempChooser, "span 1 2, w 55%!, gap 10px 10px 0px 10px, growy, pushy, wrap");
|
||||
|
||||
tempPanel.add(new FLabel.Builder().text("Select Planar deck:").build(), "flowy");
|
||||
tempPanel.add(new FLabel.Builder().text("Select Planar deck:").build(), "gap 0px 0px 10px 10px, flowy");
|
||||
|
||||
tempPlanarDeckList = new FList();
|
||||
|
||||
tempPlanarDeckList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
|
||||
|
||||
JScrollPane scrPlanes = new FScrollPane(tempPlanarDeckList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
tempPanel.add(scrPlanes, "h 90%!,wrap");
|
||||
tempPanel.add(scrPlanes, "h 90%, gap 0px 10px 0px 10px, growy, pushy, wrap");
|
||||
planarDeckLists.add(tempPlanarDeckList);
|
||||
|
||||
playerPanels.add(tempPanel);
|
||||
|
||||
Reference in New Issue
Block a user