diff --git a/Graveyard/AnyfinView.cs b/Graveyard/AnyfinView.cs
index bb15902..caa9c20 100644
--- a/Graveyard/AnyfinView.cs
+++ b/Graveyard/AnyfinView.cs
@@ -1,9 +1,8 @@
-using System.Linq;
-using System.Windows;
-using System.Collections.Generic;
using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
-using HDT.Plugins.Graveyard.Resources;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows;
namespace HDT.Plugins.Graveyard
{
@@ -20,7 +19,7 @@ public static bool isValid()
public AnyfinView()
{
// Section Label
- Label.Text = Strings.Anyfin;
+ Label.Text = Strings.GetLocalized("Anyfin");
// Damage Label
_dmg = new HearthstoneTextBlock();
diff --git a/Graveyard/CavernsView.cs b/Graveyard/CavernsView.cs
index 93b6e77..294515d 100644
--- a/Graveyard/CavernsView.cs
+++ b/Graveyard/CavernsView.cs
@@ -1,11 +1,5 @@
-using HDT.Plugins.Graveyard.Resources;
-using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace HDT.Plugins.Graveyard
{
@@ -19,7 +13,7 @@ public static bool isValid()
public CavernsView()
{
// Section Label
- Label.Text = Strings.Caverns;
+ Label.Text = Strings.GetLocalized("Caverns");
}
public bool Update(Card card)
diff --git a/Graveyard/DeathrattleView.cs b/Graveyard/DeathrattleView.cs
index b2efbf5..01b26ab 100644
--- a/Graveyard/DeathrattleView.cs
+++ b/Graveyard/DeathrattleView.cs
@@ -1,11 +1,6 @@
-using HDT.Plugins.Graveyard.Resources;
-using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
-using System;
-using System.Collections.Generic;
using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace HDT.Plugins.Graveyard
{
@@ -14,6 +9,8 @@ public class DeathrattleView : NormalView
public static bool isValid()
{
return Core.Game.Player.PlayerCardList.FindIndex(card =>
+ card.Id == HearthDb.CardIds.Collectible.Hunter.JewelOfNzoth ||
+ card.Id == HearthDb.CardIds.Collectible.Neutral.Vectus ||
card.Id == HearthDb.CardIds.Collectible.Hunter.NineLives ||
card.Id == HearthDb.CardIds.Collectible.Neutral.DaUndatakah ||
card.Id == HearthDb.CardIds.Collectible.Priest.TwilightsCall
@@ -23,7 +20,7 @@ public static bool isValid()
public DeathrattleView()
{
// Section Label
- Label.Text = Strings.Deathrattle;
+ Label.Text = Strings.GetLocalized("Deathrattle");
}
public bool Update(Card card)
diff --git a/Graveyard/DiscardView.cs b/Graveyard/DiscardView.cs
index 40a273a..f2ff11d 100644
--- a/Graveyard/DiscardView.cs
+++ b/Graveyard/DiscardView.cs
@@ -1,4 +1,3 @@
-using HDT.Plugins.Graveyard.Resources;
using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
@@ -16,7 +15,7 @@ public static bool isValid()
public DiscardView()
{
// Section Label
- Label.Text = Strings.DiscardTitle;
+ Label.Text = Strings.GetLocalized("DiscardTitle");
}
public bool Update(Card card)
diff --git a/Graveyard/DragoncallerAlannaView.cs b/Graveyard/DragoncallerAlannaView.cs
index ef0f71c..0d0e629 100644
--- a/Graveyard/DragoncallerAlannaView.cs
+++ b/Graveyard/DragoncallerAlannaView.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using HDT.Plugins.Graveyard.Resources;
-using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
namespace HDT.Plugins.Graveyard
@@ -18,7 +12,7 @@ public static bool isValid()
public DragoncallerAlannaView()
{
- Label.Text = Strings.Alanna;
+ Label.Text = Strings.GetLocalized("Alanna");
}
public bool Update(Card card)
diff --git a/Graveyard/EnumToBoolConverter.cs b/Graveyard/EnumToBoolConverter.cs
new file mode 100644
index 0000000..db853b8
--- /dev/null
+++ b/Graveyard/EnumToBoolConverter.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace HDT.Plugins.Graveyard
+{
+ public class EnumToBoolConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return ((Enum)value).HasFlag((Enum)parameter);
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return value.Equals(true) ? parameter : Binding.DoNothing;
+ }
+ }
+}
diff --git a/Graveyard/Graveyard.cs b/Graveyard/Graveyard.cs
index 5ddd480..aa04c2b 100644
--- a/Graveyard/Graveyard.cs
+++ b/Graveyard/Graveyard.cs
@@ -36,6 +36,10 @@ public class Graveyard
public SoulwardenView Soulwarden;
public ZuljinView Zuljin;
public HoardPillagerView HoardPillager;
+ public LadyLiadrinView LadyLiadrin;
+ public NZothGotDView NZothGotD;
+ public RallyView Rally;
+ public SaurfangView Saurfang;
private StackPanel _friendlyPanel;
private StackPanel _enemyPanel;
@@ -54,7 +58,7 @@ public Graveyard()
// Create container
_friendlyPanel = new StackPanel();
- _friendlyPanel.Orientation = Orientation.Vertical;
+ _friendlyPanel.Orientation = Settings.Default.FriendlyOrientation;
Core.OverlayCanvas.Children.Add(_friendlyPanel);
Canvas.SetTop(_friendlyPanel, Settings.Default.PlayerTop);
Canvas.SetLeft(_friendlyPanel, Settings.Default.PlayerLeft);
@@ -82,6 +86,7 @@ public Graveyard()
//on year change clear out the grid and update the data
private void SettingsChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
+ _friendlyPanel.Orientation = Settings.Default.FriendlyOrientation;
_friendlyPanel.RenderTransform = new ScaleTransform(Settings.Default.FriendlyScale / 100, Settings.Default.FriendlyScale / 100);
_friendlyPanel.Opacity = Settings.Default.FriendlyOpacity / 100;
_enemyPanel.RenderTransform = new ScaleTransform(Settings.Default.EnemyScale / 100, Settings.Default.EnemyScale / 100);
@@ -288,6 +293,30 @@ public void Reset()
{
HoardPillager = null;
}
+ if (Settings.Default.LadyLiadrinEnabled && LadyLiadrinView.isValid())
+ {
+ LadyLiadrin = new LadyLiadrinView();
+ _friendlyPanel.Children.Add(LadyLiadrin);
+ }
+ else
+ {
+ LadyLiadrin = null;
+ }
+ if (Settings.Default.NZothGotDEnabled && NZothGotDView.isValid())
+ {
+ NZothGotD = new NZothGotDView();
+ _friendlyPanel.Children.Add(NZothGotD);
+ }
+ if (Settings.Default.RallyEnabled && RallyView.isValid())
+ {
+ Rally = new RallyView();
+ _friendlyPanel.Children.Add(Rally);
+ }
+ if (Settings.Default.SaurfangEnabled && SaurfangView.isValid())
+ {
+ Saurfang = new SaurfangView();
+ _friendlyPanel.Children.Add(Saurfang);
+ }
}
public void PlayerGraveyardUpdate(Card card)
@@ -302,7 +331,10 @@ public void PlayerGraveyardUpdate(Card card)
var kangor = Kangor?.Update(card) ?? false;
var witching = WitchingHour?.Update(card) ?? false;
var hoardpillager = HoardPillager?.Update(card) ?? false;
- if (!(any || deathrattle || nzoth || hadr || guldan || rez || mulch || kangor || witching || hoardpillager))
+ var nzothgotd = NZothGotD?.Update(card) ?? false;
+ var rally = Rally?.Update(card) ?? false;
+ var saurfang = Saurfang?.Update(card) ?? false;
+ if (!(any || deathrattle || nzoth || hadr || guldan || rez || mulch || kangor || witching || hoardpillager || nzothgotd || rally || saurfang))
{
Normal?.Update(card);
}
@@ -327,6 +359,7 @@ public void PlayerPlayUpdate(Card card)
Caverns?.Update(card);
TessGreymane?.Update(card);
Zuljin?.Update(card);
+ LadyLiadrin?.Update(card);
}
}
}
\ No newline at end of file
diff --git a/Graveyard/Graveyard.csproj b/Graveyard/Graveyard.csproj
index 2c9b371..580de1e 100644
--- a/Graveyard/Graveyard.csproj
+++ b/Graveyard/Graveyard.csproj
@@ -75,22 +75,28 @@
+
+
+
+
True
True
Strings.resx
+
+
@@ -123,15 +129,21 @@
1.6.5
+
+ 3.5.0
+
PublicResXFileCodeGenerator
Strings.Designer.cs
+ Designer
+
+
\ No newline at end of file
diff --git a/Graveyard/GraveyardPlugin.cs b/Graveyard/GraveyardPlugin.cs
index 23376ae..c56ff2d 100644
--- a/Graveyard/GraveyardPlugin.cs
+++ b/Graveyard/GraveyardPlugin.cs
@@ -1,19 +1,17 @@
+using Hearthstone_Deck_Tracker.Plugins;
using System;
using System.Reflection;
using System.Windows.Controls;
-using HDT.Plugins.Graveyard.Resources;
-using Hearthstone_Deck_Tracker.Plugins;
namespace HDT.Plugins.Graveyard
{
- public class GraveyardPlugin : IPlugin
+ public class GraveyardPlugin : IPlugin
{
public Graveyard GraveyardInstance;
public string Author => "RedHatter";
- public string ButtonText => Strings.Settings;
-
+ public string ButtonText => Strings.GetLocalized("Settings");
- public string Description => Strings.GraveyardDescription;
+ public string Description => Strings.GetLocalized("GraveyardDescription");
public MenuItem MenuItem => null;
public string Name => "Graveyard";
@@ -24,7 +22,7 @@ public void OnUnload()
{
Settings.Default.Save();
- GraveyardInstance.Dispose();
+ GraveyardInstance?.Dispose();
GraveyardInstance = null;
}
public void OnUpdate() { }
diff --git a/Graveyard/GuldanView.cs b/Graveyard/GuldanView.cs
index 99a0431..e373746 100644
--- a/Graveyard/GuldanView.cs
+++ b/Graveyard/GuldanView.cs
@@ -1,25 +1,32 @@
-using HDT.Plugins.Graveyard.Resources;
using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
+using static HearthDb.CardIds.Collectible;
namespace HDT.Plugins.Graveyard
{
public class GuldanView : NormalView
{
+ private ChancesTracker _chances = new ChancesTracker();
+
public static bool isValid()
{
- return Core.Game.Player.PlayerCardList.FindIndex(card => card.Id == HearthDb.CardIds.Collectible.Warlock.BloodreaverGuldan) > -1;
+ return Core.Game.Player.PlayerCardList.FindIndex(card => card.Id == Warlock.BloodreaverGuldan || card.Id == Warlock.KanrethadEbonlocke) > -1;
}
public GuldanView()
{
// Section Label
- Label.Text = Strings.Guldan;
+ Label.Text = Strings.GetLocalized("Guldan");
}
public bool Update(Card card)
{
- return card.Race == "Demon" && base.Update(card);
+ var update = card.Race == "Demon" && base.Update(card);
+
+ if (update)
+ _chances.Update(card, Cards, View);
+
+ return update;
}
}
}
diff --git a/Graveyard/HadronoxView.cs b/Graveyard/HadronoxView.cs
index ca91d72..f8c10b9 100644
--- a/Graveyard/HadronoxView.cs
+++ b/Graveyard/HadronoxView.cs
@@ -1,7 +1,6 @@
-using System.Linq;
-using HDT.Plugins.Graveyard.Resources;
using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
+using System.Linq;
namespace HDT.Plugins.Graveyard
{
@@ -15,7 +14,7 @@ public static bool isValid()
public HadronoxView()
{
// Section Label
- Label.Text = Strings.Hadronox;
+ Label.Text = Strings.GetLocalized("Hadronox");
}
public bool Update(Card card)
diff --git a/Graveyard/HoardPillagerView.cs b/Graveyard/HoardPillagerView.cs
index 5afc8ea..843f6ff 100644
--- a/Graveyard/HoardPillagerView.cs
+++ b/Graveyard/HoardPillagerView.cs
@@ -1,11 +1,5 @@
-using HDT.Plugins.Graveyard.Resources;
-using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace HDT.Plugins.Graveyard
{
@@ -21,7 +15,7 @@ public static bool isValid()
public HoardPillagerView()
{
- Label.Text = Strings.HoardPillager;
+ Label.Text = Strings.GetLocalized("HoardPillager");
}
public bool Update(Card card)
diff --git a/Graveyard/KangorView.cs b/Graveyard/KangorView.cs
index ef90aa0..27d7d86 100644
--- a/Graveyard/KangorView.cs
+++ b/Graveyard/KangorView.cs
@@ -1,11 +1,5 @@
-using HDT.Plugins.Graveyard.Resources;
-using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace HDT.Plugins.Graveyard
{
@@ -19,12 +13,12 @@ public static bool isValid()
public KangorView()
{
// Section Label
- Label.Text = Strings.Kangor;
+ Label.Text = Strings.GetLocalized("Kangor");
}
public bool Update(Card card)
{
- return (card.Race == "Mech" || card.Id == HearthDb.CardIds.Collectible.Neutral.NightmareAmalgam) && base.Update(card);
+ return (card.Race == "Mech" || card.Race == "All") && base.Update(card);
}
}
}
diff --git a/Graveyard/LadyLiadrinView.cs b/Graveyard/LadyLiadrinView.cs
new file mode 100644
index 0000000..7572d73
--- /dev/null
+++ b/Graveyard/LadyLiadrinView.cs
@@ -0,0 +1,74 @@
+using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker.Hearthstone;
+using System.Collections.Generic;
+using static HearthDb.CardIds.Collectible;
+
+namespace HDT.Plugins.Graveyard
+{
+ public class LadyLiadrinView : NormalView
+ {
+ public static readonly List SpellList = new List
+ {
+ // 0
+ Paladin.ForbiddenHealing,
+ // 1
+ Paladin.Adaptation,
+ Paladin.BlessingOfMightLegacy,
+ Paladin.BlessingOfWisdom,
+ Paladin.DivineStrength,
+ Paladin.HandOfProtectionLegacy,
+ //Paladin.Humility
+ Paladin.SandBreath,
+ Paladin.ShieldOfHonor,
+ // 2
+ Paladin.DarkConviction,
+ Paladin.FlashOfLight,
+ Paladin.HandOfAdal,
+ Paladin.HolyLightLegacy,
+ Paladin.LibramOfWisdom,
+ Paladin.LightforgedBlessing,
+ Paladin.PotionOfHeroism,
+ Paladin.SealOfLight,
+ Paladin.SoundTheBells,
+ //Paladin.Subdue
+ // 3
+ Paladin.GiftOfLuminance,
+ Paladin.SealOfChampions,
+ // 4
+ Paladin.BlessingOfKingsLegacy,
+ //Paladin.HammerOfWrath,
+ Paladin.SilvermoonPortal,
+ // 5
+ Paladin.BlessedChampion,
+ Paladin.BlessingOfAuthority,
+ //Paladin.HolyWrath,
+ // 6
+ //?Paladin.Righteousness, all minions
+ //?Paladin.ShrinkRay, all minions
+ //?Paladin.LevelUp, all minions
+ Paladin.PharaohsBlessing,
+ Paladin.SpikeridgedSteed,
+ // 8
+ Paladin.Dinosize,
+ Paladin.LayOnHands,
+ // 9
+ Paladin.LibramOfHope,
+ };
+
+ public static bool isValid()
+ {
+ return Core.Game.Player.PlayerCardList.FindIndex(card => card.Id == HearthDb.CardIds.Collectible.Paladin.LadyLiadrin) > -1;
+ }
+
+ public LadyLiadrinView()
+ {
+ // Section Label
+ Label.Text = Strings.GetLocalized("LadyLiadrin");
+ }
+
+ public bool Update(Card card)
+ {
+ return card.Type == "Spell" && SpellList.Contains(card.Id) && base.Update(card, true);
+ }
+ }
+}
diff --git a/Graveyard/MulchmuncherView.cs b/Graveyard/MulchmuncherView.cs
index 5b71ef0..ca5026a 100644
--- a/Graveyard/MulchmuncherView.cs
+++ b/Graveyard/MulchmuncherView.cs
@@ -1,11 +1,5 @@
-using HDT.Plugins.Graveyard.Resources;
-using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace HDT.Plugins.Graveyard
{
@@ -19,7 +13,7 @@ public static bool isValid()
public MulchmuncherView()
{
// Section Label
- Label.Text = Strings.Mulchmuncher;
+ Label.Text = Strings.GetLocalized("Mulchmuncher");
}
public bool Update(Card card)
diff --git a/Graveyard/NZothGotDView.cs b/Graveyard/NZothGotDView.cs
new file mode 100644
index 0000000..e24d006
--- /dev/null
+++ b/Graveyard/NZothGotDView.cs
@@ -0,0 +1,33 @@
+using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker.Hearthstone;
+using System.Linq;
+
+namespace HDT.Plugins.Graveyard
+{
+ public class NZothGotDView : NormalView
+ {
+ private ChancesTracker _chances = new ChancesTracker();
+
+ public static bool isValid()
+ {
+ return Core.Game.Player.PlayerCardList.FindIndex(card => card.Id == HearthDb.CardIds.Collectible.Neutral.NzothGodOfTheDeep) > -1;
+ }
+
+ public NZothGotDView()
+ {
+ // Section Label
+ Label.Text = Strings.GetLocalized("NZothGotD");
+ }
+
+ public bool Update(Card card)
+ {
+ if ((card.Race != null || card.Type == "Minion" && WitchingHourView.ChooseOne.Contains(card.Id)) && base.Update(card))
+ {
+ _chances.Update(card, Cards, View);
+
+ return true;
+ }
+ return false;
+ }
+ }
+}
diff --git a/Graveyard/NZothView.cs b/Graveyard/NZothView.cs
index 32a7c7b..64dd694 100644
--- a/Graveyard/NZothView.cs
+++ b/Graveyard/NZothView.cs
@@ -1,7 +1,6 @@
-using System.Linq;
-using HDT.Plugins.Graveyard.Resources;
using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
+using System.Linq;
namespace HDT.Plugins.Graveyard
{
@@ -9,14 +8,13 @@ public class NZothView : NormalView
{
public static bool isValid()
{
- return Core.Game.Player.PlayerCardList.FindIndex(card => card.Id == HearthDb.CardIds.Collectible.Neutral.NzothTheCorruptor
- || card.Id == HearthDb.CardIds.NonCollectible.Neutral.NzothTheCorruptor) > -1;
+ return Core.Game.Player.PlayerCardList.FindIndex(card => card.Id == HearthDb.CardIds.Collectible.Neutral.NzothTheCorruptor) > -1;
}
public NZothView()
{
// Section Label
- Label.Text = Strings.NZoth;
+ Label.Text = Strings.GetLocalized("NZoth");
}
public bool Update(Card card)
diff --git a/Graveyard/NormalView.cs b/Graveyard/NormalView.cs
index 075f89b..5b39c8e 100644
--- a/Graveyard/NormalView.cs
+++ b/Graveyard/NormalView.cs
@@ -1,11 +1,10 @@
+using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker.Controls;
+using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
-using System.Collections.Generic;
-using Hearthstone_Deck_Tracker;
-using Hearthstone_Deck_Tracker.Controls;
using Card = Hearthstone_Deck_Tracker.Hearthstone.Card;
-using HDT.Plugins.Graveyard.Resources;
namespace HDT.Plugins.Graveyard
{
@@ -23,7 +22,7 @@ public NormalView()
Label = new HearthstoneTextBlock();
Label.FontSize = 16;
Label.TextAlignment = TextAlignment.Center;
- Label.Text = Strings.Graveyard;
+ Label.Text = Strings.GetLocalized("Graveyard");
var margin = Label.Margin;
margin.Top = 20;
Label.Margin = margin;
@@ -47,13 +46,12 @@ public bool Update(Card card, bool isSpell = false)
var match = Cards.FirstOrDefault(c => c.Name == card.Name);
if (match != null)
{
- Cards.Remove(match);
- card = match.Clone() as Card;
- card.Count++;
+ match.Count++;
+ }
+ else
+ {
+ Cards.Add(card.Clone() as Card);
}
-
- // Update View
- Cards.Add(card);
View.Update(Cards, false);
Label.Visibility = Visibility.Visible;
diff --git a/Graveyard/Properties/AssemblyInfo.cs b/Graveyard/Properties/AssemblyInfo.cs
index 725c47a..5f8d843 100644
--- a/Graveyard/Properties/AssemblyInfo.cs
+++ b/Graveyard/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Graveyard")]
-[assembly: AssemblyCopyright("Copyright © 2020")]
+[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.8.3.0")]
-[assembly: AssemblyFileVersion("1.8.3.0")]
+[assembly: AssemblyVersion("1.8.11.0")]
+[assembly: AssemblyFileVersion("1.8.11.0")]
diff --git a/Graveyard/RallyView.cs b/Graveyard/RallyView.cs
new file mode 100644
index 0000000..112ecdf
--- /dev/null
+++ b/Graveyard/RallyView.cs
@@ -0,0 +1,34 @@
+using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker.Hearthstone;
+
+namespace HDT.Plugins.Graveyard
+{
+ public class RallyView : NormalView
+ {
+ private ChancesTracker _chances = new ChancesTracker();
+
+ public static bool isValid()
+ {
+ return AlwaysSeparate && Core.Game.Player.PlayerCardList.FindIndex(card =>
+ card.Id == HearthDb.CardIds.Collectible.Neutral.Rally) > -1;
+ }
+
+ public static bool AlwaysSeparate => Settings.Default.AlwaysRallySeparately || !Settings.Default.ResurrectEnabled; // This is iffy
+
+ public RallyView()
+ {
+ // Section Label
+ Label.Text = Strings.GetLocalized("Rally");
+ }
+
+ public bool Update(Card card)
+ {
+ var update = card.Type == "Minion" && card.Cost >= 1 && card.Cost <= 3 && base.Update(card);
+
+ if (update)
+ _chances.Update(card, Cards, View);
+
+ return update;
+ }
+ }
+}
diff --git a/Graveyard/Resources/Strings.Designer.cs b/Graveyard/Resources/Strings.Designer.cs
index 58d9e4d..bebf28d 100644
--- a/Graveyard/Resources/Strings.Designer.cs
+++ b/Graveyard/Resources/Strings.Designer.cs
@@ -78,6 +78,24 @@ public static string AlannaDescription {
}
}
+ ///
+ /// Looks up a localized string similar to Always Rally! separately.
+ ///
+ public static string AlwaysRallySeparately {
+ get {
+ return ResourceManager.GetString("AlwaysRallySeparately", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Show a separate view for Rally! even when the Resurrect view is active.
+ ///
+ public static string AlwaysRallySeparatelyDescription {
+ get {
+ return ResourceManager.GetString("AlwaysRallySeparatelyDescription", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Anyfin.
///
@@ -190,13 +208,13 @@ public static string Graveyard {
/// Looks up a localized string similar to Displays minions that have died this game. Includes specialized displays:
///- Deathrattle minions (Nine Lives/Da Undatakah/Twilight's Call/N'Zoth)
///- Taunt minions (Hadronox)
- ///- Demons (Bloodreaver Gul'dan)
+ ///- Demon deaths (Bloodreaver Gul'dan/Kanrethad Ebonlocke)
///- Resurrection chance (Catrina Muerte/Mass Resurrection/Wild Priest cards)
///- Murloc minions with a damage calculator for Anyfin Can Happen
///- Discard retrieve chance (Soulwarden/Cruel Dinomancer)
///- Treant deaths (Mulchmuncher)
///- Mech deaths (Kangor's Endless Army)
- ///- 5-cost spells (Dragoncaller Alann [rest of string was truncated]";.
+ ///- Spells [rest of string was truncated]";.
///
public static string GraveyardDescription {
get {
@@ -205,7 +223,7 @@ public static string GraveyardDescription {
}
///
- /// Looks up a localized string similar to Bloodreaver Gul'dan.
+ /// Looks up a localized string similar to Demons.
///
public static string Guldan {
get {
@@ -214,7 +232,7 @@ public static string Guldan {
}
///
- /// Looks up a localized string similar to When the deck contains 'Bloodreaver Gul'dan', show demons that have died.
+ /// Looks up a localized string similar to When the deck contains 'Bloodreaver Gul'dan' or 'Kanrethad Ebonlocke', show demons that have died.
///
public static string GuldanDescription {
get {
@@ -258,6 +276,15 @@ public static string HoardPillagerDescription {
}
}
+ ///
+ /// Looks up a localized string similar to Horizontal.
+ ///
+ public static string Horizontal {
+ get {
+ return ResourceManager.GetString("Horizontal", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Kangor's Endless Army.
///
@@ -294,6 +321,24 @@ public static string KazakusDescription {
}
}
+ ///
+ /// Looks up a localized string similar to Lady Liadrin.
+ ///
+ public static string LadyLiadrin {
+ get {
+ return ResourceManager.GetString("LadyLiadrin", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to When the deck contains 'Lady Liadrin', show all spells cast on friendly characters this game..
+ ///
+ public static string LadyLiadrinDescription {
+ get {
+ return ResourceManager.GetString("LadyLiadrinDescription", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Lock Graveyards.
///
@@ -322,7 +367,7 @@ public static string MulchmuncherDescription {
}
///
- /// Looks up a localized string similar to N'Zoth.
+ /// Looks up a localized string similar to N'Zoth, the Corruptor.
///
public static string NZoth {
get {
@@ -339,6 +384,24 @@ public static string NZothDescription {
}
}
+ ///
+ /// Looks up a localized string similar to N'Zoth, God of the Deep.
+ ///
+ public static string NZothGotD {
+ get {
+ return ResourceManager.GetString("NZothGotD", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to When the deck contains 'N'Zoth, God of the Deep', show all minions, with a specific type, that have died.
+ ///
+ public static string NZothGotDDescription {
+ get {
+ return ResourceManager.GetString("NZothGotDDescription", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Opacity.
///
@@ -366,6 +429,42 @@ public static string OpponentDescription {
}
}
+ ///
+ /// Looks up a localized string similar to Orientation.
+ ///
+ public static string Orientation {
+ get {
+ return ResourceManager.GetString("Orientation", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Vertical or Horizontal view stacking.
+ ///
+ public static string OrientationDescription {
+ get {
+ return ResourceManager.GetString("OrientationDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Rally!.
+ ///
+ public static string Rally {
+ get {
+ return ResourceManager.GetString("Rally", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to When the deck contains 'Rally!', show the resurrect chance of friendly 1, 2 and 3 cost minions that have died.
+ ///
+ public static string RallyDescription {
+ get {
+ return ResourceManager.GetString("RallyDescription", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Resurrect.
///
@@ -384,6 +483,24 @@ public static string ResurrectDescription {
}
}
+ ///
+ /// Looks up a localized string similar to Overlord Saurfang.
+ ///
+ public static string Saurfang {
+ get {
+ return ResourceManager.GetString("Saurfang", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to When the deck contains 'Overload Saurfang', show summon chance of Frenzy minions that have died..
+ ///
+ public static string SaurfangDescription {
+ get {
+ return ResourceManager.GetString("SaurfangDescription", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Scale.
///
@@ -474,6 +591,15 @@ public static string Unlock {
}
}
+ ///
+ /// Looks up a localized string similar to Vertical.
+ ///
+ public static string Vertical {
+ get {
+ return ResourceManager.GetString("Vertical", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Witching Hour.
///
diff --git a/Graveyard/Resources/Strings.resx b/Graveyard/Resources/Strings.resx
index bdcc810..5f9dc5a 100644
--- a/Graveyard/Resources/Strings.resx
+++ b/Graveyard/Resources/Strings.resx
@@ -123,6 +123,12 @@
When the deck contains 'Dragoncaller Alanna', show spells that cost 5 or more that have been played.
+
+ Always Rally! separately
+
+
+ Show a separate view for Rally! even when the Resurrect view is active
+
Anyfin
@@ -163,21 +169,23 @@
Displays minions that have died this game. Includes specialized displays:
- Deathrattle minions (Nine Lives/Da Undatakah/Twilight's Call/N'Zoth)
- Taunt minions (Hadronox)
-- Demons (Bloodreaver Gul'dan)
+- Demon deaths (Bloodreaver Gul'dan/Kanrethad Ebonlocke)
- Resurrection chance (Catrina Muerte/Mass Resurrection/Wild Priest cards)
- Murloc minions with a damage calculator for Anyfin Can Happen
- Discard retrieve chance (Soulwarden/Cruel Dinomancer)
- Treant deaths (Mulchmuncher)
- Mech deaths (Kangor's Endless Army)
-- 5-cost spells (Dragoncaller Alanna)
+- Spells cast (Lady Lianna/Zul'jin/Dragoncaller Alanna)
- Beast minions resummon chance (Witching Hour)
-- Minions played count (The Caverns Below)
+- Minions played count (The Caverns Below)
+- Other class cards played (Tess Greymane)
+- Battlecry cards played (Shudderwock)
- Bloodreaver Gul'dan
+ Demons
- When the deck contains 'Bloodreaver Gul'dan', show demons that have died
+ When the deck contains 'Bloodreaver Gul'dan' or 'Kanrethad Ebonlocke', show demons that have died
Hadronox
@@ -191,6 +199,9 @@
When the deck contains 'Hoard Pillager' or 'Rummaging Kobold', show equip/return chance of weapons used this game.
+
+ Horizontal
+
Kangor's Endless Army
@@ -203,6 +214,12 @@
Also display for resurrect chances with Kazakus.
+
+ Lady Liadrin
+
+
+ When the deck contains 'Lady Liadrin', show all spells cast on friendly characters this game.
+
Lock Graveyards
@@ -213,11 +230,17 @@
When the deck contains at least one 'Mulchmuncher', count Treants that have died
- N'Zoth
+ N'Zoth, the Corruptor
When the deck contains 'N'Zoth, the Corruptor', show the deathrattle minions that have died
+
+ N'Zoth, God of the Deep
+
+
+ When the deck contains 'N'Zoth, God of the Deep', show all minions, with a specific type, that have died
+
Opacity
@@ -227,12 +250,30 @@
All enemy minions that have died
+
+ Orientation
+
+
+ Vertical or Horizontal view stacking
+
+
+ Rally!
+
+
+ When the deck contains 'Rally!', show the resurrect chance of friendly 1, 2 and 3 cost minions that have died
+
Resurrect
When the deck contains 'Resurrect', 'Onyx Bishop', 'Eternal Servitude', or 'Lesser Diamond Spellstone', show the resurrect chance of friendly minions that have died
+
+ Overlord Saurfang
+
+
+ When the deck contains 'Overload Saurfang', show summon chance of Frenzy minions that have died.
+
Scale
@@ -263,6 +304,9 @@
Unlock Graveyards
+
+ Vertical
+
Witching Hour
diff --git a/Graveyard/Resources/Strings.zh-CN.resx b/Graveyard/Resources/Strings.zh-CN.resx
new file mode 100644
index 0000000..dd96a92
--- /dev/null
+++ b/Graveyard/Resources/Strings.zh-CN.resx
@@ -0,0 +1,287 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 巨龙召唤者奥兰纳
+
+
+ 如果卡组中包含巨龙召唤者奥兰纳,显示所有打出过的5费或以上的法术牌
+
+
+ 亡者归来
+
+
+ 如果卡组中包含亡者归来,显示所有死亡的鱼人并显示最小和最大的伤害值
+
+
+ 探索地下洞穴
+
+
+ 如果卡组中包含探索地下洞穴,计算所有打出的随从数
+
+
+ 亡语
+
+
+ 如果卡组中包含暮光召唤,显示所有死亡的亡语随从
+
+
+ 弃牌
+
+
+ 如果卡组中包含残暴的恐龙术士,显示所有被弃掉的友方随从及其复活概率
+
+
+ 被弃掉的随从
+
+
+ 友方墓地显示设置
+
+
+ 所有死亡的友方随从
+
+
+ 墓地
+
+
+ 显示本局对战中死亡的随从。包含以下特殊计数器:
+- 亡语随从(九命兽魂/送葬者安德提卡/暮光召唤/恩佐斯)
+- 嘲讽随从(哈多诺克斯)
+- 恶魔(鲜血掠夺者古尔丹)
+- 复活几率(亡者卡特琳娜/群体复活/各类狂野牧师复活卡)
+- 鱼人及一个亡者归来伤害计算器
+- 弃置的牌及其回归概率(护魂者/残暴的恐龙术士)
+- 树人死亡数量(植被破碎机)
+- 机械随从(坎格尔的无尽大军)
+- 5费及以上的法术(巨龙召唤者奥兰纳)
+- 野兽复活几率(巫术时刻)
+- 随从打出数量(探索地下洞穴)
+
+
+ 恶魔
+
+
+ 如果卡组中包含鲜血掠夺者古尔丹或坎雷萨德·埃伯洛克,显示所有死亡的恶魔及其概率
+
+
+ 哈多诺克斯
+
+
+ 如果卡组中包含哈多诺克斯,显示所有死亡的嘲讽随从
+
+
+ 使用过的武器
+
+
+ 如果卡组中包含藏宝匪贼或狗头人拾荒者,显示所有使用过的武器及其概率
+
+
+ 坎格尔的无尽大军
+
+
+ 如果卡组中包含坎格尔的无尽大军,显示所有死亡的机械随从及其复活概率
+
+
+ 卡扎库斯
+
+
+ 显示卡扎库斯药水的所有复活概率
+
+
+ 女伯爵莉亚德琳
+
+
+ 如果卡座中有伯爵夫人莉亚德琳伯爵夫人,出示所有您用友善角色打过的咒语牌
+
+
+ 锁定位置
+
+
+ 植被破碎机
+
+
+ 如果卡组中包含至少一张植被破碎机,计算所有死亡的树人数量
+
+
+ 恩佐斯
+
+
+ 如果卡组中包含恩佐斯,显示所有死亡的亡语随从
+
+
+ 恩佐斯,深渊之神
+
+
+ 不透明度
+
+
+ 对手墓地显示设置
+
+
+ 所有死亡的敌方随从
+
+
+ 复活池
+
+
+ 如果卡组中包含复活术、玛瑙主教、永恒奴役、小型法术钻石或群体复活,显示所有死亡的友方随从及其复活概率
+
+
+ 大小
+
+
+ 设置
+
+
+ 墓地设置
+
+
+ 沙德沃克
+
+
+ 如果卡组包含沙德沃克,显示所有打出过的战吼随从
+
+
+ 护魂者
+
+
+ 如果卡组中包含护魂者,显示所有被弃掉的牌及其重新置入手牌概率
+
+
+ 苔丝·格雷迈恩
+
+
+ 如果卡组中包含苔丝·格雷迈恩,显示所有使用过的其他职业的卡牌
+
+
+ 调整位置
+
+
+ 巫术时刻
+
+
+ 如果卡组中包含巫术时刻,显示所有死亡的友方野兽及其复活概率
+
+
+ 祖尔金
+
+
+ 如果卡组中包含祖尔金,显示所有打出过的法术牌
+
+
\ No newline at end of file
diff --git a/Graveyard/ResurrectView.cs b/Graveyard/ResurrectView.cs
index 9b90d9a..4f60beb 100644
--- a/Graveyard/ResurrectView.cs
+++ b/Graveyard/ResurrectView.cs
@@ -1,4 +1,3 @@
-using HDT.Plugins.Graveyard.Resources;
using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
@@ -11,6 +10,8 @@ public class ResurrectView : NormalView
public static bool isValid()
{
return Core.Game.Player.PlayerCardList.FindIndex(card =>
+ (card.Id == HearthDb.CardIds.Collectible.Neutral.Rally && !RallyView.AlwaysSeparate) ||
+ card.Id == HearthDb.CardIds.Collectible.Priest.RaiseDead ||
card.Id == HearthDb.CardIds.Collectible.Priest.Psychopomp ||
card.Id == HearthDb.CardIds.Collectible.Neutral.BodyWrapper ||
card.Id == HearthDb.CardIds.Collectible.Priest.MassResurrection ||
@@ -26,7 +27,7 @@ public static bool isValid()
public ResurrectView()
{
// Section Label
- Label.Text = Strings.Resurrect;
+ Label.Text = Strings.GetLocalized("Resurrect");
}
public bool Update(Card card)
diff --git a/Graveyard/SaurfangView.cs b/Graveyard/SaurfangView.cs
new file mode 100644
index 0000000..b5787fb
--- /dev/null
+++ b/Graveyard/SaurfangView.cs
@@ -0,0 +1,33 @@
+using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker.Hearthstone;
+using System.Linq;
+
+namespace HDT.Plugins.Graveyard
+{
+ public class SaurfangView : NormalView
+ {
+ private ChancesTracker _chances = new ChancesTracker();
+
+ public static bool isValid()
+ {
+ return Core.Game.Player.PlayerCardList.FindIndex(card => card.Id == HearthDb.CardIds.Collectible.Warrior.OverlordSaurfang) > -1;
+ }
+
+ public SaurfangView()
+ {
+ Label.Text = Strings.GetLocalized("Saurfang");
+ }
+
+ public bool Update(Card card)
+ {
+ if (!((card.Text?.Contains("Frenzy:") ?? false) && base.Update(card)))
+ {
+ return false;
+ }
+
+ _chances.Update(card, Cards, View);
+
+ return true;
+ }
+ }
+}
diff --git a/Graveyard/Settings.Designer.cs b/Graveyard/Settings.Designer.cs
index bf9e707..3ad37ad 100644
--- a/Graveyard/Settings.Designer.cs
+++ b/Graveyard/Settings.Designer.cs
@@ -12,7 +12,7 @@ namespace HDT.Plugins.Graveyard {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")]
public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -358,5 +358,77 @@ public bool HoardPillagerEnabled {
this["HoardPillagerEnabled"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool LadyLiadrinEnabled {
+ get {
+ return ((bool)(this["LadyLiadrinEnabled"]));
+ }
+ set {
+ this["LadyLiadrinEnabled"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool NZothGotDEnabled {
+ get {
+ return ((bool)(this["NZothGotDEnabled"]));
+ }
+ set {
+ this["NZothGotDEnabled"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool RallyEnabled {
+ get {
+ return ((bool)(this["RallyEnabled"]));
+ }
+ set {
+ this["RallyEnabled"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool AlwaysRallySeparately {
+ get {
+ return ((bool)(this["AlwaysRallySeparately"]));
+ }
+ set {
+ this["AlwaysRallySeparately"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("Vertical")]
+ public global::System.Windows.Controls.Orientation FriendlyOrientation {
+ get {
+ return ((global::System.Windows.Controls.Orientation)(this["FriendlyOrientation"]));
+ }
+ set {
+ this["FriendlyOrientation"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool SaurfangEnabled {
+ get {
+ return ((bool)(this["SaurfangEnabled"]));
+ }
+ set {
+ this["SaurfangEnabled"] = value;
+ }
+ }
}
}
diff --git a/Graveyard/Settings.settings b/Graveyard/Settings.settings
index 8530df7..cb87235 100644
--- a/Graveyard/Settings.settings
+++ b/Graveyard/Settings.settings
@@ -86,5 +86,23 @@
True
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ Vertical
+
+
+ True
+
\ No newline at end of file
diff --git a/Graveyard/SettingsView.xaml b/Graveyard/SettingsView.xaml
index 8eb976b..3680c06 100644
--- a/Graveyard/SettingsView.xaml
+++ b/Graveyard/SettingsView.xaml
@@ -5,7 +5,10 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:local="clr-namespace:HDT.Plugins.Graveyard"
- xmlns:resources="clr-namespace:HDT.Plugins.Graveyard.Resources"
+ xmlns:lex="http://wpflocalizeextension.codeplex.com"
+ lex:LocalizeDictionary.DesignCulture="en"
+ lex:ResxLocalizationProvider.DefaultAssembly="Graveyard"
+ lex:ResxLocalizationProvider.DefaultDictionary="Strings"
mc:Ignorable="d" VerticalScrollBarVisibility="Auto">
@@ -32,110 +35,185 @@
-
+
+
+
+
-
+
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
-
+
-
+ Style="{StaticResource ScaleSliderStyle}"
+ Value="{Binding EnemyScale, Source={x:Static local:Settings.Default}}"/>
+
+
+
+
+
+
+
diff --git a/Graveyard/SettingsView.xaml.cs b/Graveyard/SettingsView.xaml.cs
index f5d3a75..f177057 100644
--- a/Graveyard/SettingsView.xaml.cs
+++ b/Graveyard/SettingsView.xaml.cs
@@ -1,8 +1,12 @@
+using Hearthstone_Deck_Tracker;
+using MahApps.Metro.Controls;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
using System.Windows;
using System.Windows.Controls;
-using MahApps.Metro.Controls;
-using Hearthstone_Deck_Tracker;
-using HDT.Plugins.Graveyard.Resources;
+using WPFLocalizeExtension.Engine;
namespace HDT.Plugins.Graveyard
{
@@ -27,7 +31,7 @@ private static Flyout CreateSettingsFlyout()
var settings = new Flyout();
settings.Position = Position.Left;
Panel.SetZIndex(settings, 100);
- settings.Header = Strings.SettingsTitle;
+ settings.Header = Strings.GetLocalized("SettingsTitle");
settings.Content = new SettingsView();
Core.MainWindow.Flyouts.Items.Add(settings);
return settings;
@@ -36,11 +40,12 @@ private static Flyout CreateSettingsFlyout()
public SettingsView()
{
InitializeComponent();
- Settings.Default.PropertyChanged += (sender, e) => Settings.Default.Save();
}
+ public IEnumerable OrientationTypes => Enum.GetValues(typeof(Orientation)).Cast();
+
private void BtnUnlock_Click (object sender, RoutedEventArgs e) {
- BtnUnlock.Content = Graveyard.Input.Toggle() ? Strings.Lock : Strings.Unlock;
+ BtnUnlock.Content = Graveyard.Input.Toggle() ? Strings.GetLocalized("Lock") : Strings.GetLocalized("Unlock");
}
}
}
diff --git a/Graveyard/ShudderwockView.cs b/Graveyard/ShudderwockView.cs
index e348da2..87272c2 100644
--- a/Graveyard/ShudderwockView.cs
+++ b/Graveyard/ShudderwockView.cs
@@ -1,11 +1,6 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using HDT.Plugins.Graveyard.Resources;
-using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
+using System.Linq;
namespace HDT.Plugins.Graveyard
{
@@ -18,7 +13,7 @@ public static bool isValid()
public ShudderwockView()
{
- Label.Text = Strings.Shudderwock;
+ Label.Text = Strings.GetLocalized("Shudderwock");
}
public bool Update(Card card)
diff --git a/Graveyard/SoulwardenView.cs b/Graveyard/SoulwardenView.cs
index ea26b4e..ffa6cb7 100644
--- a/Graveyard/SoulwardenView.cs
+++ b/Graveyard/SoulwardenView.cs
@@ -1,11 +1,5 @@
-using HDT.Plugins.Graveyard.Resources;
-using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace HDT.Plugins.Graveyard
{
@@ -23,7 +17,7 @@ public static bool isValid()
public SoulwardenView()
{
// Section Label
- Label.Text = Strings.Soulwarden;
+ Label.Text = Strings.GetLocalized("Soulwarden");
}
public bool Update(Card card)
diff --git a/Graveyard/Strings.cs b/Graveyard/Strings.cs
new file mode 100644
index 0000000..f0fc3c5
--- /dev/null
+++ b/Graveyard/Strings.cs
@@ -0,0 +1,9 @@
+using WPFLocalizeExtension.Engine;
+
+namespace HDT.Plugins.Graveyard
+{
+ public class Strings
+ {
+ public static string GetLocalized(string key) => LocalizeDictionary.Instance.GetLocalizedObject("Graveyard", "Strings", key, LocalizeDictionary.Instance.Culture)?.ToString();
+ }
+}
diff --git a/Graveyard/TessGreymaneView.cs b/Graveyard/TessGreymaneView.cs
index 7cff06f..575f256 100644
--- a/Graveyard/TessGreymaneView.cs
+++ b/Graveyard/TessGreymaneView.cs
@@ -12,7 +12,7 @@ public static bool isValid()
public TessGreymaneView()
{
- Label.Text = "Tess Greymane";
+ Label.Text = Strings.GetLocalized("TessGreymane");
}
public bool Update(Card card)
diff --git a/Graveyard/WitchingHourView.cs b/Graveyard/WitchingHourView.cs
index 24176b2..7442666 100644
--- a/Graveyard/WitchingHourView.cs
+++ b/Graveyard/WitchingHourView.cs
@@ -1,11 +1,6 @@
-using HDT.Plugins.Graveyard.Resources;
-using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
-using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace HDT.Plugins.Graveyard
{
@@ -13,7 +8,7 @@ public class WitchingHourView : NormalView
{
private ChancesTracker _chances = new ChancesTracker();
- private static readonly List ChooseOne = new List
+ internal static readonly List ChooseOne = new List
{
HearthDb.CardIds.Collectible.Druid.DruidOfTheSaber,
HearthDb.CardIds.Collectible.Druid.DruidOfTheSwarm,
@@ -22,6 +17,7 @@ public class WitchingHourView : NormalView
HearthDb.CardIds.Collectible.Druid.WardruidLoti,
HearthDb.CardIds.Collectible.Druid.Shellshifter,
HearthDb.CardIds.Collectible.Druid.DruidOfTheClaw,
+ HearthDb.CardIds.Collectible.Druid.DruidOfTheFang, // Honorary "choose one" for beast purposes
};
public static bool isValid()
@@ -32,7 +28,7 @@ public static bool isValid()
public WitchingHourView()
{
// Section Label
- Label.Text = Strings.WitchingHour;
+ Label.Text = Strings.GetLocalized("WitchingHour");
}
public bool Update(Card card)
diff --git a/Graveyard/ZuljinView.cs b/Graveyard/ZuljinView.cs
index 4e177f4..8f3b3ad 100644
--- a/Graveyard/ZuljinView.cs
+++ b/Graveyard/ZuljinView.cs
@@ -1,11 +1,5 @@
-using HDT.Plugins.Graveyard.Resources;
-using Hearthstone_Deck_Tracker;
+using Hearthstone_Deck_Tracker;
using Hearthstone_Deck_Tracker.Hearthstone;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace HDT.Plugins.Graveyard
{
@@ -18,7 +12,7 @@ public static bool isValid()
public ZuljinView()
{
- Label.Text = Strings.Zuljin;
+ Label.Text = Strings.GetLocalized("Zuljin");
}
public bool Update(Card card)
diff --git a/Graveyard/app.config b/Graveyard/app.config
index 49cc43e..eadb11f 100644
--- a/Graveyard/app.config
+++ b/Graveyard/app.config
@@ -1,3 +1,114 @@
+
+
+
+
+
+
+
+
+ 100
+
+
+ 100
+
+
+ 100
+
+
+ 100
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ Vertical
+
+
+ True
+
+
+
\ No newline at end of file
diff --git a/lib/HearthDb.dll b/lib/HearthDb.dll
index 408401d..780da28 100644
Binary files a/lib/HearthDb.dll and b/lib/HearthDb.dll differ
diff --git a/lib/HearthstoneDeckTracker.exe b/lib/HearthstoneDeckTracker.exe
index 6dc0f0d..7e932d0 100644
Binary files a/lib/HearthstoneDeckTracker.exe and b/lib/HearthstoneDeckTracker.exe differ
diff --git a/update-libraries.ps1 b/update-libraries.ps1
index e72ded5..aa5acf8 100644
--- a/update-libraries.ps1
+++ b/update-libraries.ps1
@@ -1,4 +1,16 @@
-md -Force $PSScriptRoot\lib | Out-Null
+mkdir -Force $PSScriptRoot\lib | Out-Null
+
+"Looking for Hearthstone Deck Tracker install..."
+$HDTPath = "$Env:LOCALAPPDATA\HearthstoneDeckTracker"
+if(Test-Path $HDTPath)
+{
+ $HDTExe = Get-ChildItem "$Env:LOCALAPPDATA\HearthstoneDeckTracker" | Where-Object { $_.PSIsContainer -and $_.Name.StartsWith("app-")} | Sort-Object CreationTime -desc | Select-Object -f 1 | Get-ChildItem | Where-Object { $_.Name.Equals("HearthstoneDeckTracker.exe")}
+ if($HDTExe.Exists)
+ {
+ "Copying $($HDTExe.Name) v$($HDTExe.VersionInfo.FileVersion)... "
+ Copy-Item $HDTExe.FullName "$PSScriptRoot\lib\$($HDTExe.Name)" -Force
+ }
+}
function FetchLib($name) {
"Fetching $name..."