mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 02:52:02 -08:00
Cascade and other "cast spell without paying" abilities - added card popup support for casting card (closes #11355)
This commit is contained in:
parent
1dc040a2c9
commit
6e3fe7ec46
3 changed files with 4 additions and 7 deletions
|
|
@ -62,7 +62,6 @@ public class MageTextArea extends MageEditorPane {
|
||||||
|
|
||||||
SwingUtilities.invokeLater(() -> {
|
SwingUtilities.invokeLater(() -> {
|
||||||
String promptText = buffer.toString();
|
String promptText = buffer.toString();
|
||||||
System.out.println(promptText);
|
|
||||||
MageTextArea.super.setText(promptText);
|
MageTextArea.super.setText(promptText);
|
||||||
// in case the text don't fit in the panel a tooltip with the text is added
|
// 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) {
|
if (panelWidth > 0 && MageTextArea.this.getPreferredSize().getWidth() > panelWidth) {
|
||||||
|
|
|
||||||
|
|
@ -101,10 +101,9 @@ class AnrakyrTheTravellerEffect extends OneShotEffect {
|
||||||
List<Card> partsToCast = cardMap.get(cardToCast.getId());
|
List<Card> partsToCast = cardMap.get(cardToCast.getId());
|
||||||
String partsInfo = partsToCast
|
String partsInfo = partsToCast
|
||||||
.stream()
|
.stream()
|
||||||
.map(MageObject::getIdName)
|
.map(MageObject::getLogName)
|
||||||
.collect(Collectors.joining(" or "));
|
.collect(Collectors.joining(" or "));
|
||||||
if (cardToCast == null
|
if (partsToCast.size() < 1
|
||||||
|| partsToCast.size() < 1
|
|
||||||
|| !player.chooseUse(
|
|| !player.chooseUse(
|
||||||
Outcome.PlayForFree, "Cast spell by paying life equal to its mana value rather than paying its mana cost (" + partsInfo + ")?", source, game
|
Outcome.PlayForFree, "Cast spell by paying life equal to its mana value rather than paying its mana cost (" + partsInfo + ")?", source, game
|
||||||
)) {
|
)) {
|
||||||
|
|
|
||||||
|
|
@ -1377,10 +1377,9 @@ public final class CardUtil {
|
||||||
List<Card> partsToCast = cardMap.get(cardToCast.getId());
|
List<Card> partsToCast = cardMap.get(cardToCast.getId());
|
||||||
String partsInfo = partsToCast
|
String partsInfo = partsToCast
|
||||||
.stream()
|
.stream()
|
||||||
.map(MageObject::getIdName)
|
.map(MageObject::getLogName)
|
||||||
.collect(Collectors.joining(" or "));
|
.collect(Collectors.joining(" or "));
|
||||||
if (cardToCast == null
|
if (partsToCast.size() < 1
|
||||||
|| partsToCast.size() < 1
|
|
||||||
|| !player.chooseUse(
|
|| !player.chooseUse(
|
||||||
Outcome.PlayForFree, "Cast spell without paying its mana cost (" + partsInfo + ")?", source, game
|
Outcome.PlayForFree, "Cast spell without paying its mana cost (" + partsInfo + ")?", source, game
|
||||||
)) {
|
)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue