public boolean isEmpty() { return count() == 0; }
protected void assignColorless(Ability ability, Game game, ManaPool pool, int mana, Cost costToPay) { int conditionalCount = pool.getConditionalCount(ability, game, null, costToPay); while (mana > payment.count() && (pool.count() > 0 || conditionalCount > 0)) { if (pool.pay(ManaType.COLORLESS, ability, sourceFilter, game, costToPay, usedManaToPay)) { this.payment.increaseColorless(); } break; } }
protected boolean assignGeneric(Ability ability, Game game, ManaPool pool, int mana, Cost costToPay) { int conditionalCount = pool.getConditionalCount(ability, game, null, costToPay); while (mana > payment.count() && (pool.count() > 0 || conditionalCount > 0)) { if (pool.pay(ManaType.COLORLESS, ability, sourceFilter, game, costToPay, usedManaToPay)) { this.payment.increaseColorless();
protected boolean passWithManaPoolCheck(Game game) { if (userData.confirmEmptyManaPool() && game.getStack().isEmpty() && getManaPool().count() > 0) { String activePlayerText; if (game.isActivePlayer(playerId)) { activePlayerText = "Your turn"; } else { activePlayerText = game.getPlayer(game.getActivePlayerId()).getName() + "'s turn"; } String priorityPlayerText = ""; if (!isGameUnderControl()) { priorityPlayerText = " / priority " + game.getPlayer(game.getPriorityPlayerId()).getName(); } if (!chooseUse(Outcome.Detriment, GameLog.getPlayerConfirmColoredText("You still have mana in your mana pool. Pass regardless?") + GameLog.getSmallSecondLineText(activePlayerText + " / " + game.getStep().getType().toString() + priorityPlayerText), null, game)) { sendPlayerAction(PlayerAction.PASS_PRIORITY_CANCEL_ALL_ACTIONS, game, null); return false; } } pass(game); return true; }