Skip to content

Commit

Permalink
Update for Rise of Shadows
Browse files Browse the repository at this point in the history
  • Loading branch information
azeier committed Apr 4, 2019
1 parent 003d065 commit 2202358
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<Canvas x:Key="set_troll" Clip="M 72,72 L 200,72 200,200 72,200 72,72 Z">
<Path Data="m20.454 4.2526c-2.7317 0.03395-4.6488 0.74517-4.6488 0.74517l-0.9431 4.1682 0.69505 0.89349-0.24805 1.34-1.2904-1.588s-0.3089-1.2755-0.58963-4.2933c-3.7196 0.77199-6.3867 2.1053-6.3867 2.1053 1.7826 2.3033 1.7158 10.574 1.418 12.361 0.74438 0.44663 3.5238 2.4319 3.5238 2.4319s0.34714-0.14884 0.74414 3.0272c4.0693 1.588 6.8978-0.34727 6.8978-0.34727s-0.19844-2.1341-0.19844-2.5807 1.4887-1.1913 4.8633-2.2831c-1.3399-5.0618-0.27283-9.4534 1.2408-15.185-1.5973-0.55053-3.146-0.76188-4.5207-0.7922-0.18902-0.00417-0.37496-0.00485-0.55707-0.00259zm0.31368 10.918 1.2656 1.5632s1.315 2.3576-1.3648 3.5982c-2.467 1.1421-3.4737-0.54622-3.4737-0.54622l-0.9927-1.7368zm-9.5777 1.4392 3.1264 3.0272s-0.54583 1.1415-1.7368 1.1911c-1.464 0.07444-1.5632-2.0345-1.5632-2.0345zm19.18 1.5632c0.1985 1.8858-0.76899 4.094-2.2081 4.9377-1.4391 0.84364-2.1773-0.72065-3.176-0.94258-0.89326-0.1985-3.8215 1.5384-3.8215 1.5384-0.64513 2.5805 1.861 4.7639 4.6152 5.1609 2.4386 0.35152 4.6648-0.64504 6.4513-3.4241 1.7865-2.779-0.39691-6.3275-1.8609-7.2704zm-15.111 2.2086 1.712 1.6376s0.62282 0.62494-0.19844 0.76894c-0.44663 0.04963-1.1559 0.20103-1.6872 0.0248-0.60873-0.2019-0.28166-0.67007-0.19895-1.1911zm-13.449 0.14883c-2.6302 6.0047 1.4392 8.9322 4.4664 9.0811 3.0272 0.14888 4.9109-4.4648 4.516-5.6074-0.42309-1.2242-2.5807-2.2335-2.5807-2.2335-1.588 2.5805-2.5308 2.3575-3.4489 2.3823-0.79401-0.07444-2.0595-0.2976-2.9528-3.6225z" Fill="{Binding Path=Fill, ElementName=DeckSetIcons}" RenderTransform="1,0,0,1,72,72" />
</Canvas>
<Canvas x:Key="set_shadows" Clip="M 72,72 L 200,72 200,200 72,200 72,72 Z">
<Canvas x:Key="set_dalaran" Clip="M 72,72 L 200,72 200,200 72,200 72,72 Z">
<Path Data="m25.079 4.5818s-7.5537 7.0638-10.657 9.3504c-3.1032 2.2866-7.1862 3.7157-10.289 3.7157-0.12249 2.2049-2.4091 5.839-2.4091 5.839 1.8374-1.6741 5.2264-2.695 9.3504-4.8182 1.9599 2.0824 4.9931 2.9981 7.6356 1.7559 3.3998-1.5982 3.5928-6.043 3.062-7.717 0.89829-0.7758 2.7961-1.6358 2.7961-1.6358s0.28098-0.13808 0.79736 2.6566c0.16332 5.6347-3.4708 9.636-8.0031 10.33-4.5323 0.69413-8.6564-2.6131-8.6564-2.6131s-0.81652 0.24486-1.9598 0.8165c1.7558 2.8582 8.5339 3.7567 8.5339 3.7567l2.5724 3.2663s2.0008-2.3683 2.9807-4.1649c1.1433-0.3879 3.9236-1.4079 6.1248-4.8586 2.0902-3.2768 1.5514-10.494 1.5514-10.494s0.65317-0.32658 3.6339-1.3065c-2.4499-2.6949-7.0638-3.8792-7.0638-3.8792zm-6.043 9.7179s1.3167 2.0149-0.44897 2.8992c-1.539 0.77077-2.4502-1.1433-2.4502-1.1433z" Fill="{Binding Path=Fill, ElementName=DeckSetIcons}" RenderTransform="1,0,0,1,72,72" />
</Canvas>
</UserControl.Resources>
Expand Down Expand Up @@ -208,5 +208,13 @@
<VisualBrush Stretch="Uniform" Visual="{StaticResource set_troll}" />
</Rectangle.Fill>
</Rectangle>
<Rectangle Name="RectIconDalaran" ToolTip="{lex:Loc DeckSetIcons_Tooltip_Dalaran}">
<Rectangle.Visibility>
<Binding Path="Deck" Converter="{StaticResource SetIconVisibilityConverter}" ConverterParameter="{x:Static enums:CardSet.DALARAN}"/>
</Rectangle.Visibility>
<Rectangle.Fill>
<VisualBrush Stretch="Uniform" Visual="{StaticResource set_dalaran}" />
</Rectangle.Fill>
</Rectangle>
</WrapPanel>
</UserControl>
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
<TextBlock VerticalAlignment="Center" Text="{lex:LocText Key=Stats_Arena_Rewards_Label_Packs_Troll, Suffix=' '}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding Path=PacksCountTroll, Source={x:Static compiledStats:ArenaStats.Instance}, IsAsync=True}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="{lex:LocText Key=Stats_Arena_Rewards_Label_Packs_Dalaran, Suffix=' '}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding Path=PacksCountDalaran, Source={x:Static compiledStats:ArenaStats.Instance}, IsAsync=True}"/>
</StackPanel>
</StackPanel>
</StackPanel>
<Rectangle Height="Auto" Width="1" Fill="{DynamicResource TextBrush}"/>
Expand Down
3 changes: 3 additions & 0 deletions Hearthstone Deck Tracker/Enums/ArenaRewardPacks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@ public enum ArenaRewardPacks

[LocDescription("Enum_ArenaRewardPacks_Troll")]
Troll = CardSet.TROLL,

[LocDescription("Enum_ArenaRewardPacks_Dalaran")]
Dalaran = CardSet.DALARAN,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,7 @@ public enum SetFilter
BOOMSDAY = 1127,
[LocDescription("MainWindow_DeckBuilder_Filter_Set_Troll")]
TROLL = 1129,
[LocDescription("MainWindow_DeckBuilder_Filter_Set_Dalaran")]
DALARAN = 1130,
}
}
3 changes: 2 additions & 1 deletion Hearthstone Deck Tracker/Hearthstone/HearthDbConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public static class HearthDbConverter
{1004, "Kobolds and Catacombs"},
{1125, "The Witchwood"},
{1127, "The Boomsday Project"},
{1129, "Rastakhan's Rumble"}
{1129, "Rastakhan's Rumble"},
{1130, "Rise of Shadows"}
};

public static string ConvertClass(CardClass cardClass) => (int)cardClass < 2 || (int)cardClass > 10
Expand Down
2 changes: 2 additions & 0 deletions Hearthstone Deck Tracker/Stats/CompiledStats/ArenaStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public class ArenaStats : INotifyPropertyChanged

public int PacksCountTroll => GetFilteredRuns().Sum(x => x.Packs.Count(p => p == ArenaRewardPacks.Troll));

public int PacksCountDalaran => GetFilteredRuns().Sum(x => x.Packs.Count(p => p == ArenaRewardPacks.Dalaran));

public int PacksCountTotal => GetFilteredRuns().Sum(x => x.PackCount);

public double PacksCountAveragePerRun => Math.Round(GetFilteredRuns(requireAnyReward: true).Select(x => x.PackCount).DefaultIfEmpty(0).Average(), 2);
Expand Down

0 comments on commit 2202358

Please sign in to comment.