(final Card c, Player phase)
| 172 | } |
| 173 | |
| 174 | private static boolean optionalUntap(final Card c, Player phase) { |
| 175 | boolean untap = true; |
| 176 | |
| 177 | if (c.hasKeyword("You may choose not to untap CARDNAME during your untap step.")) { |
| 178 | StringBuilder prompt = new StringBuilder("Untap " + c.toString() + "?"); |
| 179 | boolean defaultChoice = true; |
| 180 | if (c.hasGainControlTarget()) { |
| 181 | final Iterable<Card> targets = c.getGainControlTargets(); |
| 182 | prompt.append("\r\n").append(c).append(" is controlling: "); |
| 183 | for (final Card target : targets) { |
| 184 | prompt.append(target); |
| 185 | if (target.isInPlay()) { |
| 186 | defaultChoice = false; |
| 187 | } |
| 188 | } |
| 189 | } |
| 190 | untap = c.getController().getController().chooseBinary(new SpellAbility.EmptySa(c, c.getController()), prompt.toString(), BinaryChoiceType.UntapOrLeaveTapped, defaultChoice); |
| 191 | } |
| 192 | if (untap && !c.untap(phase)) { |
| 193 | untap = false; |
| 194 | } |
| 195 | return untap; |
| 196 | } |
| 197 | |
| 198 | public static void doPhasing(final Player turn) { |
| 199 | Game game = turn.getGame(); |
no test coverage detected