mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
fixed CardDetailUtil: currently if more equips are attached to one creature, it only shows the first name, because of the (nr) in the name it does think of it as reminder text.
FSkin: make the pattern not-greedy so it only does hide the number from it.
This commit is contained in:
@@ -976,9 +976,9 @@ public class FSkin {
|
||||
|
||||
if (formatReminderText) {
|
||||
//format reminder text in italics (or hide if preference set)
|
||||
pattern = "\\((.+)\\)";
|
||||
pattern = " \\((.+?)\\)";
|
||||
replacement = FModel.getPreferences().getPrefBoolean(FPref.UI_HIDE_REMINDER_TEXT) ?
|
||||
"" : "<i>\\($1\\)</i>";
|
||||
"" : " <i>\\($1\\)</i>";
|
||||
str = str.replaceAll(pattern, replacement);
|
||||
}
|
||||
|
||||
|
||||
@@ -422,12 +422,7 @@ public class CardDetailUtil {
|
||||
area.append("\n");
|
||||
}
|
||||
area.append("=Equipped by ");
|
||||
for (final Iterator<CardView> it = card.getEquippedBy().iterator(); it.hasNext();) {
|
||||
area.append(it.next());
|
||||
if (it.hasNext()) {
|
||||
area.append(", ");
|
||||
}
|
||||
}
|
||||
area.append(StringUtils.join(card.getEquippedBy(), ", "));
|
||||
area.append("=");
|
||||
}
|
||||
|
||||
@@ -451,12 +446,7 @@ public class CardDetailUtil {
|
||||
area.append("\n");
|
||||
}
|
||||
area.append("*Enchanted by ");
|
||||
for (final Iterator<CardView> it = card.getEnchantedBy().iterator(); it.hasNext();) {
|
||||
area.append(it.next());
|
||||
if (it.hasNext()) {
|
||||
area.append(", ");
|
||||
}
|
||||
}
|
||||
area.append(StringUtils.join(card.getEnchantedBy(), ", "));
|
||||
area.append("*");
|
||||
}
|
||||
|
||||
@@ -466,12 +456,7 @@ public class CardDetailUtil {
|
||||
area.append("\n");
|
||||
}
|
||||
area.append("+Controlling: ");
|
||||
for (final Iterator<CardView> it = card.getGainControlTargets().iterator(); it.hasNext();) {
|
||||
area.append(it.next());
|
||||
if (it.hasNext()) {
|
||||
area.append(", ");
|
||||
}
|
||||
}
|
||||
area.append(StringUtils.join(card.getGainControlTargets(), ", "));
|
||||
area.append("+");
|
||||
}
|
||||
|
||||
@@ -491,12 +476,7 @@ public class CardDetailUtil {
|
||||
area.append("\n");
|
||||
}
|
||||
area.append("Imprinting: ");
|
||||
for (final Iterator<CardView> it = card.getImprintedCards().iterator(); it.hasNext();) {
|
||||
area.append(it.next());
|
||||
if (it.hasNext()) {
|
||||
area.append(", ");
|
||||
}
|
||||
}
|
||||
area.append(StringUtils.join(card.getImprintedCards(), ", "));
|
||||
}
|
||||
|
||||
// Haunt
|
||||
@@ -505,12 +485,7 @@ public class CardDetailUtil {
|
||||
area.append("\n");
|
||||
}
|
||||
area.append("Haunted by: ");
|
||||
for (final Iterator<CardView> it = card.getHauntedBy().iterator(); it.hasNext();) {
|
||||
area.append(it.next());
|
||||
if (it.hasNext()) {
|
||||
area.append(", ");
|
||||
}
|
||||
}
|
||||
area.append(StringUtils.join(card.getHauntedBy(), ", "));
|
||||
}
|
||||
if (card.getHaunting() != null) {
|
||||
if (area.length() != 0) {
|
||||
|
||||
Reference in New Issue
Block a user