mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Fixed a bug in CostTapType
This commit is contained in:
@@ -803,7 +803,7 @@ public class ComputerUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (final Exception ex) {
|
} catch (final Exception ex) {
|
||||||
throw new RuntimeException(String.format("There is an error in the card code for %s:%n", c.getName(), ex.getMessage()), ex);
|
throw new RuntimeException(String.format("There is an error in the card code for %s:%s", c.getName(), ex.getMessage()), ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -850,7 +850,7 @@ public class ComputerUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (final Exception ex) {
|
} catch (final Exception ex) {
|
||||||
throw new RuntimeException(String.format("There is an error in the card code for %s:%n", c.getName(), ex.getMessage()), ex);
|
throw new RuntimeException(String.format("There is an error in the card code for %s:%s", c.getName(), ex.getMessage()), ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class GameRules {
|
|||||||
|
|
||||||
public void setGamesPerMatch(int gamesPerMatch) {
|
public void setGamesPerMatch(int gamesPerMatch) {
|
||||||
this.gamesPerMatch = gamesPerMatch;
|
this.gamesPerMatch = gamesPerMatch;
|
||||||
this.gamesToWinMatch = (int)Math.ceil((gamesPerMatch+1)/2);
|
this.gamesToWinMatch = gamesPerMatch / 2 + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean useAnte() {
|
public boolean useAnte() {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class CostTapType extends CostPartWithList {
|
|||||||
if (type.contains("sharesCreatureTypeWith")) {
|
if (type.contains("sharesCreatureTypeWith")) {
|
||||||
sb.append("two untapped creatures you control that share a creature type");
|
sb.append("two untapped creatures you control that share a creature type");
|
||||||
} else if (type.contains("+withTotalPowerGE")) {
|
} else if (type.contains("+withTotalPowerGE")) {
|
||||||
String num = type.split("+withTotalPowerGE")[1];
|
String num = type.split("\\+withTotalPowerGE")[1];
|
||||||
sb.append("Tap any number of untapped creatures you control other than CARDNAME with total power " + num + "or greater");
|
sb.append("Tap any number of untapped creatures you control other than CARDNAME with total power " + num + "or greater");
|
||||||
} else {
|
} else {
|
||||||
sb.append(Cost.convertAmountTypeToWords(i, this.getAmount(), "untapped " + desc));
|
sb.append(Cost.convertAmountTypeToWords(i, this.getAmount(), "untapped " + desc));
|
||||||
|
|||||||
@@ -21,17 +21,14 @@ import com.google.common.base.Function;
|
|||||||
|
|
||||||
import forge.UiCommand;
|
import forge.UiCommand;
|
||||||
import forge.Singletons;
|
import forge.Singletons;
|
||||||
import forge.game.Game;
|
|
||||||
import forge.game.card.Card;
|
import forge.game.card.Card;
|
||||||
import forge.game.player.LobbyPlayer;
|
import forge.game.player.LobbyPlayer;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.spellability.SpellAbility;
|
|
||||||
import forge.game.zone.ZoneType;
|
import forge.game.zone.ZoneType;
|
||||||
import forge.gui.framework.ICDoc;
|
import forge.gui.framework.ICDoc;
|
||||||
import forge.match.MatchConstants;
|
import forge.match.MatchConstants;
|
||||||
import forge.match.input.Input;
|
import forge.match.input.Input;
|
||||||
import forge.match.input.InputPayMana;
|
import forge.match.input.InputPayMana;
|
||||||
import forge.player.HumanPlay;
|
|
||||||
import forge.properties.ForgePreferences;
|
import forge.properties.ForgePreferences;
|
||||||
import forge.screens.match.ZoneAction;
|
import forge.screens.match.ZoneAction;
|
||||||
import forge.screens.match.views.VField;
|
import forge.screens.match.views.VField;
|
||||||
|
|||||||
@@ -152,7 +152,9 @@ public final class BoosterUtils {
|
|||||||
final ArrayList<PaperCard> result = new ArrayList<PaperCard>();
|
final ArrayList<PaperCard> result = new ArrayList<PaperCard>();
|
||||||
|
|
||||||
final int size = allowedColors == null ? 0 : allowedColors.size();
|
final int size = allowedColors == null ? 0 : allowedColors.size();
|
||||||
Collections.shuffle(allowedColors);
|
if (allowedColors != null) {
|
||||||
|
Collections.shuffle(allowedColors);
|
||||||
|
}
|
||||||
|
|
||||||
int cntMade = 0, iAttempt = 0;
|
int cntMade = 0, iAttempt = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user