Pack logic cleanup

This commit is contained in:
gamer147
2026-05-24 09:27:10 -04:00
parent 79209bd70b
commit d9ef9fe1fc
33 changed files with 71175 additions and 245 deletions

View File

@@ -84,6 +84,8 @@ public class CardImporter
DustReward = ParseInt(c.GetRedEther, 0)
};
bool isFoil = c.IsFoil == "1";
if (existingCards.TryGetValue(id, out var card))
{
card.Rarity = (Rarity)rarity;
@@ -92,6 +94,7 @@ public class CardImporter
card.Defense = ParseNullableInt(c.Life);
card.Class = classEntry;
card.CollectionInfo = collection;
card.IsFoil = isFoil;
updated++;
}
else
@@ -105,7 +108,8 @@ public class CardImporter
Attack = ParseNullableInt(c.Atk),
Defense = ParseNullableInt(c.Life),
Class = classEntry,
CollectionInfo = collection
CollectionInfo = collection,
IsFoil = isFoil
};
set.Cards.Add(card);
existingCards[id] = card;
@@ -145,4 +149,5 @@ public class CardInput
public string? Rarity { get; set; }
public string? GetRedEther { get; set; }
public string? UseRedEther { get; set; }
public string? IsFoil { get; set; } // cards.json `is_foil` = "0" or "1"
}