bru7us / HS-DeckTrack

A Terminal-based Deck Tracker for Hearthstone
MIT License
19 stars 2 forks source link

Tracking of friendly cards with a choice (Wrath, Druid of the Claw, etc) #3

Open bru7us opened 10 years ago

bru7us commented 10 years ago

Looks like the minions and spell differ a little too.

Druid of the Claw (should also cover Ancient of War, etc): [Zone] ZoneChangeList.ProcessChanges() - id=36 local=False [name=Druid of the Claw id=109 zone=PLAY zonePos=0 cardId=EX1_165t2 player=1] zone from -> FRIENDLY PLAY [Zone] ZoneChangeList.ProcessChanges() - id=36 local=False [name=Druid of the Claw id=23 zone=SETASIDE zonePos=1 cardId=EX1_165 player=1] zone from FRIENDLY PLAY ->

Nourish (Should also cover mark of nature etc): [Zone] ZoneChangeList.ProcessChanges() - id=6 local=True [name=Nourish id=20 zone=HAND zonePos=1 cardId=EX1_164 player=1] zone from FRIENDLY HAND -> [Zone] ZoneChangeList.ProcessChanges() - id=46 local=False [name=Nourish id=20 zone=GRAVEYARD zonePos=0 cardId=EX1_164 player=1] zone from -> FRIENDLY GRAVEYARD

Wrath: [Zone] ZoneChangeList.ProcessChanges() - id=8 local=True [name=Wrath id=43 zone=HAND zonePos=7 cardId=EX1_154 player=1] zone from FRIENDLY HAND -> [Zone] ZoneChangeList.ProcessChanges() - id=59 local=False [name=Wrath id=43 zone=GRAVEYARD zonePos=0 cardId=EX1_154 player=1] zone from -> FRIENDLY GRAVEYARD

bru7us commented 10 years ago

Spell are already covered by the existing regex:

204     if (/^\[Zone.*\[name=(.*) id=.*zone=(HAND|PLAY).* FRIENDLY HAND /) {
205       $hero_played_hash{$1} += 1;
206     }

...so it seems to just be the minions that are not tracked as being 'played' (they are still drawn out of the deck fine)

bru7us commented 10 years ago

I grabbed the above logs from a windows instance, but it looks like it logs slightly differently on the Mac platform. I identified another related bug that if you put a "choice" card on the field, but draw it back before making your decision, it still records as if it were played.

Further testing required on Mac before coding out of this one!