Skip to content

Commit

Permalink
fix created cards being considered for deck detection (HearthSim#1815)
Browse files Browse the repository at this point in the history
revert 20d89f3
  • Loading branch information
Alexander Zeier committed Dec 8, 2015
1 parent 9123c84 commit 69b163d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Hearthstone Deck Tracker/Hearthstone/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public void Draw(Entity entity, int turn)
else
ce.Reset();

if(!string.IsNullOrEmpty(entity.CardId) && ce.CardMark != CardMark.Created && ce.CardMark != CardMark.Returned)
if(!string.IsNullOrEmpty(entity.CardId) && ce.CardMark != CardMark.Created && ce.CardMark != CardMark.Returned && !ce.Created)
{
if(IsLocalPlayer && !CardMatchesActiveDeck(entity.CardId))
DrawnCardsMatchDeck = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ public void TagChange(IHsGameState gameState, string rawTag, int id, string rawV
gameState.GameHandler.HandleOpponentStolen(game.Entities[id], cardId, gameState.GetTurnNumber());
gameState.ProposeKeyPoint(KeyPointType.SecretStolen, id, ActivePlayer.Player);
}
else if (game.Entities[id].IsInZone(TAG_ZONE.PLAY) || game.Entities[id].IsInZone(TAG_ZONE.DECK))
else if (game.Entities[id].IsInZone(TAG_ZONE.PLAY))
gameState.GameHandler.HandleOpponentStolen(game.Entities[id], cardId, gameState.GetTurnNumber());
}
else if (value == game.Opponent.Id)
Expand All @@ -507,7 +507,7 @@ public void TagChange(IHsGameState gameState, string rawTag, int id, string rawV
gameState.GameHandler.HandleOpponentStolen(game.Entities[id], cardId, gameState.GetTurnNumber());
gameState.ProposeKeyPoint(KeyPointType.SecretStolen, id, ActivePlayer.Player);
}
else if (game.Entities[id].IsInZone(TAG_ZONE.PLAY) || game.Entities[id].IsInZone(TAG_ZONE.DECK))
else if (game.Entities[id].IsInZone(TAG_ZONE.PLAY))
gameState.GameHandler.HandlePlayerStolen(game.Entities[id], cardId, gameState.GetTurnNumber());
}
}
Expand Down

0 comments on commit 69b163d

Please sign in to comment.