mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Planeswalkers Loyalty will now be shown in the P/T label in CardDetailPanel. If a Planeswalker also has P/T both will be shown.
This commit is contained in:
@@ -2,7 +2,7 @@ Name:Restrain
|
||||
ManaCost:2 W
|
||||
Types:Instant
|
||||
A:SP$ Pump | Cost$ 2 W | ValidTgts$ Creature.attacking | TgtPrompt$ Select target attacking creature | KW$ HIDDEN Prevent all combat damage that would be dealt by CARDNAME. | IsCurse$ True | SubAbility$ DBDraw | SpellDescription$ Prevent all combat damage that would be dealt by target attacking creature this turn. Draw a card.
|
||||
SVar:DBDraw:DB$Draw | NumCards$ 1 | SpellDescription$ Draw a card.
|
||||
SVar:DBDraw:DB$Draw | NumCards$ 1
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/restrain.jpg
|
||||
Oracle:Prevent all combat damage that would be dealt by target attacking creature this turn.\nDraw a card.
|
||||
SetInfo:INV Common
|
||||
@@ -273,10 +273,28 @@ public class CardDetailPanel extends FPanel {
|
||||
this.typeLabel.setText("Creature");
|
||||
}
|
||||
|
||||
StringBuilder ptText = new StringBuilder();
|
||||
if (card.isCreature()) {
|
||||
this.powerToughnessLabel.setText(card.getNetAttack() + " / " + card.getNetDefense());
|
||||
ptText.append(card.getNetAttack()).append(" / ").append(card.getNetDefense());
|
||||
}
|
||||
|
||||
if (card.isPlaneswalker()) {
|
||||
if (ptText.length() > 0) {
|
||||
ptText.insert(0, "P/T: ");
|
||||
ptText.append(" - ").append("Loy: ");
|
||||
} else {
|
||||
ptText.append("Loyalty: ");
|
||||
}
|
||||
|
||||
int loyalty = card.getCounters(CounterType.LOYALTY);
|
||||
if (loyalty == 0) {
|
||||
loyalty = card.getBaseLoyalty();
|
||||
}
|
||||
ptText.append(loyalty);
|
||||
}
|
||||
|
||||
this.powerToughnessLabel.setText(ptText.toString());
|
||||
|
||||
this.idLabel.setText("Card ID " + card.getUniqueNumber());
|
||||
|
||||
// fill the card text
|
||||
|
||||
Reference in New Issue
Block a user