Implement Dungeon mechanism and related spoiled cards

This commit is contained in:
Lyu Zong-Hong
2021-06-26 18:29:14 +09:00
parent 9eabe65496
commit be40fce2c6
31 changed files with 482 additions and 28 deletions

View File

@@ -126,7 +126,7 @@ public class CardDetailUtil {
public static String getCurrentColors(final CardStateView c) {
ColorSet curColors = c.getColors();
String strCurColors = "";
String strCurColors = "";
if (curColors.hasWhite()) { strCurColors += "{W}"; }
if (curColors.hasBlue()) { strCurColors += "{U}"; }
@@ -140,7 +140,7 @@ public class CardDetailUtil {
return strCurColors;
}
public static DetailColors getRarityColor(final CardRarity rarity) {
switch (rarity) {
case Uncommon:
@@ -251,7 +251,7 @@ public class CardDetailUtil {
origIdent = origCard != null ? getCurrentColors(origCard.isFaceDown() ? CardView.get(origCard).getState(false) : CardView.get(origCard).getCurrentState()) : "";
} catch(Exception ex) {
System.err.println("Unexpected behavior: card " + card.getName() + "[" + card.getId() + "] tripped an exception when trying to process current card colors.");
}
}
isChanged = !curColors.equals(origIdent);
}
@@ -477,6 +477,15 @@ public class CardDetailUtil {
area.append(")");
}
// dungeon room
if (card.getCurrentRoom() != null && !card.getCurrentRoom().isEmpty()) {
if (area.length() != 0) {
area.append("\n");
}
area.append("(In room: ");
area.append(card.getCurrentRoom()).append(")");
}
// a card has something attached to it
if (card.hasCardAttachments()) {
if (area.length() != 0) {