* facedown cards in new GUI wont show card name nor it's casting cost

* bugfix array length
This commit is contained in:
jendave
2011-08-06 05:56:08 +00:00
parent 325e8c7986
commit b945c24d67
2 changed files with 9 additions and 3 deletions

View File

@@ -274,7 +274,14 @@ public class CardPanel extends JPanel implements CardContainer{
}
public void setText(Card card) {
if (card == null || !Gui_NewGame.cardOverlay.isSelected()) return;
if(card.isFaceDown()){
titleText.setText("");
showCastingCost = false;
}
else {
titleText.setText(card.getName());
showCastingCost = true;
}
if (card.isCreature() && card.isPlaneswalker()) {
ptText.setText(card.getNetAttack() + "/" + card.getNetDefense() + " (" + String.valueOf(card.getCounters(Counters.LOYALTY)) + ")");
@@ -300,7 +307,6 @@ public class CardPanel extends JPanel implements CardContainer{
- i.top - i.bottom);
if(gameCard != null && Gui_NewGame.cardOverlay.isSelected()){
setText(gameCard);
showCastingCost = true;
}
setImage(image, image);

View File

@@ -164,7 +164,7 @@ public class ComputerAI_General implements Computer {
}//BuffedBy
CardList antibuffed = new CardList(AllZone.Human_Play.getCards()); //get all cards the computer controls with AntiBuffedBy
for(int k = 0; k < buffed.size(); k++) {
for(int k = 0; k < antibuffed.size(); k++) {
Card buffedcard = antibuffed.get(k);
if (buffedcard.getSVar("AntiBuffedBy").length() > 0) {
String buffedby = buffedcard.getSVar("AntiBuffedBy");