diff --git a/src/forge/CombatUtil.java b/src/forge/CombatUtil.java index f71e7212d0e..0ee96d5f3e8 100644 --- a/src/forge/CombatUtil.java +++ b/src/forge/CombatUtil.java @@ -2622,7 +2622,7 @@ public class CombatUtil { Player phasingPlayer = c.getController(); // Finest Hour untaps the creature on the first combat phase - if ((GameActionUtil.countFinestHours(phasingPlayer)>0) && + if ((AllZoneUtil.getPlayerCardsInPlay(phasingPlayer, "Finest Hour").size() > 0) && AllZone.Phase.isFirstCombat()) { // Untap the attacking creature Ability fhUntap = new Ability(c, "0") { @@ -2634,7 +2634,7 @@ public class CombatUtil { AllZone.Stack.add(fhUntap); // If any Finest Hours, queue up a new combat phase - for (int ix = 0; ix < GameActionUtil.countFinestHours(phasingPlayer); ix++) { + for (int ix = 0; ix < AllZoneUtil.getPlayerCardsInPlay(phasingPlayer, "Finest Hour").size(); ix++) { Ability fhAddCombat = new Ability(c, "0") { public void resolve() { AllZone.Phase.addExtraCombat(crd.getController()); @@ -2644,7 +2644,7 @@ public class CombatUtil { AllZone.Stack.add(fhAddCombat); } } - if(GameActionUtil.isRafiqInPlay(phasingPlayer)) { + if(AllZoneUtil.isCardInPlay("Rafiq of the Many", phasingPlayer)) { Ability ability2 = new Ability(c, "0") { @Override public void resolve() { diff --git a/src/forge/ComputerUtil_Attack2.java b/src/forge/ComputerUtil_Attack2.java index d638d845990..1cc861560ba 100644 --- a/src/forge/ComputerUtil_Attack2.java +++ b/src/forge/ComputerUtil_Attack2.java @@ -102,7 +102,7 @@ import java.util.*; // it won't be surprised by Exalted int humanExaltedBonus = countExaltedBonus(AllZone.HumanPlayer); if (humanExaltedBonus > 0) { - int nFinestHours = GameActionUtil.countFinestHours(AllZone.HumanPlayer); + int nFinestHours = AllZoneUtil.getPlayerCardsInPlay(AllZone.HumanPlayer, "Finest Hour").size(); if ( (blockersNeeded == 0 || nFinestHours > 0) && humanList.size() > 0) { // @@ -112,7 +112,7 @@ import java.util.*; // For Finest Hour, one creature could attack and get the bonus TWICE humanBaseAttack = humanBaseAttack + humanExaltedBonus; } - int totalExaltedAttack = GameActionUtil.isRafiqInPlay(AllZone.HumanPlayer) ? + int totalExaltedAttack = AllZoneUtil.isCardInPlay("Rafiq of the Many", AllZone.HumanPlayer) ? 2 * humanBaseAttack: humanBaseAttack; if ((AllZone.ComputerPlayer.getLife() - 3) <= totalExaltedAttack) { // We will lose if there is an Exalted attack -- keep one blocker @@ -180,9 +180,9 @@ import java.util.*; } if (combat.getAttackers().length == 0 && (countExaltedBonus(AllZone.ComputerPlayer) >= 3 || - GameActionUtil.isRafiqInPlay(AllZone.ComputerPlayer) || + AllZoneUtil.isCardInPlay("Rafiq of the Many", AllZone.ComputerPlayer) || AllZoneUtil.getPlayerCardsInPlay(AllZone.ComputerPlayer, "Battlegrace Angel").size() >= 2 || - (GameActionUtil.countFinestHours(AllZone.ComputerPlayer)>=1) && AllZone.Phase.isFirstCombat()) + (AllZoneUtil.getPlayerCardsInPlay(AllZone.ComputerPlayer, "Finest Hour").size()>=1) && AllZone.Phase.isFirstCombat()) && !doAssault()) { int biggest = 0; diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 4224f43a306..2e273cad01e 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -3918,32 +3918,6 @@ public class GameActionUtil { AllZone.GameInfo.setAssignedFirstStrikeDamageThisCombat(false); AllZone.GameInfo.setResolvedFirstStrikeDamageThisCombat(false); } - - public static boolean isRafiqInPlay(Player player) { - PlayerZone playerZone = AllZone.getZone(Constant.Zone.Play, player); - - CardList cards = new CardList(); - cards.addAll(playerZone.getCards()); - - cards = cards.getName("Rafiq of the Many"); - - if(cards.size() >= 1) // should only be 1, since Rafiq is Legendary - return true; - else return false; - - } - - public static int countFinestHours(Player controller) { - PlayerZone playerZone = AllZone.getZone(Constant.Zone.Play, controller); - - CardList cards = new CardList(); - cards.addAll(playerZone.getCards()); - - cards = cards.getName("Finest Hour"); - - return cards.size(); - } - public static void executeAllyEffects(Card c) { if(c.getName().equals("Kazandu Blademaster") || c.getName().equals("Makindi Shieldmate")