diff --git a/forge-ai/src/main/java/forge/ai/AiAttackController.java b/forge-ai/src/main/java/forge/ai/AiAttackController.java index 781a8916daf..82730c69e18 100644 --- a/forge-ai/src/main/java/forge/ai/AiAttackController.java +++ b/forge-ai/src/main/java/forge/ai/AiAttackController.java @@ -514,9 +514,8 @@ public class AiAttackController { if (Iterables.any(oppBattlefield, Predicates.and(CardPredicates.Presets.UNTAPPED, CardPredicates.Presets.LANDS))) { maxBlockersAfterCrew = Integer.MAX_VALUE; break; - } else { - maxBlockersAfterCrew--; } + maxBlockersAfterCrew--; } else if (cardType.hasSubtype("Vehicle") && !cardType.isCreature()) { maxBlockersAfterCrew--; } diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtil.java b/forge-ai/src/main/java/forge/ai/ComputerUtil.java index 3646538ad67..519a4329608 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtil.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtil.java @@ -2436,7 +2436,7 @@ public class ComputerUtil { CardCollection cardsInPlay = CardLists.getNotType(game.getCardsIn(ZoneType.Battlefield), "Land"); CardCollection humanlist = CardLists.filterControlledBy(cardsInPlay, ai.getOpponents()); CardCollection computerlist = ai.getCreaturesInPlay(); - return (ComputerUtilCard.evaluatePermanentList(computerlist) + 3) < ComputerUtilCard.evaluatePermanentList(humanlist) ? "Carnage" : "Homage"; + return ComputerUtilCard.evaluatePermanentList(computerlist) + 3 < ComputerUtilCard.evaluatePermanentList(humanlist) ? "Carnage" : "Homage"; case "Judgment": if (votes.isEmpty()) { CardCollection list = new CardCollection(); @@ -2446,9 +2446,8 @@ public class ComputerUtil { } } return ComputerUtilCard.getBestAI(list); - } else { - return Iterables.getFirst(votes.keySet(), null); } + return Iterables.getFirst(votes.keySet(), null); case "Protection": if (votes.isEmpty()) { List restrictedToColors = Lists.newArrayList(); @@ -2459,9 +2458,8 @@ public class ComputerUtil { } CardCollection lists = CardLists.filterControlledBy(game.getCardsInGame(), ai.getOpponents()); return StringUtils.capitalize(ComputerUtilCard.getMostProminentColor(lists, restrictedToColors)); - } else { - return Iterables.getFirst(votes.keySet(), null); } + return Iterables.getFirst(votes.keySet(), null); case "FeatherOrQuill": // try to mill opponent with Quill vote if (opponent && !controller.cantLose()) { diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtilCombat.java b/forge-ai/src/main/java/forge/ai/ComputerUtilCombat.java index ce35cbd6650..a447493f261 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtilCombat.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtilCombat.java @@ -2292,9 +2292,8 @@ public class ComputerUtilCombat { } if (!withoutAbilities) { return canGainKeyword(combatant, Lists.newArrayList(keyword), combat); - } else { - return false; } + return false; } public final static boolean canGainKeyword(final Card combatant, final List keywords, final Combat combat) { diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java b/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java index 0b8bf14c558..ef5a43bd731 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java @@ -306,52 +306,50 @@ public class ComputerUtilMana { continue; } - if (saHost != null) { - if (ma.getPayCosts().hasTapCost() && AiCardMemory.isRememberedCard(ai, ma.getHostCard(), MemorySet.PAYS_TAP_COST)) { + if (ma.getPayCosts().hasTapCost() && AiCardMemory.isRememberedCard(ai, ma.getHostCard(), MemorySet.PAYS_TAP_COST)) { + continue; + } + + if (!ComputerUtilCost.checkTapTypeCost(ai, ma.getPayCosts(), ma.getHostCard(), sa)) { + continue; + } + + if (!ComputerUtilCost.checkForManaSacrificeCost(ai, ma.getPayCosts(), ma.getHostCard(), ma, ma.isTrigger())) { + continue; + } + + if (sa.getApi() == ApiType.Animate) { + // For abilities like Genju of the Cedars, make sure that we're not activating the aura ability by tapping the enchanted card for mana + if (saHost.isAura() && "Enchanted".equals(sa.getParam("Defined")) + && ma.getHostCard() == saHost.getEnchantingCard() + && ma.getPayCosts().hasTapCost()) { continue; } - if (!ComputerUtilCost.checkTapTypeCost(ai, ma.getPayCosts(), ma.getHostCard(), sa)) { + // If a manland was previously animated this turn, do not tap it to animate another manland + if (saHost.isLand() && ma.getHostCard().isLand() + && ai.getController().isAI() + && AnimateAi.isAnimatedThisTurn(ai, ma.getHostCard())) { continue; } - - if (!ComputerUtilCost.checkForManaSacrificeCost(ai, ma.getPayCosts(), ma.getHostCard(), ma, ma.isTrigger())) { + } else if (sa.getApi() == ApiType.Pump) { + if ((saHost.isInstant() || saHost.isSorcery()) + && ma.getHostCard().isCreature() + && ai.getController().isAI() + && ma.getPayCosts().hasTapCost() + && sa.getTargets().getTargetCards().contains(ma.getHostCard())) { + // do not activate pump instants/sorceries targeting creatures by tapping targeted + // creatures for mana (for example, Servant of the Conduit) continue; } - - if (sa.getApi() == ApiType.Animate) { - // For abilities like Genju of the Cedars, make sure that we're not activating the aura ability by tapping the enchanted card for mana - if (saHost.isAura() && "Enchanted".equals(sa.getParam("Defined")) - && ma.getHostCard() == saHost.getEnchantingCard() - && ma.getPayCosts().hasTapCost()) { + } else if (sa.getApi() == ApiType.Attach + && "AvoidPayingWithAttachTarget".equals(saHost.getSVar("AIPaymentPreference"))) { + // For cards like Genju of the Cedars, make sure we're not attaching to the same land that will + // be tapped to pay its own cost if there's another untapped land like that available + if (ma.getHostCard().equals(sa.getTargetCard())) { + if (CardLists.filter(ai.getCardsIn(ZoneType.Battlefield), Predicates.and(CardPredicates.nameEquals(ma.getHostCard().getName()), CardPredicates.Presets.UNTAPPED)).size() > 1) { continue; } - - // If a manland was previously animated this turn, do not tap it to animate another manland - if (saHost.isLand() && ma.getHostCard().isLand() - && ai.getController().isAI() - && AnimateAi.isAnimatedThisTurn(ai, ma.getHostCard())) { - continue; - } - } else if (sa.getApi() == ApiType.Pump) { - if ((saHost.isInstant() || saHost.isSorcery()) - && ma.getHostCard().isCreature() - && ai.getController().isAI() - && ma.getPayCosts().hasTapCost() - && sa.getTargets().getTargetCards().contains(ma.getHostCard())) { - // do not activate pump instants/sorceries targeting creatures by tapping targeted - // creatures for mana (for example, Servant of the Conduit) - continue; - } - } else if (sa.getApi() == ApiType.Attach - && "AvoidPayingWithAttachTarget".equals(saHost.getSVar("AIPaymentPreference"))) { - // For cards like Genju of the Cedars, make sure we're not attaching to the same land that will - // be tapped to pay its own cost if there's another untapped land like that available - if (ma.getHostCard().equals(sa.getTargetCard())) { - if (CardLists.filter(ai.getCardsIn(ZoneType.Battlefield), Predicates.and(CardPredicates.nameEquals(ma.getHostCard().getName()), CardPredicates.Presets.UNTAPPED)).size() > 1) { - continue; - } - } } } diff --git a/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java b/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java index ddeb2473e2b..7237fa2eae3 100644 --- a/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java @@ -1023,9 +1023,8 @@ public class ChangeZoneAi extends SpellAbilityAi { } if (blink) { return c.isToken(); - } else { - return c.isToken() || c.getCMC() > 0; } + return c.isToken() || c.getCMC() > 0; } }); } diff --git a/forge-ai/src/main/java/forge/ai/ability/ControlGainAi.java b/forge-ai/src/main/java/forge/ai/ability/ControlGainAi.java index d4cfdca8c5e..35e1d886159 100644 --- a/forge-ai/src/main/java/forge/ai/ability/ControlGainAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/ControlGainAi.java @@ -315,7 +315,6 @@ public class ControlGainAi extends SpellAbilityAi { } else { return this.canPlayAI(ai, sa); } - } // pumpDrawbackAI() @Override diff --git a/forge-ai/src/main/java/forge/ai/ability/DamageAiBase.java b/forge-ai/src/main/java/forge/ai/ability/DamageAiBase.java index 05d98d165f7..649432f670f 100644 --- a/forge-ai/src/main/java/forge/ai/ability/DamageAiBase.java +++ b/forge-ai/src/main/java/forge/ai/ability/DamageAiBase.java @@ -153,10 +153,9 @@ public abstract class DamageAiBase extends SpellAbilityAi { } if (value < 0.2f) { //hard floor to reduce ridiculous odds for instants over time return false; - } else { - final float chance = MyRandom.getRandom().nextFloat(); - return chance < value; } + final float chance = MyRandom.getRandom().nextFloat(); + return chance < value; } } diff --git a/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java b/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java index bb66f8f4548..8e9229745fc 100644 --- a/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java @@ -811,9 +811,8 @@ public class DamageDealAi extends DamageAiBase { if (!c.hasKeyword(Keyword.INDESTRUCTIBLE) && ComputerUtilCombat.getDamageToKill(c, false) <= restDamage) { if (c.getController().equals(ai)) { return false; - } else { - urgent = true; } + urgent = true; } if (c.getController().isOpponentOf(ai) ^ c.getName().equals("Stuffy Doll")) { positive = true; diff --git a/forge-ai/src/main/java/forge/ai/ability/EffectAi.java b/forge-ai/src/main/java/forge/ai/ability/EffectAi.java index 50abb9d9bc7..03257930982 100644 --- a/forge-ai/src/main/java/forge/ai/ability/EffectAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/EffectAi.java @@ -198,7 +198,7 @@ public class EffectAi extends SpellAbilityAi { final Card host = saTop.getHostCard(); if (saTop.getActivatingPlayer() != ai // from opponent && host.canDamagePrevented(false) // no prevent damage - && host != null && (host.isInstant() || host.isSorcery()) + && (host.isInstant() || host.isSorcery()) && !host.hasKeyword("Prevent all damage that would be dealt by CARDNAME.")) { // valid target final ApiType type = saTop.getApi(); if (type == ApiType.DealDamage || type == ApiType.DamageAll) { // burn spell diff --git a/forge-ai/src/main/java/forge/ai/ability/FightAi.java b/forge-ai/src/main/java/forge/ai/ability/FightAi.java index d5e36f5a8bc..20f75ed3a8d 100644 --- a/forge-ai/src/main/java/forge/ai/ability/FightAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/FightAi.java @@ -286,12 +286,11 @@ public class FightAi extends SpellAbilityAi { private static boolean shouldFight(Card fighter, Card opponent, int pumpAttack, int pumpDefense) { if (canKill(fighter, opponent, pumpAttack)) { if (!canKill(opponent, fighter, -pumpDefense)) { // can survive - return true; - } else { - if (MyRandom.getRandom().nextInt(20) < (opponent.getCMC() - fighter.getCMC())) { // trade - return true; - } - } + return true; + } + if (MyRandom.getRandom().nextInt(20) < (opponent.getCMC() - fighter.getCMC())) { // trade + return true; + } } return false; } diff --git a/forge-ai/src/main/java/forge/ai/simulation/GameCopier.java b/forge-ai/src/main/java/forge/ai/simulation/GameCopier.java index e537b1754ca..92f75da9be2 100644 --- a/forge-ai/src/main/java/forge/ai/simulation/GameCopier.java +++ b/forge-ai/src/main/java/forge/ai/simulation/GameCopier.java @@ -233,10 +233,14 @@ public class GameCopier { if (card.isPaired()) { otherCard.setPairedWith(cardMap.get(card.getPairedWith())); } + if (card.getCopiedPermanent() != null) { + // TODO would it be safe to simply reuse the prototype? + otherCard.setCopiedPermanent(CardFactory.copyCard(card.getCopiedPermanent(), false)); + } // TODO: Verify that the above relationships are preserved bi-directionally or not. } } - + private static final boolean USE_FROM_PAPER_CARD = true; private Card createCardCopy(Game newGame, Player newOwner, Card c) { if (c.isToken() && !c.isImmutable()) { diff --git a/forge-game/src/main/java/forge/game/CardTraitBase.java b/forge-game/src/main/java/forge/game/CardTraitBase.java index f6dddb1f8f2..54c8034d645 100644 --- a/forge-game/src/main/java/forge/game/CardTraitBase.java +++ b/forge-game/src/main/java/forge/game/CardTraitBase.java @@ -547,9 +547,8 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView, public String getSVar(final String name) { if (sVars.containsKey(name)) { return sVars.get(name); - } else { - return getSVarFallback().getSVar(name); } + return getSVarFallback().getSVar(name); } @Override diff --git a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java index d79d614c985..1a47b37b1ea 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -1422,7 +1422,7 @@ public class AbilityUtils { // do blessing there before condition checks if (sa.isSpell() && sa.isBlessing() && !sa.getHostCard().isPermanent()) { - if (pl != null && pl.getZone(ZoneType.Battlefield).size() >= 10) { + if (pl.getZone(ZoneType.Battlefield).size() >= 10) { pl.setBlessing(true); } } @@ -1871,9 +1871,8 @@ public class AbilityUtils { list = CardLists.getValidCards(list, k[1].split(","), sa.getActivatingPlayer(), c, sa); if (k[0].contains("TotalToughness")) { return doXMath(Aggregates.sum(list, CardPredicates.Accessors.fnGetNetToughness), expr, c, ctb); - } else { - return doXMath(list.size(), expr, c, ctb); } + return doXMath(list.size(), expr, c, ctb); } if (sq[0].startsWith("LastStateGraveyard")) { @@ -3208,9 +3207,8 @@ public class AbilityUtils { } else if (s[0].contains("DivideEvenlyDown")) { if (secondaryNum == 0) { return 0; - } else { - return num / secondaryNum; } + return num / secondaryNum; } else if (s[0].contains("Mod")) { return num % secondaryNum; } else if (s[0].contains("Abs")) { @@ -3218,15 +3216,13 @@ public class AbilityUtils { } else if (s[0].contains("LimitMax")) { if (num < secondaryNum) { return num; - } else { - return secondaryNum; } + return secondaryNum; } else if (s[0].contains("LimitMin")) { if (num > secondaryNum) { return num; - } else { - return secondaryNum; } + return secondaryNum; } else { return num; diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index 394bde4fe69..13a6558ba71 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -371,8 +371,8 @@ public class Card extends GameEntity implements Comparable, IHasSVars { return false; } - public long getTransformedTimestamp() { return transformedTimestamp; } - public void incrementTransformedTimestamp() { this.transformedTimestamp++; } + public long getTransformedTimestamp() { return transformedTimestamp; } + public void incrementTransformedTimestamp() { this.transformedTimestamp++; } public CardState getCurrentState() { return currentState; @@ -3037,7 +3037,7 @@ public class Card extends GameEntity implements Comparable, IHasSVars { return tokenCard; } public final void setTokenCard(boolean tokenC) { - if (tokenCard = tokenC) { return; } + if (tokenCard == tokenC) { return; } tokenCard = tokenC; view.updateTokenCard(this); } @@ -5232,9 +5232,9 @@ public class Card extends GameEntity implements Comparable, IHasSVars { // this is the amount of damage a creature needs to receive before it dies public final int getLethal() { if (hasKeyword("Lethal damage dealt to CARDNAME is determined by its power rather than its toughness.")) { - return getNetPower(); } - else { - return getNetToughness(); } + return getNetPower(); + } + return getNetToughness(); } // this is the minimal damage a trampling creature has to assign to a blocker diff --git a/forge-game/src/main/java/forge/game/card/token/TokenInfo.java b/forge-game/src/main/java/forge/game/card/token/TokenInfo.java index 4e764b3663f..4d639a0d8e9 100644 --- a/forge-game/src/main/java/forge/game/card/token/TokenInfo.java +++ b/forge-game/src/main/java/forge/game/card/token/TokenInfo.java @@ -185,7 +185,6 @@ public class TokenInfo { } } if (!typeMap.isEmpty()) { - CardType type = new CardType(result.getType()); final boolean nameGenerated = result.getName().endsWith(" Token"); boolean typeChanged = false; diff --git a/forge-game/src/main/java/forge/game/cost/CostDiscard.java b/forge-game/src/main/java/forge/game/cost/CostDiscard.java index 25024ab32b7..c89906c5086 100644 --- a/forge-game/src/main/java/forge/game/cost/CostDiscard.java +++ b/forge-game/src/main/java/forge/game/cost/CostDiscard.java @@ -135,56 +135,54 @@ public class CostDiscard extends CostPartWithList { if (this.payCostFromSource()) { return source.canBeDiscardedBy(ability, effect); } + else if (type.equals("Hand")) { + // trying to discard an empty hand always work even with Tamiyo + if (payer.getZone(ZoneType.Hand).isEmpty()) { + return true; + } + return payer.canDiscardBy(ability, effect); + // this will always work + } + else if (type.equals("LastDrawn")) { + final Card c = payer.getLastDrawnCard(); + return handList.contains(c); + } + else if (type.equals("DifferentNames")) { + Set cardNames = Sets.newHashSet(); + for (Card c : handList) { + cardNames.add(c.getName()); + } + return cardNames.size() >= amount; + } else { - if (type.equals("Hand")) { - // trying to discard an empty hand always work even with Tamiyo - if (payer.getZone(ZoneType.Hand).isEmpty()) { - return true; - } - return payer.canDiscardBy(ability, effect); - // this will always work + boolean sameName = false; + if (type.contains("+WithSameName")) { + sameName = true; + type = TextUtil.fastReplace(type, "+WithSameName", ""); } - else if (type.equals("LastDrawn")) { - final Card c = payer.getLastDrawnCard(); - return handList.contains(c); + if (!type.equals("Random") && !type.contains("X")) { + // Knollspine Invocation fails to activate without the above conditional + handList = CardLists.getValidCards(handList, type.split(";"), payer, source, ability); } - else if (type.equals("DifferentNames")) { - Set cardNames = Sets.newHashSet(); - for (Card c : handList) { - cardNames.add(c.getName()); - } - return cardNames.size() >= amount; - } - else { - boolean sameName = false; - if (type.contains("+WithSameName")) { - sameName = true; - type = TextUtil.fastReplace(type, "+WithSameName", ""); - } - if (!type.equals("Random") && !type.contains("X")) { - // Knollspine Invocation fails to activate without the above conditional - handList = CardLists.getValidCards(handList, type.split(";"), payer, source, ability); - } - if (sameName) { - for (Card c : handList) { - if (CardLists.filter(handList, CardPredicates.nameEquals(c.getName())).size() > 1) { - return true; - } - } - return false; - } - int adjustment = 0; - if (source.isInZone(ZoneType.Hand) && payer.equals(source.getOwner())) { - // If this card is in my hand, I can't use it to pay for it's own cost - if (handList.contains(source)) { - adjustment = 1; + if (sameName) { + for (Card c : handList) { + if (CardLists.filter(handList, CardPredicates.nameEquals(c.getName())).size() > 1) { + return true; } } + return false; + } + int adjustment = 0; + if (source.isInZone(ZoneType.Hand) && payer.equals(source.getOwner())) { + // If this card is in my hand, I can't use it to pay for it's own cost + if (handList.contains(source)) { + adjustment = 1; + } + } - if (amount > handList.size() - adjustment) { - // not enough cards in hand to pay - return false; - } + if (amount > handList.size() - adjustment) { + // not enough cards in hand to pay + return false; } } return true; diff --git a/forge-game/src/main/java/forge/game/cost/CostPartMana.java b/forge-game/src/main/java/forge/game/cost/CostPartMana.java index 63bdcc50314..a264d889bcf 100644 --- a/forge-game/src/main/java/forge/game/cost/CostPartMana.java +++ b/forge-game/src/main/java/forge/game/cost/CostPartMana.java @@ -148,13 +148,12 @@ public class CostPartMana extends CostPart { int timesToPay = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getSVar("NumTimes"), sa); if (timesToPay == 0) { return null; - } else { - ManaCostBeingPaid totalMana = new ManaCostBeingPaid(getManaToPay()); - for (int i = 1; i < timesToPay; i++) { - totalMana.addManaCost(getManaToPay()); - } - return totalMana.toManaCost(); } + ManaCostBeingPaid totalMana = new ManaCostBeingPaid(getManaToPay()); + for (int i = 1; i < timesToPay; i++) { + totalMana.addManaCost(getManaToPay()); + } + return totalMana.toManaCost(); } return getManaToPay(); } diff --git a/forge-game/src/main/java/forge/game/replacement/ReplacementHandler.java b/forge-game/src/main/java/forge/game/replacement/ReplacementHandler.java index 3f0a0e2c32a..084780f1eec 100644 --- a/forge-game/src/main/java/forge/game/replacement/ReplacementHandler.java +++ b/forge-game/src/main/java/forge/game/replacement/ReplacementHandler.java @@ -434,8 +434,8 @@ public class ReplacementHandler { private void getPossibleReplaceDamageList(PlayerCollection players, final boolean isCombat, final CardDamageMap damageMap, final SpellAbility cause) { for (Map.Entry> et : damageMap.columnMap().entrySet()) { final GameEntity target = et.getKey(); - int playerIndex = (target instanceof Player ? players.indexOf(((Player) target)) : - players.indexOf(((Card) target).getController())); + int playerIndex = target instanceof Player ? players.indexOf(((Player) target)) : + players.indexOf(((Card) target).getController()); if (playerIndex == -1) continue; Map>> replaceCandidateMap = replaceDamageList.get(playerIndex); for (Map.Entry e : et.getValue().entrySet()) { @@ -501,8 +501,8 @@ public class ReplacementHandler { Map>> newReplaceCandidateMap = replaceCandidateMap; if (!target.equals(newTarget)) { PlayerCollection players = game.getPlayersInTurnOrder(); - int playerIndex = (newTarget instanceof Player ? players.indexOf(((Player) newTarget)) : - players.indexOf(((Card) newTarget).getController())); + int playerIndex = newTarget instanceof Player ? players.indexOf(((Player) newTarget)) : + players.indexOf(((Card) newTarget).getController()); newReplaceCandidateMap = replaceDamageList.get(playerIndex); } diff --git a/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java b/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java index 71d52415e7d..adba36da9f6 100644 --- a/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java +++ b/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java @@ -386,9 +386,8 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont .hasKeyword("You may have CARDNAME assign its combat damage as though it weren't blocked.")) { return InputConfirm.confirm(this, CardView.get(attacker), localizer.getMessage("lblAssignCombatDamageWerentBlocked")); - } else { - return false; } + return false; } @Override