Basic card cleanup

This commit is contained in:
gamer147
2026-05-25 16:55:57 -04:00
parent 016efeea2c
commit a33bfad3bc
3 changed files with 12 additions and 7 deletions

View File

@@ -15,9 +15,14 @@ public class CardRepository : BaseRepository<ShadowverseCardEntry>, ICardReposit
return cards;
}
public async Task<List<ShadowverseCardEntry>> GetAllBasic()
public async Task<List<ShadowverseCardEntry>> GetDefaultCards()
{
return await DbContext.Set<ShadowverseCardSetEntry>().Where(set => set.IsBasic).SelectMany(set => set.Cards)
// The set of cards every viewer is treated as owning 3-of from the start: bronze,
// non-foil basics. Silver/gold basics and animated (foil) variants are earned
// through story rewards etc.
return await DbContext.Set<ShadowverseCardSetEntry>().Where(set => set.IsBasic)
.SelectMany(set => set.Cards)
.Where(card => card.Rarity == Enums.Rarity.Bronze && !card.IsFoil)
.ToListAsync();
}

View File

@@ -6,5 +6,5 @@ public interface ICardRepository
{
Task<List<ShadowverseCardEntry>> GetAll(bool onlyCollectible);
Task<List<ShadowverseCardSetEntry>> GetCardSets(bool onlyInRotation);
Task<List<ShadowverseCardEntry>> GetAllBasic();
Task<List<ShadowverseCardEntry>> GetDefaultCards();
}