Skip to content

Commit

Permalink
feat: add great dark beyond support
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorMCesar committed Oct 10, 2024
1 parent 84e98a3 commit dd0ba67
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@
<TextBlock VerticalAlignment="Center" Text="{lex:LocText Key=Stats_Arena_Rewards_Label_Packs_PerilsInParadise, Suffix=' '}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding Path=PacksCountPerilsInParadise, Source={x:Static compiledStats:ArenaStats.Instance}, IsAsync=True}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="{lex:LocText Key=Stats_Arena_Rewards_Label_Packs_GreatDarkBeyond, Suffix=' '}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding Path=PacksCountGreatDarkBeyond, 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 @@ -90,5 +90,8 @@ public enum ArenaRewardPacks

[LocDescription("Enum_ArenaRewardPacks_PerilsInParadise")]
PerilsInParadise = CardSet.ISLAND_VACATION,

[LocDescription("Enum_ArenaRewardPacks_GreatDarkBeyond")]
GreatDarkBeyond = CardSet.SPACE,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,7 @@ public enum SetFilter
WHIZBANGS_WORKSHOP = 1897,
[LocDescription("MainWindow_DeckBuilder_Filter_Set_IslandVacation")]
ISLAND_VACATION = 1905,
[LocDescription("MainWindow_DeckBuilder_Filter_Set_GreatDarkBeyond")]
SPACE = 1935
}
}
1 change: 1 addition & 0 deletions Hearthstone Deck Tracker/Hearthstone/HearthDbConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public static class HearthDbConverter
{(int)CardSet.WILD_WEST, "Showdown in the Badlands" },
{(int)CardSet.WHIZBANGS_WORKSHOP, "Whizbang's Workshop" },
{(int)CardSet.ISLAND_VACATION, "Perils in Paradise" },
{(int)CardSet.SPACE, "Great Dark Beyond" },
{(int)CardSet.TB_DEV, "Tavern Brawl (Dev)"},
{(int)CardSet.EVENT, "Event" },
};
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 @@ -80,6 +80,8 @@ public class ArenaStats : INotifyPropertyChanged

public int PacksCountPerilsInParadise => GetFilteredRuns().Sum(x => x.Packs.Count(p => p == ArenaRewardPacks.PerilsInParadise));

public int PacksCountGreatDarkBeyond => GetFilteredRuns().Sum(x => x.Packs.Count(p => p == ArenaRewardPacks.GreatDarkBeyond));

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 dd0ba67

Please sign in to comment.