├── version.bat ├── version.py ├── Measure.md ├── FaceOnly.sln ├── LICENSE ├── README.md ├── src ├── Properties │ └── AssemblyInfo.cs ├── view │ ├── Mask.xaml.cs │ └── Mask.xaml ├── FaceOnly.cs ├── FaceOnly.csproj └── utils │ └── MathConverter.cs ├── .gitattributes └── .gitignore /version.bat: -------------------------------------------------------------------------------- 1 | python version.py 2 | -------------------------------------------------------------------------------- /version.py: -------------------------------------------------------------------------------- 1 | import re 2 | import codecs 3 | 4 | 5 | def replace(fname, regexs): 6 | # Read in the file 7 | with codecs.open(fname, 'r', 'utf-8') as file: 8 | content = file.read() 9 | 10 | # Replace the target string 11 | if not isinstance(regexs, list): 12 | regexs = [regexs] 13 | 14 | for rFrom, rTo in regexs: 15 | content = re.sub(rFrom, rTo, content) 16 | 17 | # Write the file out again 18 | with codecs.open(fname, 'w', 'utf-8') as file: 19 | file.write(content) 20 | 21 | print('Replaced ' + fname) 22 | 23 | version = input('Enter version:').strip() 24 | 25 | if input('The version is {v}, are you sure? (y/n)'.format(v=version)) == 'y': 26 | replace('src/Properties/AssemblyInfo.cs', (r'Version\(".*"\)','Version("'+version+'")')) 27 | replace('src/FaceOnly.cs', (r'Version\(.*\)','Version('+version.replace('.',', ')+')')) 28 | -------------------------------------------------------------------------------- /Measure.md: -------------------------------------------------------------------------------- 1 | Measure the hero position from screenshot 2 | 3 | These data from my screenshot with 1825x1027: 4 | 5 | ![image](https://cloud.githubusercontent.com/assets/11247099/24271072/c1ec43c2-1052-11e7-96dc-845b3d4dc9a3.png) 6 | 7 | *(If you can offer a 2K/4K screenshot please contact me, much appreciated.)* 8 | 9 | | Subject | Measured(px) | Rate to Window Height | Scale | 10 | | ------- | -----------: | --------------------- | ----- | 11 | | Window Height   | 1027 | 1 12 | | Height | 178 | 0.173320351 13 | | Width | 162 | 0.157740993 14 | | Top | 95 | 0.092502434 15 | | Curve Height | 86 | 0.083739046 | 0.00097371 16 | | Midline offset | 4 | 0.003894839 17 | | mHeight | 152 | 0.148003894 18 | | mWidth | 112 | 0.109055501 19 | | mMargin | 19 | 0.018500486 20 | | mTop | 40 | 0.038948393 21 | | mWidth+ | 131 | 0.127555988 22 | | mHeight- | 134 | 0.130477117 23 | -------------------------------------------------------------------------------- /FaceOnly.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FaceOnly", "src/FaceOnly.csproj", "{DE1874B3-3A3A-49F2-BE26-A8DA7E22A086}" 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 | {DE1874B3-3A3A-49F2-BE26-A8DA7E22A086}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {DE1874B3-3A3A-49F2-BE26-A8DA7E22A086}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {DE1874B3-3A3A-49F2-BE26-A8DA7E22A086}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {DE1874B3-3A3A-49F2-BE26-A8DA7E22A086}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Anthony Fu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, 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, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FaceOnly 2 | FaceOnly is a plugin for the [Hearthstone Deck Tracker](https://github.com/HearthSim/Hearthstone-Deck-Tracker). 3 | 4 | FaceOnly covers your opponent's minions so that you can focus on **FACE**!! 5 | It's just a toy for face decks, inspired from [this reddit](https://www.reddit.com/r/hearthstone/comments/30b5dn/how_to_play_face_hunter_properly/). 6 | 7 | * **Face Decks** Works best with face decks. 8 | 9 | * **Taunt** minions can be seen. 10 | 11 | * **Toggle** Toggle button is just next to your opponent's hero. 12 | 13 | ![demo](https://cloud.githubusercontent.com/assets/11247099/25041166/c0aaa8b0-2140-11e7-861b-df02ca1ce975.png) 14 | 15 | ## Install 16 | 17 | ### Download 18 | [**Releases**](https://github.com/antfu/FaceOnly/releases) 19 | 20 | #### Install Method 1: drag and drop 21 | 1. Open `Options -> Tracker -> Plugins` 22 | 1. Drag the downloaded FaceOnly.dll into the plugins window 23 | 1. (Re-)start HDT 24 | 1. Enable the plugin in `Options -> Tracker -> Plugins`. 25 | 26 | #### Install Method 2: Manual 27 | 1. Open `Options -> Tracker -> Plugins -> Plugins Folder.` 28 | 1. Copy the downloaded FaceOnly.dll into the folder. 29 | 1. (Re-)start HDT. 30 | 1. Enable the plugin in `Options -> Tracker -> Plugins`. 31 | If the plugin does not show up in that list, right click the `FaceOnly.dll`, go into Properties and click `Unblock` at the bottom. 32 | 33 | See more [Awesome Available Plugins](https://github.com/HearthSim/Hearthstone-Deck-Tracker/wiki/Available-Plugins). 34 | 35 | ## Todo 36 | - Color select 37 | - Opacity adjustment 38 | - Textures, better looking 39 | 40 | ## License 41 | MIT 42 | -------------------------------------------------------------------------------- /src/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("FaceOnly")] 9 | [assembly: AssemblyDescription("A funny toy for face attacking decks. *Plugin for HearthstoneDeckTracker.")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FaceOnly")] 13 | [assembly: AssemblyCopyright("Copyright © Anthony Fu 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("de1874b3-3a3a-49f2-be26-a8da7e22a086")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("0.0.4")] 35 | [assembly: AssemblyVersion("0.0.4")] 36 | [assembly: AssemblyFileVersion("0.0.4")] 37 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /src/view/Mask.xaml.cs: -------------------------------------------------------------------------------- 1 | using Hearthstone_Deck_Tracker; 2 | using Hearthstone_Deck_Tracker.API; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Data; 10 | using System.Windows.Documents; 11 | using System.Windows.Input; 12 | using System.Windows.Media; 13 | using System.Windows.Media.Imaging; 14 | using System.Windows.Navigation; 15 | using System.Windows.Shapes; 16 | 17 | namespace HDT.Plugins.FaceOnly 18 | { 19 | /// 20 | /// Interaction logic for Mask.xaml 21 | /// 22 | public partial class Mask : UserControl 23 | { 24 | private bool _masked = false; 25 | private bool _defaultStatus = false; 26 | private bool _hoverOnToggler = false; 27 | private SolidColorBrush _color; 28 | private SolidColorBrush _trans; 29 | private List