Skip to content

Commit

Permalink
feat: don't consider Battlegrounds heroes that are locked
Browse files Browse the repository at this point in the history
  • Loading branch information
beheh committed Dec 13, 2024
1 parent c4cbf2e commit 1143b54
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
*Abominable Bowman, All Fel Breaks Loose, Amulet of Undying, Animate Dead, Anyfin Can Happen, Bloodreaver Gul'dan, Body Wrapper, Bonecaller, Boneshredder, Catrina Muerte, Counterfeit Blade, Da Undatakah, Defense Attorney Nathanos, Eternal Servitude, Habeas Corpses, Hadronox, Infantry Reanimator, Jewel of N'Zoth, Lesser Diamond Spell Stone, Mass Resurrection, N'Zoth, God of the Deep, N'Zoth, The Corruptor, Onyx Bishop, Psychopomp, Raise Dead, Rally!, Resurrect, Revive Pet, Tamsin's Phylactery, Tomb Lurker, Twilight's Call, Unending Swarm, Vectus, Witching Hour, Xyrella, the Devout*

**Battlegrounds**:
- Added counters for Beetles stats, Spells played and Undead attack bonus.
- Fixed Tier7 hero picking stats not updating when rerolling a skin.
- Fixed the last games in the session widget showing the wrong hero when a skin was rerolled.
- Added counters for Beetle stats, Spells played and the the Undead attack bonus.
- Fixed the latest games in the session recap showing the wrong hero after rerolling a skin.
- Fixed Tier7 hero pick stats not updating when rerolling a skin.
- Fixed Tier7 hero pick stats showing for the locked heroes.

## **Release v1.37.5 - 2024-12-03**
**Updated for Hearthstone 31.2.0**
Expand Down
4 changes: 2 additions & 2 deletions Hearthstone Deck Tracker/GameEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,7 @@ private async void HandleBattlegroundsStart()
for(var i = 0; i < 10; i++)
{
await Task.Delay(500);
heroes = Core.Game.Player.PlayerEntities.Where(x => x.IsHero && (x.HasTag(BACON_HERO_CAN_BE_DRAFTED) || x.HasTag(BACON_SKIN))).ToList();
heroes = Core.Game.Player.PlayerEntities.Where(x => x.IsHero && (x.HasTag(BACON_HERO_CAN_BE_DRAFTED) || x.HasTag(BACON_SKIN)) && !x.HasTag(BACON_LOCKED_MULLIGAN_HERO)).ToList();
if(heroes.Count() >= 2)
break;
}
Expand Down Expand Up @@ -1622,7 +1622,7 @@ async Task WaitAndAppear()
private int battlegroundsHeroPickingLatch = 0;
private async Task RefreshBattlegroundsHeroPickStats()
{
var heroes = Core.Game.Player.PlayerEntities.Where(x => x.IsHero && (x.HasTag(BACON_HERO_CAN_BE_DRAFTED) || x.HasTag(BACON_SKIN))).ToList();
var heroes = Core.Game.Player.PlayerEntities.Where(x => x.IsHero && (x.HasTag(BACON_HERO_CAN_BE_DRAFTED) || x.HasTag(BACON_SKIN)) && !x.HasTag(BACON_LOCKED_MULLIGAN_HERO)).ToList();

// refresh the offered heroes
_game.SnapshotBattlegroundsOfferedHeroes(heroes);
Expand Down
2 changes: 1 addition & 1 deletion Hearthstone Deck Tracker/Windows/OverlayWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ internal void ShowBgsTopBar()
IEnumerable<string> heroPowers = _game.Player.Board.Where(x => x.IsHeroPower).Select(x => x.Card.Id);
if(!heroPowers.Any() && _game.GameEntity?.GetTag(GameTag.STEP) <= (int)Step.BEGIN_MULLIGAN)
{
var heroes = Core.Game.Player.PlayerEntities.Where(x => x.IsHero && (x.HasTag(GameTag.BACON_HERO_CAN_BE_DRAFTED) || x.HasTag(GameTag.BACON_SKIN)));
var heroes = Core.Game.Player.PlayerEntities.Where(x => x.IsHero && (x.HasTag(GameTag.BACON_HERO_CAN_BE_DRAFTED) || x.HasTag(GameTag.BACON_SKIN)) && !x.HasTag(GameTag.BACON_LOCKED_MULLIGAN_HERO));
heroPowers = heroes.Select(x => Database.GetCardFromDbfId(x.GetTag(GameTag.HERO_POWER), collectible: false)?.Id ?? "");
}
BattlegroundsMinionsVM.OnHeroPowers(heroPowers);
Expand Down

0 comments on commit 1143b54

Please sign in to comment.