mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
battle support
This commit is contained in:
@@ -184,7 +184,7 @@ public class FCardImageRenderer {
|
||||
if (!card.isSplitCard() && !card.isFlipCard()) {
|
||||
final CardStateView state = card.getState(card.isAdventureCard() ? false : altState);
|
||||
if ((state.isCreature() && !state.getKeywordKey().contains("Level up"))
|
||||
|| state.isPlaneswalker() || state.isVehicle())
|
||||
|| state.isPlaneswalker() || state.isBattle() || state.isVehicle())
|
||||
hasPTBox = true;
|
||||
}
|
||||
if (hasPTBox) {
|
||||
@@ -294,7 +294,7 @@ public class FCardImageRenderer {
|
||||
int headerHeight = NAME_SIZE + 2 * HEADER_PADDING;
|
||||
int typeBoxHeight = TYPE_SIZE + 2 * TYPE_PADDING;
|
||||
int ptBoxHeight = 0;
|
||||
if (state.isCreature() || state.isPlaneswalker() || state.isVehicle()) {
|
||||
if (state.isCreature() || state.isPlaneswalker() | state.isBattle() || state.isVehicle()) {
|
||||
//if P/T box needed, make room for it
|
||||
ptBoxHeight = headerHeight;
|
||||
}
|
||||
@@ -839,6 +839,12 @@ public class FCardImageRenderer {
|
||||
TEXT_COLOR = Color.WHITE;
|
||||
pieces.add(String.valueOf(state.getLoyalty()));
|
||||
}
|
||||
else if (state.isBattle()) {
|
||||
Color [] pwColor = { Color.BLACK };
|
||||
colors = pwColor;
|
||||
TEXT_COLOR = Color.WHITE;
|
||||
pieces.add(String.valueOf(state.getDefense()));
|
||||
}
|
||||
else if (state.isVehicle()) {
|
||||
Color [] vhColor = { new Color(128, 96, 64) };
|
||||
colors = vhColor;
|
||||
@@ -865,7 +871,7 @@ public class FCardImageRenderer {
|
||||
int arcWidth = h / 3;
|
||||
fillRoundColorBackground(g, colors, x, y, w, h, arcWidth, h);
|
||||
g.setStroke(new BasicStroke(BOX_LINE_THICKNESS));
|
||||
g.setColor(state.isPlaneswalker() ? Color.WHITE : Color.BLACK);
|
||||
g.setColor(state.isPlaneswalker() || state.isBattle() ? Color.WHITE : Color.BLACK);
|
||||
g.drawRoundRect(x, y, w, h, arcWidth, h);
|
||||
|
||||
x += (PT_BOX_WIDTH - totalPieceWidth) / 2;
|
||||
|
||||
Reference in New Issue
Block a user