Skip to content

Commit

Permalink
fix: BobsBuddy too agressively treating cards as unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
azeier committed Feb 6, 2025
1 parent e51699a commit 15a1a47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Hearthstone Deck Tracker/BobsBuddy/BobsBuddyInvoker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ bool friendly
throw new ArgumentException(friendly ? "Player" : "Opponent" + " Entity could not be found. Exiting.");
}

if(gamePlayer.Board.Any(x => !x.Card.IsKnownCard))
if(gamePlayer.Board.Any(x => !x.Card.IsKnownCard && !string.IsNullOrWhiteSpace(x.CardId)))
{
ErrorState = BobsBuddyErrorState.UnknownCards;
throw new ArgumentException("Board has unknown cards. Exiting.");
Expand Down
2 changes: 1 addition & 1 deletion Hearthstone Deck Tracker/Hearthstone/Entities/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public string? CardId
public bool IsObjective => HasTag(GameTag.OBJECTIVE);

[JsonIgnore]
public Card Card => _cachedCard ??= new Card(CardId ?? "unknown");
public Card Card => _cachedCard ??= new Card(CardId ?? "");

[JsonIgnore]
public int Attack => GetTag(GameTag.ATK);
Expand Down

0 comments on commit 15a1a47

Please sign in to comment.