Skip to content

Commit

Permalink
feat: fade out all minions from unavailable tiers
Browse files Browse the repository at this point in the history
  • Loading branch information
beheh committed Sep 5, 2023
1 parent 2e5a165 commit 560a458
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,18 @@ private void Update(int tier, IEnumerable<Race> availableRaces)
}
}

if(_bannedMinionCardIds.Count > 0)
if(!_availableTiers.Contains(tier))
{
// Fade out all minions from unavailable tiers
cards = cards.Select(x =>
{
var ret = (Hearthstone.Card)x.Clone();
ret.Count = 0;
return ret;
}).ToList();
}
else if(_bannedMinionCardIds.Count > 0) {
// Fade out banned minions
cards = cards.Select(x =>
{
if(_bannedMinionCardIds.Contains(x.Id))
Expand Down

0 comments on commit 560a458

Please sign in to comment.