Skip to content

Commit

Permalink
Cascade and other "cast spell without paying" abilities - added card …
Browse files Browse the repository at this point in the history
…popup support for casting card (closes #11355)
  • Loading branch information
JayDi85 committed Nov 26, 2023
1 parent 1dc040a commit 6e3fe7e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public void setText(String text, final int panelWidth) {

SwingUtilities.invokeLater(() -> {
String promptText = buffer.toString();
System.out.println(promptText);
MageTextArea.super.setText(promptText);
// in case the text don't fit in the panel a tooltip with the text is added
if (panelWidth > 0 && MageTextArea.this.getPreferredSize().getWidth() > panelWidth) {
Expand Down
5 changes: 2 additions & 3 deletions Mage.Sets/src/mage/cards/a/AnrakyrTheTraveller.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,9 @@ public boolean apply(Game game, Ability source) {
List<Card> partsToCast = cardMap.get(cardToCast.getId());
String partsInfo = partsToCast
.stream()
.map(MageObject::getIdName)
.map(MageObject::getLogName)
.collect(Collectors.joining(" or "));
if (cardToCast == null
|| partsToCast.size() < 1
if (partsToCast.size() < 1
|| !player.chooseUse(
Outcome.PlayForFree, "Cast spell by paying life equal to its mana value rather than paying its mana cost (" + partsInfo + ")?", source, game
)) {
Expand Down
5 changes: 2 additions & 3 deletions Mage/src/main/java/mage/util/CardUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -1377,10 +1377,9 @@ public static boolean castSpellWithAttributesForFree(Player player, Ability sour
List<Card> partsToCast = cardMap.get(cardToCast.getId());
String partsInfo = partsToCast
.stream()
.map(MageObject::getIdName)
.map(MageObject::getLogName)
.collect(Collectors.joining(" or "));
if (cardToCast == null
|| partsToCast.size() < 1
if (partsToCast.size() < 1
|| !player.chooseUse(
Outcome.PlayForFree, "Cast spell without paying its mana cost (" + partsInfo + ")?", source, game
)) {
Expand Down

0 comments on commit 6e3fe7e

Please sign in to comment.