wyksdsg commited on
Commit
787c99c
·
verified ·
1 Parent(s): 1b0482e

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +12 -0
  2. .gitignore +5 -0
  3. DeepBattlerPlugin/.vs/DeepBattlerPlugin/FileContentIndex/0765d779-0eb4-4f85-9979-843335f5bbfd.vsidx +0 -0
  4. DeepBattlerPlugin/.vs/DeepBattlerPlugin/FileContentIndex/0db9c8b5-0c5f-4302-a33c-b2b73da3cef2.vsidx +0 -0
  5. DeepBattlerPlugin/.vs/DeepBattlerPlugin/FileContentIndex/6fe21c33-448f-4a34-9673-4a6a16f7ec8e.vsidx +0 -0
  6. DeepBattlerPlugin/.vs/DeepBattlerPlugin/FileContentIndex/f3ab8a47-0cd9-498c-940e-d952e55054be.vsidx +0 -0
  7. DeepBattlerPlugin/.vs/DeepBattlerPlugin/FileContentIndex/fb4049f2-e49b-4649-89f2-f1a63f1b81bc.vsidx +0 -0
  8. DeepBattlerPlugin/.vs/DeepBattlerPlugin/v17/.suo +0 -0
  9. DeepBattlerPlugin/.vs/DeepBattlerPlugin/v17/DocumentLayout.backup.json +37 -0
  10. DeepBattlerPlugin/.vs/DeepBattlerPlugin/v17/DocumentLayout.json +35 -0
  11. DeepBattlerPlugin/Class1.cs +436 -0
  12. DeepBattlerPlugin/DeepBattlerPlugin.csproj +63 -0
  13. DeepBattlerPlugin/DeepBattlerPlugin.csproj.user +7 -0
  14. DeepBattlerPlugin/DeepBattlerPlugin.sln +22 -0
  15. DeepBattlerPlugin/Properties/AssemblyInfo.cs +33 -0
  16. DeepBattlerPlugin/app.config +11 -0
  17. DeepBattlerPlugin/bin/Debug/DeepBattlerPlugin.dll +0 -0
  18. DeepBattlerPlugin/bin/Debug/DeepBattlerPlugin.dll.config +11 -0
  19. DeepBattlerPlugin/bin/Debug/DeepBattlerPlugin.pdb +0 -0
  20. DeepBattlerPlugin/bin/Debug/HearthDb.dll +3 -0
  21. DeepBattlerPlugin/bin/Debug/HearthstoneDeckTracker.exe +3 -0
  22. DeepBattlerPlugin/bin/Debug/Newtonsoft.Json.dll +3 -0
  23. DeepBattlerPlugin/obj/Debug/.NETFramework,Version=v4.0.AssemblyAttributes.cs +4 -0
  24. DeepBattlerPlugin/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs +4 -0
  25. DeepBattlerPlugin/obj/Debug/DeepBattlerPlugin.csproj.AssemblyReference.cache +0 -0
  26. DeepBattlerPlugin/obj/Debug/DeepBattlerPlugin.csproj.CoreCompileInputs.cache +1 -0
  27. DeepBattlerPlugin/obj/Debug/DeepBattlerPlugin.csproj.FileListAbsolute.txt +62 -0
  28. DeepBattlerPlugin/obj/Debug/DeepBattlerPlugin.dll +0 -0
  29. DeepBattlerPlugin/obj/Debug/DeepBattlerPlugin.pdb +0 -0
  30. DeepBattlerPlugin/obj/Debug/DesignTimeResolveAssemblyReferences.cache +0 -0
  31. DeepBattlerPlugin/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache +0 -0
  32. DeepBattlerPlugin/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs +4 -0
  33. DeepBattlerPlugin/obj/Release/DeepBattlerPlugin.csproj.AssemblyReference.cache +0 -0
  34. DeepBattlerPlugin/packages.config +4 -0
  35. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/.signature.p7s +0 -0
  36. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/LICENSE.md +20 -0
  37. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/Newtonsoft.Json.13.0.3.nupkg +3 -0
  38. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/README.md +71 -0
  39. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net20/Newtonsoft.Json.dll +3 -0
  40. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net20/Newtonsoft.Json.xml +0 -0
  41. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net35/Newtonsoft.Json.dll +3 -0
  42. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net35/Newtonsoft.Json.xml +0 -0
  43. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net40/Newtonsoft.Json.dll +3 -0
  44. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net40/Newtonsoft.Json.xml +0 -0
  45. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net45/Newtonsoft.Json.dll +3 -0
  46. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net45/Newtonsoft.Json.xml +0 -0
  47. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net6.0/Newtonsoft.Json.dll +3 -0
  48. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net6.0/Newtonsoft.Json.xml +0 -0
  49. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/netstandard1.0/Newtonsoft.Json.dll +3 -0
  50. DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/netstandard1.0/Newtonsoft.Json.xml +0 -0
.gitattributes CHANGED
@@ -33,3 +33,15 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ DeepBattlerPlugin/bin/Debug/HearthDb.dll filter=lfs diff=lfs merge=lfs -text
37
+ DeepBattlerPlugin/bin/Debug/HearthstoneDeckTracker.exe filter=lfs diff=lfs merge=lfs -text
38
+ DeepBattlerPlugin/bin/Debug/Newtonsoft.Json.dll filter=lfs diff=lfs merge=lfs -text
39
+ DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/Newtonsoft.Json.13.0.3.nupkg filter=lfs diff=lfs merge=lfs -text
40
+ DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net20/Newtonsoft.Json.dll filter=lfs diff=lfs merge=lfs -text
41
+ DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net35/Newtonsoft.Json.dll filter=lfs diff=lfs merge=lfs -text
42
+ DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net40/Newtonsoft.Json.dll filter=lfs diff=lfs merge=lfs -text
43
+ DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net45/Newtonsoft.Json.dll filter=lfs diff=lfs merge=lfs -text
44
+ DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net6.0/Newtonsoft.Json.dll filter=lfs diff=lfs merge=lfs -text
45
+ DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/netstandard1.0/Newtonsoft.Json.dll filter=lfs diff=lfs merge=lfs -text
46
+ DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/netstandard1.3/Newtonsoft.Json.dll filter=lfs diff=lfs merge=lfs -text
47
+ DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/netstandard2.0/Newtonsoft.Json.dll filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ battleground_*
2
+ models
3
+ RL/datasets/
4
+ AGENT*
5
+ __pycache__
DeepBattlerPlugin/.vs/DeepBattlerPlugin/FileContentIndex/0765d779-0eb4-4f85-9979-843335f5bbfd.vsidx ADDED
Binary file (20.9 kB). View file
 
DeepBattlerPlugin/.vs/DeepBattlerPlugin/FileContentIndex/0db9c8b5-0c5f-4302-a33c-b2b73da3cef2.vsidx ADDED
Binary file (1.64 kB). View file
 
DeepBattlerPlugin/.vs/DeepBattlerPlugin/FileContentIndex/6fe21c33-448f-4a34-9673-4a6a16f7ec8e.vsidx ADDED
Binary file (4.1 kB). View file
 
DeepBattlerPlugin/.vs/DeepBattlerPlugin/FileContentIndex/f3ab8a47-0cd9-498c-940e-d952e55054be.vsidx ADDED
Binary file (3.72 kB). View file
 
DeepBattlerPlugin/.vs/DeepBattlerPlugin/FileContentIndex/fb4049f2-e49b-4649-89f2-f1a63f1b81bc.vsidx ADDED
Binary file (14.2 kB). View file
 
DeepBattlerPlugin/.vs/DeepBattlerPlugin/v17/.suo ADDED
Binary file (25.1 kB). View file
 
DeepBattlerPlugin/.vs/DeepBattlerPlugin/v17/DocumentLayout.backup.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Version": 1,
3
+ "WorkspaceRootPath": "C:\\Users\\Guanming Wang\\Desktop\\DeepBattler\\DeepBattlerPlugin\\",
4
+ "Documents": [
5
+ {
6
+ "AbsoluteMoniker": "D:0:0:{9A9028AD-E02F-40B9-9EEB-197B715CF760}|DeepBattlerPlugin\\DeepBattlerPlugin.csproj|c:\\users\\guanming wang\\desktop\\deepbattler\\deepbattlerplugin\\deepbattlerplugin\\class1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
7
+ "RelativeMoniker": "D:0:0:{9A9028AD-E02F-40B9-9EEB-197B715CF760}|DeepBattlerPlugin\\DeepBattlerPlugin.csproj|solutionrelative:deepbattlerplugin\\class1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
8
+ }
9
+ ],
10
+ "DocumentGroupContainers": [
11
+ {
12
+ "Orientation": 0,
13
+ "VerticalTabListWidth": 256,
14
+ "DocumentGroups": [
15
+ {
16
+ "DockedWidth": 200,
17
+ "SelectedChildIndex": 0,
18
+ "Children": [
19
+ {
20
+ "$type": "Document",
21
+ "DocumentIndex": 0,
22
+ "Title": "Class1.cs",
23
+ "DocumentMoniker": "C:\\Users\\Guanming Wang\\Desktop\\DeepBattler\\DeepBattlerPlugin\\DeepBattlerPlugin\\Class1.cs",
24
+ "RelativeDocumentMoniker": "DeepBattlerPlugin\\Class1.cs",
25
+ "ToolTip": "C:\\Users\\Guanming Wang\\Desktop\\DeepBattler\\DeepBattlerPlugin\\DeepBattlerPlugin\\Class1.cs",
26
+ "RelativeToolTip": "DeepBattlerPlugin\\Class1.cs",
27
+ "ViewState": "AgIAACgAAAAAAAAAAIAwwC4AAAA4AAAAAAAAAA==",
28
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
29
+ "WhenOpened": "2024-12-08T10:01:57.285Z",
30
+ "EditorCaption": ""
31
+ }
32
+ ]
33
+ }
34
+ ]
35
+ }
36
+ ]
37
+ }
DeepBattlerPlugin/.vs/DeepBattlerPlugin/v17/DocumentLayout.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Version": 1,
3
+ "WorkspaceRootPath": "C:\\Users\\Guanming Wang\\Desktop\\DeepBattler\\DeepBattlerPlugin\\",
4
+ "Documents": [
5
+ {
6
+ "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Guanming Wang\\Desktop\\DeepBattler\\DeepBattlerPlugin\\DeepBattlerPlugin\\Class1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
7
+ "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:DeepBattlerPlugin\\Class1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
8
+ }
9
+ ],
10
+ "DocumentGroupContainers": [
11
+ {
12
+ "Orientation": 0,
13
+ "VerticalTabListWidth": 256,
14
+ "DocumentGroups": [
15
+ {
16
+ "DockedWidth": 200,
17
+ "SelectedChildIndex": 0,
18
+ "Children": [
19
+ {
20
+ "$type": "Document",
21
+ "DocumentIndex": 0,
22
+ "Title": "Class1.cs",
23
+ "DocumentMoniker": "C:\\Users\\Guanming Wang\\Desktop\\DeepBattler\\DeepBattlerPlugin\\DeepBattlerPlugin\\Class1.cs",
24
+ "RelativeDocumentMoniker": "DeepBattlerPlugin\\Class1.cs",
25
+ "ToolTip": "C:\\Users\\Guanming Wang\\Desktop\\DeepBattler\\DeepBattlerPlugin\\DeepBattlerPlugin\\Class1.cs",
26
+ "RelativeToolTip": "DeepBattlerPlugin\\Class1.cs",
27
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
28
+ "WhenOpened": "2024-12-08T10:01:57.285Z"
29
+ }
30
+ ]
31
+ }
32
+ ]
33
+ }
34
+ ]
35
+ }
DeepBattlerPlugin/Class1.cs ADDED
@@ -0,0 +1,436 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.IO;
3
+ using System.Linq;
4
+ using System.Collections.Generic;
5
+ using Hearthstone_Deck_Tracker.API;
6
+ using Hearthstone_Deck_Tracker.Hearthstone;
7
+ using Hearthstone_Deck_Tracker.Plugins;
8
+ using HearthDb.Enums;
9
+ using Hearthstone_Deck_Tracker.Enums;
10
+ using System.Windows.Controls;
11
+
12
+ namespace DeepBattlerPlugin
13
+ {
14
+ public class CardEntityInfo
15
+ {
16
+ public string Name { get; set; }
17
+ public int? Atk { get; set; }
18
+ public int? Health { get; set; }
19
+ public string Description { get; set; }
20
+ public string Race { get; set; }
21
+ public bool IsSpell { get; set; }
22
+ public int? Tier { get; set; }
23
+ }
24
+
25
+ public enum GamePhaseEnum
26
+ {
27
+ StartGame,
28
+ PlayerTurn,
29
+ OpponentTurn,
30
+ EndGame
31
+ }
32
+
33
+ public class DeepBattlerPlugin : IPlugin
34
+ {
35
+ private static readonly int[] BASE_TAVERN_UPGRADE_COSTS = { 5, 7, 8, 10, 10 };
36
+ private int? _currentTavernUpgradeCost = null;
37
+
38
+ public string Name => "DeepBattlerPlugin";
39
+ public string Description => "Track BG state with simplified logic";
40
+ public string ButtonText => "Do Nothing";
41
+ public string Author => "Guanming";
42
+ public Version Version => new Version(1, 0, 10);
43
+ public MenuItem MenuItem => null;
44
+
45
+ private bool _isPlayerTurnStarted = false;
46
+ private int _updateCounterSincePlayerTurn = 0;
47
+ private const int DelayBeforeFetchingTavern = 5;
48
+ public GamePhaseEnum CurrentPhase { get; private set; } = GamePhaseEnum.StartGame;
49
+
50
+ private int _lastHeroHealth;
51
+ private int _lastCoins;
52
+ private int _lastTavernTier = 1;
53
+ private CardEntityInfo[] _lastWarband = Array.Empty<CardEntityInfo>();
54
+ private CardEntityInfo[] _lastTavernEntities = Array.Empty<CardEntityInfo>();
55
+ private CardEntityInfo[] _lastHand = Array.Empty<CardEntityInfo>();
56
+ private readonly string _path = @"C:\Users\Guanming Wang\Desktop\DeepBattler\Agent\game_state.json";
57
+ //private readonly string _path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Agent", "game_state.json");
58
+ private string _heroName = "Unknown Hero";
59
+ private int _playerHeroId = 0;
60
+ private bool _upgradedThisTurn = false;
61
+
62
+ public void OnLoad()
63
+ {
64
+ GameEvents.OnGameStart.Add(OnGameStart);
65
+ GameEvents.OnTurnStart.Add(OnTurnStart);
66
+ GameEvents.OnGameEnd.Add(OnGameEnd);
67
+ }
68
+
69
+ public void OnUnload() { }
70
+ public void OnButtonPress() { }
71
+
72
+ private bool IsInRecruitmentPhase()
73
+ {
74
+ var playerEntity = Core.Game.PlayerEntity;
75
+ if (playerEntity == null)
76
+ return false;
77
+ return Core.Game.Entities.Values.Any(e => e.GetTag(GameTag.IS_BACON_POOL_MINION) == 1);
78
+ }
79
+
80
+ public void OnUpdate()
81
+ {
82
+ if (_heroName == "Unknown Hero" || _heroName.StartsWith("BaconPHhero"))
83
+ UpdateHeroName();
84
+ if (_isPlayerTurnStarted)
85
+ {
86
+ if (!IsInRecruitmentPhase())
87
+ return;
88
+ _updateCounterSincePlayerTurn++;
89
+ if (_updateCounterSincePlayerTurn >= DelayBeforeFetchingTavern)
90
+ UpdateGameState();
91
+ }
92
+ else
93
+ {
94
+ UpdateGameState();
95
+ }
96
+ }
97
+
98
+ private void OnGameStart()
99
+ {
100
+ var playerHero = Core.Game.Player?.Hero;
101
+ if (playerHero != null)
102
+ {
103
+ var heroCardId = playerHero.CardId;
104
+ if (heroCardId != null && HearthDb.Cards.All.TryGetValue(heroCardId, out var foundHeroCard))
105
+ _heroName = foundHeroCard?.Name ?? "Unknown Hero";
106
+ else
107
+ _heroName = "Unknown Hero";
108
+ _playerHeroId = playerHero.Id;
109
+ }
110
+ _lastTavernTier = 1;
111
+ CurrentPhase = GamePhaseEnum.StartGame;
112
+ _currentTavernUpgradeCost = null;
113
+ UpdateGameState(true);
114
+ }
115
+
116
+ private void OnGameEnd()
117
+ {
118
+ CurrentPhase = GamePhaseEnum.EndGame;
119
+ UpdateGameState();
120
+ ResetInternalState();
121
+ }
122
+
123
+ private void ResetInternalState()
124
+ {
125
+ _currentTavernUpgradeCost = null;
126
+ _lastHeroHealth = 0;
127
+ _lastCoins = 0;
128
+ _lastTavernTier = 1;
129
+ _lastWarband = Array.Empty<CardEntityInfo>();
130
+ _lastTavernEntities = Array.Empty<CardEntityInfo>();
131
+ _lastHand = Array.Empty<CardEntityInfo>();
132
+ _heroName = "Unknown Hero";
133
+ _playerHeroId = 0;
134
+ _isPlayerTurnStarted = false;
135
+ _upgradedThisTurn = false;
136
+ }
137
+
138
+ private void OnTurnStart(ActivePlayer player)
139
+ {
140
+ if (player == ActivePlayer.Player)
141
+ {
142
+ if (_currentTavernUpgradeCost == null)
143
+ {
144
+ _currentTavernUpgradeCost = BASE_TAVERN_UPGRADE_COSTS[0];
145
+ }
146
+ else
147
+ {
148
+ _currentTavernUpgradeCost = Math.Max(0, _currentTavernUpgradeCost.Value - 1);
149
+ }
150
+ _upgradedThisTurn = false;
151
+ CurrentPhase = GamePhaseEnum.PlayerTurn;
152
+ _isPlayerTurnStarted = true;
153
+ _updateCounterSincePlayerTurn = 0;
154
+ UpdateGameState();
155
+ }
156
+ var playerEntity = Core.Game.PlayerEntity;
157
+ if (playerEntity == null)
158
+ return;
159
+ if (player == ActivePlayer.Opponent)
160
+ {
161
+ CurrentPhase = GamePhaseEnum.OpponentTurn;
162
+ UpdateGameState();
163
+ }
164
+ }
165
+
166
+ public void PlayerUpgradedTavern(int newTier)
167
+ {
168
+ _upgradedThisTurn = true;
169
+ _lastTavernTier = newTier;
170
+ if (newTier < 6)
171
+ {
172
+ _currentTavernUpgradeCost = BASE_TAVERN_UPGRADE_COSTS[newTier - 1];
173
+ }
174
+ else
175
+ {
176
+ _currentTavernUpgradeCost = null;
177
+ }
178
+ UpdateGameState(true);
179
+ }
180
+
181
+ private void UpdateHeroName()
182
+ {
183
+ var playerHero = Core.Game.Player?.Hero;
184
+ if (playerHero != null)
185
+ {
186
+ var heroCardId = playerHero.CardId;
187
+ if (heroCardId != null && HearthDb.Cards.All.TryGetValue(heroCardId, out var foundHeroCard))
188
+ {
189
+ if (!string.IsNullOrEmpty(foundHeroCard.Name) && !foundHeroCard.Name.StartsWith("BaconPHhero"))
190
+ {
191
+ _heroName = foundHeroCard.Name;
192
+ UpdateGameState();
193
+ }
194
+ }
195
+ }
196
+ }
197
+
198
+ private void UpdateGameState(bool forceWrite = false)
199
+ {
200
+ var heroEntity = Core.Game.Player?.Hero;
201
+ var playerEntity = Core.Game.PlayerEntity;
202
+ if (heroEntity == null || playerEntity == null)
203
+ return;
204
+ var playerId = playerEntity.GetTag(GameTag.PLAYER_ID);
205
+ var heroPowerEntity = Core.Game.Entities.Values.FirstOrDefault(e =>
206
+ e.GetTag(GameTag.CONTROLLER) == playerId &&
207
+ e.GetTag(GameTag.CARDTYPE) == (int)CardType.HERO_POWER);
208
+ var baseHealth = heroEntity.GetTag(GameTag.HEALTH);
209
+ var damage = heroEntity.GetTag(GameTag.DAMAGE);
210
+ var actualHealth = baseHealth - damage;
211
+ var coins = playerEntity.GetTag(GameTag.RESOURCES);
212
+ var coinsUsed = playerEntity.GetTag(GameTag.RESOURCES_USED);
213
+ var availableCoins = coins - coinsUsed;
214
+ var tavernTier = playerEntity.GetTag(GameTag.PLAYER_TECH_LEVEL);
215
+ if (tavernTier > _lastTavernTier)
216
+ {
217
+ PlayerUpgradedTavern(tavernTier);
218
+ return;
219
+ }
220
+ var currentWarband = ExtractWarband();
221
+ var currentHand = ExtractHand();
222
+ var currentTavernEntities = ExtractTavernEntitiesWithDetails();
223
+ var heroPowerDescription = CleanCardText(heroPowerEntity?.Card?.Text);
224
+ var heroPowerCost = heroPowerEntity?.GetTag(GameTag.COST) ?? 0;
225
+ var tavernUpgradeCostStr = "None";
226
+ if (CurrentPhase == GamePhaseEnum.StartGame)
227
+ {
228
+ tavernUpgradeCostStr = "undefined";
229
+ }
230
+ else if (tavernTier < 6)
231
+ {
232
+ if (_currentTavernUpgradeCost == null && CurrentPhase == GamePhaseEnum.PlayerTurn)
233
+ {
234
+ _currentTavernUpgradeCost = BASE_TAVERN_UPGRADE_COSTS[0];
235
+ }
236
+ if (_currentTavernUpgradeCost.HasValue)
237
+ {
238
+ tavernUpgradeCostStr = _currentTavernUpgradeCost.Value.ToString();
239
+ }
240
+ }
241
+ bool changed = forceWrite
242
+ || actualHealth != _lastHeroHealth
243
+ || availableCoins != _lastCoins
244
+ || tavernTier != _lastTavernTier
245
+ || !EntitiesEqual(currentWarband, _lastWarband)
246
+ || !EntitiesEqual(currentTavernEntities, _lastTavernEntities)
247
+ || !EntitiesEqual(currentHand, _lastHand);
248
+ if (changed)
249
+ {
250
+ _lastHeroHealth = actualHealth;
251
+ _lastCoins = availableCoins;
252
+ _lastWarband = currentWarband;
253
+ _lastTavernEntities = currentTavernEntities;
254
+ _lastHand = currentHand;
255
+ var json = "{";
256
+ json += $"\"HeroName\":\"{EscapeJson(_heroName)}\",";
257
+ json += $"\"HeroHealth\":{actualHealth},";
258
+ json += $"\"Coins\":{availableCoins},";
259
+ json += $"\"TavernUpgradeCost\":\"{tavernUpgradeCostStr}\",";
260
+ json += $"\"HeroPowerDescription\":\"{EscapeJson(heroPowerDescription)}\",";
261
+ json += $"\"CurrentTavernTier\":{tavernTier},";
262
+ json += $"\"HeroPowerCost\":{heroPowerCost},";
263
+ json += "\"Warband\":" + EntitiesToJson(currentWarband) + ",";
264
+ json += "\"Hand\":" + EntitiesToJsonNoRace(currentHand) + ",";
265
+ json += "\"TavernEntities\":" + EntitiesToJson(currentTavernEntities);
266
+ json += "}";
267
+ try { File.WriteAllText(_path, json); } catch (Exception) { }
268
+ }
269
+ }
270
+
271
+ private CardEntityInfo[] ExtractWarband()
272
+ {
273
+ return (Core.Game.Player?.Board?
274
+ .Where(e => e.GetTag(GameTag.ZONE) == (int)Zone.PLAY &&
275
+ e.GetTag(GameTag.CARDTYPE) == (int)CardType.MINION &&
276
+ e.Card != null)
277
+ .Select(e => new CardEntityInfo
278
+ {
279
+ Name = e.Card.Name,
280
+ Atk = e.GetTag(GameTag.ATK),
281
+ Health = e.GetTag(GameTag.HEALTH) - e.GetTag(GameTag.DAMAGE),
282
+ Description = CleanCardText(e.Card.Text),
283
+ Race = GetRaceString(e.Card.Race),
284
+ IsSpell = false,
285
+ Tier = e.Card?.TechLevel
286
+ })
287
+ .ToArray()) ?? Array.Empty<CardEntityInfo>();
288
+ }
289
+
290
+ private CardEntityInfo[] ExtractHand()
291
+ {
292
+ return (Core.Game.Player?.Hand?
293
+ .Where(e =>
294
+ e.Card != null
295
+ && !string.IsNullOrEmpty(e.Card.Name)
296
+ )
297
+ .Select(e => new CardEntityInfo
298
+ {
299
+ Name = e.Card.Name,
300
+ Description = CleanCardText(e.Card.Text),
301
+ IsSpell = e.GetTag(GameTag.CARDTYPE) == (int)CardType.BATTLEGROUND_SPELL
302
+ })
303
+ .ToArray()) ?? Array.Empty<CardEntityInfo>();
304
+ }
305
+
306
+ private CardEntityInfo[] ExtractTavernEntitiesWithDetails()
307
+ {
308
+ if (Core.Game.PlayerEntity == null)
309
+ return Array.Empty<CardEntityInfo>();
310
+ var playerId = Core.Game.PlayerEntity.GetTag(GameTag.PLAYER_ID);
311
+ var tavernMinions = Core.Game.Entities.Values
312
+ .Where(e => e.GetTag(GameTag.ZONE) == (int)Zone.PLAY &&
313
+ e.Id != _playerHeroId &&
314
+ e.Card != null &&
315
+ !string.IsNullOrEmpty(e.Card.Name) &&
316
+ e.GetTag(GameTag.IS_BACON_POOL_MINION) == 1 &&
317
+ e.GetTag(GameTag.CONTROLLER) != playerId &&
318
+ e.GetTag(GameTag.CARDTYPE) == (int)CardType.MINION)
319
+ .Select(e => new CardEntityInfo
320
+ {
321
+ Name = e.Card.Name,
322
+ Atk = e.GetTag(GameTag.ATK),
323
+ Health = e.GetTag(GameTag.HEALTH) - e.GetTag(GameTag.DAMAGE),
324
+ Description = CleanCardText(e.Card.Text),
325
+ Race = GetRaceString(e.Card.Race),
326
+ IsSpell = false,
327
+ Tier = e.Card?.TechLevel
328
+ });
329
+ var tavernSpells = Core.Game.Entities.Values
330
+ .Where(e => e.GetTag(GameTag.CARDTYPE) == (int)CardType.BATTLEGROUND_SPELL &&
331
+ e.GetTag(GameTag.ZONE) == (int)Zone.PLAY &&
332
+ e.Card != null &&
333
+ !string.IsNullOrEmpty(e.Card.Name))
334
+ .Select(e => new CardEntityInfo
335
+ {
336
+ Name = e.Card.Name,
337
+ Description = CleanCardText(e.Card.Text),
338
+ Race = "Tavern Spell",
339
+ IsSpell = true,
340
+ Tier = e.Card?.TechLevel
341
+ });
342
+ return tavernMinions.Concat(tavernSpells).ToArray();
343
+ }
344
+
345
+ private bool EntitiesEqual(CardEntityInfo[] arr1, CardEntityInfo[] arr2)
346
+ {
347
+ if (arr1.Length != arr2.Length)
348
+ return false;
349
+ for (int i = 0; i < arr1.Length; i++)
350
+ {
351
+ if (arr1[i].Name != arr2[i].Name ||
352
+ arr1[i].Description != arr2[i].Description ||
353
+ arr1[i].Race != arr2[i].Race ||
354
+ arr1[i].IsSpell != arr2[i].IsSpell ||
355
+ arr1[i].Tier != arr2[i].Tier)
356
+ return false;
357
+ if (!arr1[i].IsSpell && (arr1[i].Atk != arr2[i].Atk || arr1[i].Health != arr2[i].Health))
358
+ return false;
359
+ }
360
+ return true;
361
+ }
362
+
363
+ private string EntitiesToJson(CardEntityInfo[] entities)
364
+ {
365
+ var parts = new List<string>();
366
+ foreach (var e in entities)
367
+ {
368
+ if (e.IsSpell)
369
+ parts.Add(SpellToJson(e));
370
+ else
371
+ parts.Add(MinionToJson(e));
372
+ }
373
+ return "[" + string.Join(",", parts) + "]";
374
+ }
375
+
376
+ private string MinionToJson(CardEntityInfo entity)
377
+ {
378
+ return "{" +
379
+ $"\"Name\":\"{EscapeJson(entity.Name)}\"," +
380
+ $"\"Atk\":{entity.Atk}," +
381
+ $"\"Health\":{entity.Health}," +
382
+ $"\"Description\":\"{EscapeJson(entity.Description)}\"," +
383
+ $"\"Race\":\"{EscapeJson(entity.Race)}\"," +
384
+ $"\"Tier\":{entity.Tier}" +
385
+ "}";
386
+ }
387
+
388
+ private string SpellToJson(CardEntityInfo entity)
389
+ {
390
+ return "{" +
391
+ $"\"Name\":\"{EscapeJson(entity.Name)}\"," +
392
+ $"\"Description\":\"{EscapeJson(entity.Description)}\"," +
393
+ $"\"Race\":\"Tavern Spell\"," +
394
+ $"\"Tier\":{entity.Tier}" +
395
+ "}";
396
+ }
397
+
398
+ private string EntitiesToJsonNoRace(CardEntityInfo[] entities)
399
+ {
400
+ var parts = new List<string>();
401
+ foreach (var e in entities)
402
+ {
403
+ var part = "{";
404
+ part += $"\"Name\":\"{EscapeJson(e.Name)}\",";
405
+ part += $"\"Description\":\"{EscapeJson(e.Description)}\"";
406
+ part += "}";
407
+ parts.Add(part);
408
+ }
409
+ return "[" + string.Join(",", parts) + "]";
410
+ }
411
+
412
+ private string EscapeJson(string value)
413
+ {
414
+ if (string.IsNullOrEmpty(value))
415
+ return "";
416
+ return value
417
+ .Replace("\\", "\\\\")
418
+ .Replace("\"", "\\\"")
419
+ .Replace("\n", "\\n")
420
+ .Replace("\r", "\\r")
421
+ .Replace("\t", "\\t");
422
+ }
423
+
424
+ private string CleanCardText(string text)
425
+ {
426
+ if (string.IsNullOrEmpty(text))
427
+ return "";
428
+ return text.Replace("\r", " ").Replace("\n", " ").Trim();
429
+ }
430
+
431
+ private string GetRaceString(string race)
432
+ {
433
+ return string.IsNullOrEmpty(race) ? "" : race;
434
+ }
435
+ }
436
+ }
DeepBattlerPlugin/DeepBattlerPlugin.csproj ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4
+ <PropertyGroup>
5
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7
+ <ProjectGuid>{9A9028AD-E02F-40B9-9EEB-197B715CF760}</ProjectGuid>
8
+ <OutputType>Library</OutputType>
9
+ <AppDesignerFolder>Properties</AppDesignerFolder>
10
+ <RootNamespace>DeepBattlerPlugin</RootNamespace>
11
+ <AssemblyName>DeepBattlerPlugin</AssemblyName>
12
+ <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
13
+ <FileAlignment>512</FileAlignment>
14
+ <Deterministic>true</Deterministic>
15
+ </PropertyGroup>
16
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17
+ <DebugSymbols>true</DebugSymbols>
18
+ <DebugType>full</DebugType>
19
+ <Optimize>false</Optimize>
20
+ <OutputPath>bin\Debug\</OutputPath>
21
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
22
+ <ErrorReport>prompt</ErrorReport>
23
+ <WarningLevel>4</WarningLevel>
24
+ <PlatformTarget>x86</PlatformTarget>
25
+ </PropertyGroup>
26
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27
+ <DebugType>pdbonly</DebugType>
28
+ <Optimize>true</Optimize>
29
+ <OutputPath>bin\Release\</OutputPath>
30
+ <DefineConstants>TRACE</DefineConstants>
31
+ <ErrorReport>prompt</ErrorReport>
32
+ <WarningLevel>4</WarningLevel>
33
+ </PropertyGroup>
34
+ <ItemGroup>
35
+ <Reference Include="HearthDb">
36
+ <HintPath>..\..\..\..\AppData\Local\HearthstoneDeckTracker\app-1.37.5\HearthDb.dll</HintPath>
37
+ </Reference>
38
+ <Reference Include="HearthstoneDeckTracker">
39
+ <HintPath>..\..\..\..\AppData\Local\HearthstoneDeckTracker\app-1.37.5\HearthstoneDeckTracker.exe</HintPath>
40
+ </Reference>
41
+ <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
42
+ <HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
43
+ </Reference>
44
+ <Reference Include="PresentationFramework" />
45
+ <Reference Include="System" />
46
+ <Reference Include="System.Core" />
47
+ <Reference Include="System.Xml.Linq" />
48
+ <Reference Include="System.Data.DataSetExtensions" />
49
+ <Reference Include="Microsoft.CSharp" />
50
+ <Reference Include="System.Data" />
51
+ <Reference Include="System.Net.Http" />
52
+ <Reference Include="System.Xml" />
53
+ </ItemGroup>
54
+ <ItemGroup>
55
+ <Compile Include="Class1.cs" />
56
+ <Compile Include="Properties\AssemblyInfo.cs" />
57
+ </ItemGroup>
58
+ <ItemGroup>
59
+ <None Include="app.config" />
60
+ <None Include="packages.config" />
61
+ </ItemGroup>
62
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
63
+ </Project>
DeepBattlerPlugin/DeepBattlerPlugin.csproj.user ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
4
+ <StartAction>Program</StartAction>
5
+ <StartProgram>C:\Users\Guanming Wang\AppData\Local\HearthstoneDeckTracker\HearthstoneDeckTracker.exe</StartProgram>
6
+ </PropertyGroup>
7
+ </Project>
DeepBattlerPlugin/DeepBattlerPlugin.sln ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 
2
+ Microsoft Visual Studio Solution File, Format Version 12.00
3
+ # Visual Studio Version 17
4
+ VisualStudioVersion = 17.12.35527.113 d17.12
5
+ MinimumVisualStudioVersion = 10.0.40219.1
6
+ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepBattlerPlugin", "DeepBattlerPlugin\DeepBattlerPlugin.csproj", "{9A9028AD-E02F-40B9-9EEB-197B715CF760}"
7
+ EndProject
8
+ Global
9
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
10
+ Debug|Any CPU = Debug|Any CPU
11
+ Release|Any CPU = Release|Any CPU
12
+ EndGlobalSection
13
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
14
+ {9A9028AD-E02F-40B9-9EEB-197B715CF760}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15
+ {9A9028AD-E02F-40B9-9EEB-197B715CF760}.Debug|Any CPU.Build.0 = Debug|Any CPU
16
+ {9A9028AD-E02F-40B9-9EEB-197B715CF760}.Release|Any CPU.ActiveCfg = Release|Any CPU
17
+ {9A9028AD-E02F-40B9-9EEB-197B715CF760}.Release|Any CPU.Build.0 = Release|Any CPU
18
+ EndGlobalSection
19
+ GlobalSection(SolutionProperties) = preSolution
20
+ HideSolutionNode = FALSE
21
+ EndGlobalSection
22
+ EndGlobal
DeepBattlerPlugin/Properties/AssemblyInfo.cs ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Reflection;
2
+ using System.Runtime.CompilerServices;
3
+ using System.Runtime.InteropServices;
4
+
5
+ // 有关程序集的一般信息由以下
6
+ // 控制。更改这些特性值可修改
7
+ // 与程序集关联的信息。
8
+ [assembly: AssemblyTitle("DeepBattlerPlugin")]
9
+ [assembly: AssemblyDescription("")]
10
+ [assembly: AssemblyConfiguration("")]
11
+ [assembly: AssemblyCompany("")]
12
+ [assembly: AssemblyProduct("DeepBattlerPlugin")]
13
+ [assembly: AssemblyCopyright("Copyright © 2024")]
14
+ [assembly: AssemblyTrademark("")]
15
+ [assembly: AssemblyCulture("")]
16
+
17
+ // 将 ComVisible 设置为 false 会使此程序集中的类型
18
+ //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19
+ //请将此类型的 ComVisible 特性设置为 true。
20
+ [assembly: ComVisible(false)]
21
+
22
+ // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23
+ [assembly: Guid("9a9028ad-e02f-40b9-9eeb-197b715cf760")]
24
+
25
+ // 程序集的版本信息由下列四个值组成:
26
+ //
27
+ // 主版本
28
+ // 次版本
29
+ // 生成号
30
+ // 修订号
31
+ //
32
+ [assembly: AssemblyVersion("1.0.0.0")]
33
+ [assembly: AssemblyFileVersion("1.0.0.0")]
DeepBattlerPlugin/app.config ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <configuration>
3
+ <runtime>
4
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5
+ <dependentAssembly>
6
+ <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
7
+ <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
8
+ </dependentAssembly>
9
+ </assemblyBinding>
10
+ </runtime>
11
+ </configuration>
DeepBattlerPlugin/bin/Debug/DeepBattlerPlugin.dll ADDED
Binary file (16.4 kB). View file
 
DeepBattlerPlugin/bin/Debug/DeepBattlerPlugin.dll.config ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <configuration>
3
+ <runtime>
4
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5
+ <dependentAssembly>
6
+ <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
7
+ <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
8
+ </dependentAssembly>
9
+ </assemblyBinding>
10
+ </runtime>
11
+ </configuration>
DeepBattlerPlugin/bin/Debug/DeepBattlerPlugin.pdb ADDED
Binary file (44.5 kB). View file
 
DeepBattlerPlugin/bin/Debug/HearthDb.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97f7236f3c25205f525acac23cac98294651f11c93eb15159923f86a11f3c2ce
3
+ size 93268456
DeepBattlerPlugin/bin/Debug/HearthstoneDeckTracker.exe ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35563ec914bd90f70b0b44267f7f411fca37940e3cf0b9629122ec4fbee3a659
3
+ size 11591144
DeepBattlerPlugin/bin/Debug/Newtonsoft.Json.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1e27af7b07eeedf5ce71a9255f0422816a6fc5849a483c6714e1b472044fa9d
3
+ size 711952
DeepBattlerPlugin/obj/Debug/.NETFramework,Version=v4.0.AssemblyAttributes.cs ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ // <autogenerated />
2
+ using System;
3
+ using System.Reflection;
4
+ [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]
DeepBattlerPlugin/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ // <autogenerated />
2
+ using System;
3
+ using System.Reflection;
4
+ [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
DeepBattlerPlugin/obj/Debug/DeepBattlerPlugin.csproj.AssemblyReference.cache ADDED
Binary file (12.8 kB). View file
 
DeepBattlerPlugin/obj/Debug/DeepBattlerPlugin.csproj.CoreCompileInputs.cache ADDED
@@ -0,0 +1 @@
 
 
1
+ b07f93cc7599850d75c275d4c9dfa3ff0ffc71935db8e7edccf1caf81be3ab96
DeepBattlerPlugin/obj/Debug/DeepBattlerPlugin.csproj.FileListAbsolute.txt ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\DeepBattlerPlugin.dll.config
2
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\DeepBattlerPlugin.dll
3
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\DeepBattlerPlugin.pdb
4
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\HearthDb.dll
5
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\HearthstoneDeckTracker.exe
6
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\Newtonsoft.Json.dll
7
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\MahApps.Metro.dll
8
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\HearthMirror.dll
9
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\HSReplay.dll
10
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\LiveCharts.dll
11
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\LiveCharts.Wpf.dll
12
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\Squirrel.dll
13
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\NuGet.Squirrel.dll
14
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\BobsBuddy.dll
15
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\SharpRaven.dll
16
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\HearthWatcher.dll
17
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\HtmlAgilityPack.dll
18
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\De.TorstenMandelkow.MetroChart.dll
19
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\WPFLocalizeExtension.dll
20
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\ControlzEx.dll
21
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\System.Windows.Interactivity.dll
22
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\System.Reflection.DispatchProxy.dll
23
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\untapped-scry-dotnet.dll
24
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\Splat.dll
25
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\SharpCompress.dll
26
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\DeltaCompressionDotNet.MsDelta.dll
27
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\Mono.Cecil.dll
28
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\XAMLMarkupExtensions.dll
29
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\DeltaCompressionDotNet.dll
30
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\HearthstoneDeckTracker.pdb
31
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\HearthstoneDeckTracker.exe.config
32
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\Newtonsoft.Json.xml
33
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\HearthWatcher.pdb
34
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\de-DE\HearthstoneDeckTracker.resources.dll
35
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\es-ES\HearthstoneDeckTracker.resources.dll
36
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\es-MX\HearthstoneDeckTracker.resources.dll
37
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\fr-FR\HearthstoneDeckTracker.resources.dll
38
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\it-IT\HearthstoneDeckTracker.resources.dll
39
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\ja-JP\HearthstoneDeckTracker.resources.dll
40
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\ko-KR\HearthstoneDeckTracker.resources.dll
41
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\nl-NL\HearthstoneDeckTracker.resources.dll
42
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\pl-PL\HearthstoneDeckTracker.resources.dll
43
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\pt-BR\HearthstoneDeckTracker.resources.dll
44
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\pt-PT\HearthstoneDeckTracker.resources.dll
45
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\ru-RU\HearthstoneDeckTracker.resources.dll
46
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\th-TH\HearthstoneDeckTracker.resources.dll
47
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\uk-UA\HearthstoneDeckTracker.resources.dll
48
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\zh-CN\HearthstoneDeckTracker.resources.dll
49
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\bin\Debug\zh-TW\HearthstoneDeckTracker.resources.dll
50
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\obj\Debug\DeepBattlerPlugin.csproj.AssemblyReference.cache
51
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\obj\Debug\DeepBattlerPlugin.csproj.CoreCompileInputs.cache
52
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\obj\Debug\DeepBatt.9EB99A31.Up2Date
53
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\obj\Debug\DeepBattlerPlugin.dll
54
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\DeepBattlerPlugin\obj\Debug\DeepBattlerPlugin.pdb
55
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\bin\Debug\DeepBattlerPlugin.dll.config
56
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\bin\Debug\DeepBattlerPlugin.dll
57
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\bin\Debug\DeepBattlerPlugin.pdb
58
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\obj\Debug\DeepBattlerPlugin.csproj.AssemblyReference.cache
59
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\obj\Debug\DeepBattlerPlugin.csproj.CoreCompileInputs.cache
60
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\obj\Debug\DeepBatt.9EB99A31.Up2Date
61
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\obj\Debug\DeepBattlerPlugin.dll
62
+ C:\Users\Guanming Wang\Desktop\DeepBattler\DeepBattlerPlugin\obj\Debug\DeepBattlerPlugin.pdb
DeepBattlerPlugin/obj/Debug/DeepBattlerPlugin.dll ADDED
Binary file (16.4 kB). View file
 
DeepBattlerPlugin/obj/Debug/DeepBattlerPlugin.pdb ADDED
Binary file (44.5 kB). View file
 
DeepBattlerPlugin/obj/Debug/DesignTimeResolveAssemblyReferences.cache ADDED
Binary file (205 Bytes). View file
 
DeepBattlerPlugin/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache ADDED
Binary file (2.5 kB). View file
 
DeepBattlerPlugin/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ // <autogenerated />
2
+ using System;
3
+ using System.Reflection;
4
+ [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
DeepBattlerPlugin/obj/Release/DeepBattlerPlugin.csproj.AssemblyReference.cache ADDED
Binary file (5.36 kB). View file
 
DeepBattlerPlugin/packages.config ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <packages>
3
+ <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
4
+ </packages>
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/.signature.p7s ADDED
Binary file (24.5 kB). View file
 
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/LICENSE.md ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2007 James Newton-King
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/Newtonsoft.Json.13.0.3.nupkg ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:872fc189e638ab1056555b03aaa38f68bcb54286e221aa646eb1129babf63c77
3
+ size 2441966
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ![Logo](https://raw.githubusercontent.com/JamesNK/Newtonsoft.Json/master/Doc/icons/logo.jpg) Json.NET
2
+
3
+ [![NuGet version (Newtonsoft.Json)](https://img.shields.io/nuget/v/Newtonsoft.Json.svg?style=flat-square)](https://www.nuget.org/packages/Newtonsoft.Json/)
4
+ [![Build status](https://dev.azure.com/jamesnk/Public/_apis/build/status/JamesNK.Newtonsoft.Json?branchName=master)](https://dev.azure.com/jamesnk/Public/_build/latest?definitionId=8)
5
+
6
+ Json.NET is a popular high-performance JSON framework for .NET
7
+
8
+ ## Serialize JSON
9
+
10
+ ```csharp
11
+ Product product = new Product();
12
+ product.Name = "Apple";
13
+ product.Expiry = new DateTime(2008, 12, 28);
14
+ product.Sizes = new string[] { "Small" };
15
+
16
+ string json = JsonConvert.SerializeObject(product);
17
+ // {
18
+ // "Name": "Apple",
19
+ // "Expiry": "2008-12-28T00:00:00",
20
+ // "Sizes": [
21
+ // "Small"
22
+ // ]
23
+ // }
24
+ ```
25
+
26
+ ## Deserialize JSON
27
+
28
+ ```csharp
29
+ string json = @"{
30
+ 'Name': 'Bad Boys',
31
+ 'ReleaseDate': '1995-4-7T00:00:00',
32
+ 'Genres': [
33
+ 'Action',
34
+ 'Comedy'
35
+ ]
36
+ }";
37
+
38
+ Movie m = JsonConvert.DeserializeObject<Movie>(json);
39
+
40
+ string name = m.Name;
41
+ // Bad Boys
42
+ ```
43
+
44
+ ## LINQ to JSON
45
+
46
+ ```csharp
47
+ JArray array = new JArray();
48
+ array.Add("Manual text");
49
+ array.Add(new DateTime(2000, 5, 23));
50
+
51
+ JObject o = new JObject();
52
+ o["MyArray"] = array;
53
+
54
+ string json = o.ToString();
55
+ // {
56
+ // "MyArray": [
57
+ // "Manual text",
58
+ // "2000-05-23T00:00:00"
59
+ // ]
60
+ // }
61
+ ```
62
+
63
+ ## Links
64
+
65
+ - [Homepage](https://www.newtonsoft.com/json)
66
+ - [Documentation](https://www.newtonsoft.com/json/help)
67
+ - [NuGet Package](https://www.nuget.org/packages/Newtonsoft.Json)
68
+ - [Release Notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
69
+ - [Contributing Guidelines](https://github.com/JamesNK/Newtonsoft.Json/blob/master/CONTRIBUTING.md)
70
+ - [License](https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md)
71
+ - [Stack Overflow](https://stackoverflow.com/questions/tagged/json.net)
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net20/Newtonsoft.Json.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f89b82c6b76816b17286951ba83201c71b6611f3e75e907552247dfc72034f2
3
+ size 580880
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net20/Newtonsoft.Json.xml ADDED
The diff for this file is too large to render. See raw diff
 
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net35/Newtonsoft.Json.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c69b18993d8236e5dfe3f0580a4392e7bc0b5f525911737318117c91d43b3ea5
3
+ size 515856
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net35/Newtonsoft.Json.xml ADDED
The diff for this file is too large to render. See raw diff
 
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net40/Newtonsoft.Json.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e6d1371d1aa774d155e9a4a89da32b87fd4928650f4d76a1cf68c8c88283693c
3
+ size 584976
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net40/Newtonsoft.Json.xml ADDED
The diff for this file is too large to render. See raw diff
 
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net45/Newtonsoft.Json.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1e27af7b07eeedf5ce71a9255f0422816a6fc5849a483c6714e1b472044fa9d
3
+ size 711952
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net45/Newtonsoft.Json.xml ADDED
The diff for this file is too large to render. See raw diff
 
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net6.0/Newtonsoft.Json.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22c649f75fce5be7c7ccda8880473b634ef69ecf33f5d1ab8ad892caf47d5a07
3
+ size 712464
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/net6.0/Newtonsoft.Json.xml ADDED
The diff for this file is too large to render. See raw diff
 
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/netstandard1.0/Newtonsoft.Json.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84623a0be7dd76da1c01b981c4d4d140c28bc2b9246131d2ce0e46f146961ea4
3
+ size 680720
DeepBattlerPlugin/packages/Newtonsoft.Json.13.0.3/lib/netstandard1.0/Newtonsoft.Json.xml ADDED
The diff for this file is too large to render. See raw diff