mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
little polishing on QuestRewardCard classes
This commit is contained in:
@@ -16,7 +16,7 @@ import forge.item.InventoryItem;
|
|||||||
* TODO: Write javadoc for this type.
|
* TODO: Write javadoc for this type.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public abstract class QuestRewardCard implements InventoryItem {
|
public abstract class QuestRewardCard implements InventoryItem, IQuestRewardCard {
|
||||||
|
|
||||||
protected String buildDescription(final String [] input) {
|
protected String buildDescription(final String [] input) {
|
||||||
final String defaultDescription = "a card";
|
final String defaultDescription = "a card";
|
||||||
@@ -130,5 +130,7 @@ public abstract class QuestRewardCard implements InventoryItem {
|
|||||||
public String getImageFilename() {
|
public String getImageFilename() {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public abstract List<CardPrinted> getChoices();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -90,6 +90,7 @@ public class QuestRewardCardChooser extends QuestRewardCard implements Inventory
|
|||||||
*
|
*
|
||||||
* @return a List<CardPrinted> or null if could not create a list.
|
* @return a List<CardPrinted> or null if could not create a list.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public final List<CardPrinted> getChoices() {
|
public final List<CardPrinted> getChoices() {
|
||||||
if (type == poolType.playerCards) {
|
if (type == poolType.playerCards) {
|
||||||
final ItemPool<CardPrinted> playerCards = Singletons.getModel().getQuest().getAssets().getCardPool();
|
final ItemPool<CardPrinted> playerCards = Singletons.getModel().getQuest().getAssets().getCardPool();
|
||||||
|
|||||||
@@ -39,15 +39,6 @@ public class QuestRewardCardFiltered extends QuestRewardCard implements IQuestRe
|
|||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This class is a dynamic list of cards, hence no images.
|
|
||||||
*
|
|
||||||
* @return an empty string
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String getImageFilename() {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The item type.
|
* The item type.
|
||||||
@@ -64,6 +55,7 @@ public class QuestRewardCardFiltered extends QuestRewardCard implements IQuestRe
|
|||||||
*
|
*
|
||||||
* @return a List<CardPrinted> or null if could not create a list.
|
* @return a List<CardPrinted> or null if could not create a list.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public final List<CardPrinted> getChoices() {
|
public final List<CardPrinted> getChoices() {
|
||||||
List<CardPrinted> cardChoices = new ArrayList<CardPrinted>();
|
List<CardPrinted> cardChoices = new ArrayList<CardPrinted>();
|
||||||
for (final CardPrinted card : Iterables.filter(CardDb.instance().getAllCards(), predicates)) {
|
for (final CardPrinted card : Iterables.filter(CardDb.instance().getAllCards(), predicates)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user