Skip to content

Commit

Permalink
Update bobsbuddyinvoker
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonysegal committed Nov 19, 2021
1 parent 184ff24 commit 8e2154f
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions Hearthstone Deck Tracker/BobsBuddy/BobsBuddyInvoker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ private void SnapshotBoardState(int turn)

input.SetHeroPower(HeroPowerUsed(playerHeroPower), HeroPowerUsed(opponentHeroPower));

input.SetupSecretsFromDbfidList(_game.Player.Secrets.Select(x => x.Card.DbfIf).ToList());
input.SetupSecretsFromDbfidList(_game.Player.Secrets.Select(x => x.Card.DbfIf).ToList(), true);

input.SetTurn(turn);

Expand Down Expand Up @@ -418,9 +418,8 @@ private IEnumerable<Entity> GetAttachedEntities(int entityId)
{
if(RunSimulationAfterCombat)
{
_input.SetupSecretsFromDbfidList(_currentOpponentSecrets.Where(x => x != null && !string.IsNullOrEmpty(x.CardId)).Select(x => x.Card.DbfIf).ToList());
_input.playerIsAkazamarak = false;
DebugLog($"Set opponent to Akazamarak with {_input.secretsAndPriorities.Count} secrets.");
_input.SetupSecretsFromDbfidList(_currentOpponentSecrets.Where(x => x != null && !string.IsNullOrEmpty(x.CardId)).Select(x => x.Card.DbfIf).ToList(), false);
DebugLog($"Set opponent to Akazamarak with {_input.OpponentSecrets.Count} secrets.");
}

DebugLog("----- Simulation Input -----");
Expand All @@ -432,11 +431,18 @@ private IEnumerable<Entity> GetAttachedEntities(int entityId)
foreach(var minion in _input.opponentSide)
DebugLog(minion.ToString());

if(_input.secretsAndPriorities.Count() > 0)
if(_input.PlayerSecrets.Count() > 0)
{
DebugLog("Detected the following secrets");
foreach(var s in _input.secretsAndPriorities)
DebugLog(s.secret.ToString());
DebugLog("Detected the following player secrets");
foreach(var s in _input.PlayerSecrets)
DebugLog(s.ToString());
}

if(_input.OpponentSecrets.Count() > 0)
{
DebugLog("Detected the following opponent secrets");
foreach(var s in _input.OpponentSecrets)
DebugLog(s.ToString());
}
DebugLog("----- End of Input -----");

Expand Down

0 comments on commit 8e2154f

Please sign in to comment.