mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Simplified the code found in forge.gui.game.cardDetailPanel and forge.AllZoneUtil.
This commit is contained in:
@@ -38,7 +38,7 @@ public class AllZoneUtil {
|
|||||||
CardList list = getCreaturesInPlay();
|
CardList list = getCreaturesInPlay();
|
||||||
list = list.filter(new CardListFilter() {
|
list = list.filter(new CardListFilter() {
|
||||||
public boolean addCard(Card c) {
|
public boolean addCard(Card c) {
|
||||||
return c.getKeyword().contains(keyword);
|
return c.hasKeyword(keyword);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
@@ -760,7 +760,7 @@ public class AllZoneUtil {
|
|||||||
public static CardListFilter getKeywordFilter(final String keyword) {
|
public static CardListFilter getKeywordFilter(final String keyword) {
|
||||||
CardListFilter filter = new CardListFilter() {
|
CardListFilter filter = new CardListFilter() {
|
||||||
public boolean addCard(Card c) {
|
public boolean addCard(Card c) {
|
||||||
return c.getKeyword().contains(keyword);
|
return c.hasKeyword(keyword);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return filter;
|
return filter;
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ public class CardDetailPanel extends JPanel implements CardContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//top revealed
|
//top revealed
|
||||||
if (card.getKeyword().contains("Play with the top card of your library revealed.")
|
if (card.hasKeyword("Play with the top card of your library revealed.")
|
||||||
&& !card.getTopCardName().equals(""))
|
&& !card.getTopCardName().equals(""))
|
||||||
{
|
{
|
||||||
area.append("\r\nTop card: ");
|
area.append("\r\nTop card: ");
|
||||||
|
|||||||
Reference in New Issue
Block a user