mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
* facedown cards in new GUI wont show card name nor it's casting cost
* bugfix array length
This commit is contained in:
@@ -274,7 +274,14 @@ public class CardPanel extends JPanel implements CardContainer{
|
|||||||
}
|
}
|
||||||
public void setText(Card card) {
|
public void setText(Card card) {
|
||||||
if (card == null || !Gui_NewGame.cardOverlay.isSelected()) return;
|
if (card == null || !Gui_NewGame.cardOverlay.isSelected()) return;
|
||||||
titleText.setText(card.getName());
|
if(card.isFaceDown()){
|
||||||
|
titleText.setText("");
|
||||||
|
showCastingCost = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
titleText.setText(card.getName());
|
||||||
|
showCastingCost = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (card.isCreature() && card.isPlaneswalker()) {
|
if (card.isCreature() && card.isPlaneswalker()) {
|
||||||
ptText.setText(card.getNetAttack() + "/" + card.getNetDefense() + " (" + String.valueOf(card.getCounters(Counters.LOYALTY)) + ")");
|
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);
|
- i.top - i.bottom);
|
||||||
if(gameCard != null && Gui_NewGame.cardOverlay.isSelected()){
|
if(gameCard != null && Gui_NewGame.cardOverlay.isSelected()){
|
||||||
setText(gameCard);
|
setText(gameCard);
|
||||||
showCastingCost = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setImage(image, image);
|
setImage(image, image);
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class ComputerAI_General implements Computer {
|
|||||||
}//BuffedBy
|
}//BuffedBy
|
||||||
|
|
||||||
CardList antibuffed = new CardList(AllZone.Human_Play.getCards()); //get all cards the computer controls with AntiBuffedBy
|
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);
|
Card buffedcard = antibuffed.get(k);
|
||||||
if (buffedcard.getSVar("AntiBuffedBy").length() > 0) {
|
if (buffedcard.getSVar("AntiBuffedBy").length() > 0) {
|
||||||
String buffedby = buffedcard.getSVar("AntiBuffedBy");
|
String buffedby = buffedcard.getSVar("AntiBuffedBy");
|
||||||
|
|||||||
Reference in New Issue
Block a user