From 8e2154f88fd365ec72888596bbaa9f3beacc7973 Mon Sep 17 00:00:00 2001 From: Jonysegal Date: Fri, 19 Nov 2021 18:06:46 -0500 Subject: [PATCH] Update bobsbuddyinvoker --- .../BobsBuddy/BobsBuddyInvoker.cs | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/Hearthstone Deck Tracker/BobsBuddy/BobsBuddyInvoker.cs b/Hearthstone Deck Tracker/BobsBuddy/BobsBuddyInvoker.cs index e62af230ef..636bd1fd91 100644 --- a/Hearthstone Deck Tracker/BobsBuddy/BobsBuddyInvoker.cs +++ b/Hearthstone Deck Tracker/BobsBuddy/BobsBuddyInvoker.cs @@ -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); @@ -418,9 +418,8 @@ private IEnumerable 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 -----"); @@ -432,11 +431,18 @@ private IEnumerable 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 -----");