HearthSim/HSTracker

Curses not counting

Eppin opened this issue · 5 comments

Eppin commented

Describe the bug
While looking through the 'Player tracker'-settings I saw the 'Show Abyssal counter' setting, which doesn't seem to be working.

To Reproduce
Play a Curse-card during a game.

Game mode

  • Standard
  • Wild
  • Classic
  • Arena
  • Battlegrounds
  • Duels
  • Mercenaries
  • Tavern Brawl
  • Dungeon Run/Book of Heroes/Book of Mercenaries
  • Single Player

Expected behavior
Abyssal curse counter to increase (and shown).

Additional context
Looking at the Power.log and the code, I've got a feeling that something has changed. Because from what I see is that, the code is expecting the curses to be in a line containing BLOCK_END (https://github.com/HearthSim/HSTracker/blob/master/HSTracker/Logging/Parsers/PowerGameStateParser.swift#L903,L929). However, I saw that it's in the BLOCK_START

Here's a part of the Power.log:

D 20:18:04.3073170 GameState.DebugPrintPower() - META_DATA - Meta=SLUSH_TIME Data=200 InfoCount=1
D 20:18:04.3073170 GameState.DebugPrintPower() -             Info[0] = [entityName=Mature Wildseed id=129 zone=PLAY zonePos=0 cardId=REV_360t1e player=2]
D 20:18:04.3073170 GameState.DebugPrintPower() - BLOCK_START BlockType=TRIGGER Entity=[entityName=Abyssal Curse id=139 zone=HAND zonePos=3 cardId=TSC_955t player=2] EffectCardId=System.Collections.Generic.List`1[System.String] EffectIndex=0 Target=0 SubOption=-1 TriggerKeyword=349
D 20:18:04.3073170 GameState.DebugPrintPower() -     SUB_SPELL_START - SpellPrefabGUID=TSCFX_AbyssalCurse_Impact_Super:9c3984b010928944b93b9ec0df28f62a Source=0 TargetCount=1
D 20:18:04.3073170 GameState.DebugPrintPower() -                       Targets[0] = [entityName=Giantstalker Rexxar id=86 zone=PLAY zonePos=0 cardId=HERO_05e player=2]
D 20:18:04.3073170 GameState.DebugPrintPower() -         META_DATA - Meta=TARGET Data=0 InfoCount=1

If you think I could be right, I can try to fix it (have some little Swift experience) :-)

I just test it against AI and it is working there. Can you double check if that works as expected?

Eppin commented

Ah, I found it. The issue seems to be full screen vs windowed. When playing in full screen I don't see the Curse counter, but when I uncheck the 'Fullscreen' in HS, I do see the counter.

So it seems the code for counting/detecting if a curse is played it correct, but displaying it in full screen seems to be not working properly.

Must mean that the SizeHelper function didn't take into account the proper coordinates for full screen.

Figured out the issue. It was due to the XIB using NSWindow instead of NSPael. I will have it fixed on the next version.

Eppin commented

Thank you very much!