Changes to show name and number of counter on a card.

This commit is contained in:
LevelX2 2013-03-04 00:03:21 +01:00
parent cc96a55523
commit dc131fa8dd
5 changed files with 60 additions and 13 deletions

View file

@ -57,10 +57,12 @@ import javax.swing.text.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import static mage.constants.Constants.*;
import mage.view.CounterView;
/**
*
@ -243,7 +245,16 @@ public class Card extends MagePermanent implements MouseMotionListener, MouseLis
}
protected List<String> getRules() {
return card.getRules();
if (card.getCounters() != null) {
List<String> rules = new ArrayList<String>(card.getRules());
for (CounterView counter: card.getCounters()) {
rules.add(counter.getCount() + " x " + counter.getName());
}
return rules;
}
else {
return card.getRules();
}
}
protected String getType(CardView card) {

View file

@ -57,8 +57,7 @@ public class ExileZoneDialog extends MageDialog {
public void loadCards(ExileView exile, BigCard bigCard, UUID gameId) {
this.title = exile.getName();
this.setTitelBarToolTip(exile.getName());
boolean changed = false;
changed = cards.loadCards(exile, bigCard, gameId);
boolean changed = cards.loadCards(exile, bigCard, gameId, null);
if (exile.size() > 0) {
show();
if (changed) {