mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
works somehow - only the second game starts properly
This commit is contained in:
@@ -385,8 +385,7 @@ public class CardReader implements Runnable {
|
||||
* @param mapToFill is used to eliminate duplicates
|
||||
* @return the card
|
||||
*/
|
||||
public static Card readCard(final Iterable<String> lines, final CardRulesReader rulesReader,
|
||||
final Map<String, Card> mapToFill) {
|
||||
public static Card readCard(final Iterable<String> lines, final CardRulesReader rulesReader, final Map<String, Card> mapToFill) {
|
||||
final Card card = new Card();
|
||||
boolean ignoreTheRest = false;
|
||||
|
||||
|
||||
@@ -96,10 +96,7 @@ public class QuestUtil {
|
||||
if (pet != null) {
|
||||
Card c = pet.getPetCard(qc.getAssets());
|
||||
if ( c != null ){
|
||||
Card petCard = AbstractCardFactory.getCard2(c, AllZone.getHumanPlayer());
|
||||
petCard.addController(AllZone.getHumanPlayer());
|
||||
petCard.setToken(true);
|
||||
// list.add(petCard);
|
||||
list.add(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,29 +27,21 @@ public class QuestPetStats {
|
||||
|
||||
@XStreamAsAttribute()
|
||||
@XStreamAlias(value = "pic")
|
||||
private final String picture;
|
||||
private String picture;
|
||||
|
||||
@XStreamAsAttribute()
|
||||
private final String stats;
|
||||
private String stats;
|
||||
|
||||
@XStreamAsAttribute()
|
||||
private final String cardFile;
|
||||
private String cardFile;
|
||||
|
||||
@XStreamAsAttribute()
|
||||
private int cost;
|
||||
|
||||
@XStreamAsAttribute()
|
||||
private final String nextLevel;
|
||||
private String nextLevel;
|
||||
|
||||
private transient Card petCard;
|
||||
|
||||
public QuestPetStats()
|
||||
{
|
||||
picture = null;
|
||||
stats = null;
|
||||
cardFile = null;
|
||||
nextLevel = null;
|
||||
}
|
||||
private QuestPetStats() { }
|
||||
|
||||
public final int getLevelValue() {
|
||||
return levelValue;
|
||||
@@ -64,13 +56,13 @@ public class QuestPetStats {
|
||||
}
|
||||
|
||||
public final Card getCard() {
|
||||
if ( petCard == null ) {
|
||||
List<String> cardLines = FileUtil.readFile(new File(ForgeProps.getFile(NewConstants.Quest.BAZAAR_DIR), cardFile));
|
||||
petCard = CardReader.readCard(cardLines);
|
||||
petCard.setImageFilename(picture);
|
||||
petCard.setToken(true);
|
||||
petCard.setOwner(AllZone.getHumanPlayer());
|
||||
}
|
||||
List<String> cardLines = FileUtil.readFile(new File(ForgeProps.getFile(NewConstants.Quest.BAZAAR_DIR), cardFile));
|
||||
Card petCard = CardReader.readCard(cardLines);
|
||||
petCard.setImageFilename(picture.replace('_', ' '));
|
||||
petCard.setToken(true);
|
||||
petCard.addController(AllZone.getHumanPlayer());
|
||||
petCard.setOwner(AllZone.getHumanPlayer());
|
||||
petCard.setSickness(true);
|
||||
return petCard;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user