mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- StringBuilder.
This commit is contained in:
@@ -84,7 +84,9 @@ public class ComputerUtil {
|
|||||||
}
|
}
|
||||||
cost.setNoManaCostChange(true);
|
cost.setNoManaCostChange(true);
|
||||||
newSA.setManaCost("0");
|
newSA.setManaCost("0");
|
||||||
newSA.setDescription(sa.getDescription() + " (without paying its mana cost)");
|
final StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(sa.getDescription()).append(" (without paying its mana cost)");
|
||||||
|
newSA.setDescription(sb.toString());
|
||||||
if (ComputerUtil.canBePlayedAndPayedByAI(newSA)) {
|
if (ComputerUtil.canBePlayedAndPayedByAI(newSA)) {
|
||||||
ComputerUtil.handlePlayingSpellAbility(newSA);
|
ComputerUtil.handlePlayingSpellAbility(newSA);
|
||||||
|
|
||||||
@@ -528,8 +530,10 @@ public class ComputerUtil {
|
|||||||
*/
|
*/
|
||||||
public static boolean canPayAdditionalCosts(final SpellAbility sa, final Player player) {
|
public static boolean canPayAdditionalCosts(final SpellAbility sa, final Player player) {
|
||||||
if (sa.getActivatingPlayer() == null) {
|
if (sa.getActivatingPlayer() == null) {
|
||||||
System.out.println(sa.getSourceCard()
|
final StringBuilder sb = new StringBuilder();
|
||||||
+ " in ComputerUtil.canPayAdditionalCosts() without an activating player");
|
sb.append(sa.getSourceCard());
|
||||||
|
sb.append(" in ComputerUtil.canPayAdditionalCosts() without an activating player");
|
||||||
|
System.out.println(sb.toString());
|
||||||
sa.setActivatingPlayer(player);
|
sa.setActivatingPlayer(player);
|
||||||
}
|
}
|
||||||
return CostPayment.canPayAdditionalCosts(sa.getPayCosts(), sa);
|
return CostPayment.canPayAdditionalCosts(sa.getPayCosts(), sa);
|
||||||
@@ -684,8 +688,10 @@ public class ComputerUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sourceCard.getName().equals("Rainbow Vale")) {
|
if (sourceCard.getName().equals("Rainbow Vale")) {
|
||||||
sourceCard.addExtrinsicKeyword("An opponent gains control of CARDNAME "
|
final StringBuilder sb = new StringBuilder();
|
||||||
+ "at the beginning of the next end step.");
|
sb.append("An opponent gains control of CARDNAME ");
|
||||||
|
sb.append("at the beginning of the next end step.");
|
||||||
|
sourceCard.addExtrinsicKeyword(sb.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// System.out.println("just subtracted " +
|
// System.out.println("just subtracted " +
|
||||||
@@ -721,8 +727,10 @@ public class ComputerUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!test) {
|
if (!test) {
|
||||||
throw new RuntimeException("ComputerUtil : payManaCost() cost was not paid for "
|
final StringBuilder sb = new StringBuilder();
|
||||||
+ sa.getSourceCard().getName());
|
sb.append("ComputerUtil : payManaCost() cost was not paid for ");
|
||||||
|
sb.append(sa.getSourceCard().getName());
|
||||||
|
throw new RuntimeException(sb.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user