RedHatter / Graveyard

A plugin for the Hearthstone Deck Tracker that displays minions that have died.
39 stars 22 forks source link

Attempt to add Shirvallah mana tracking (and Xyrella hero DR) #63

Open PotofGross opened 2 years ago

batstyx commented 2 years ago

https://github.com/batstyx/Graveyard/releases includes Xyrella if that helps. Unfortunately, the Shirvallah view is more complicated to implement than what you’ve done so far, mainly because of Librams, but also because of the limitations of the HDT card view (it only shows a count of <10).

PotofGross commented 2 years ago

I see. Got any suggestions for me to revise?

batstyx commented 2 years ago

You'll need a custom UI to display Shirvallah's current cost and you'll have to write custom code to handle all the different ways that spell card costs can be modified (eg Librams, Stonehearth Vindicator, Ice Trap, Frostbite, Cult Neophyte, Far Watch Post etc). It might be that some of this can be extracted from HDT rather than calculated but the plugin card event API doesn't provide it.

IMHO the amount of required to get Shirvallah working reliably exceeds the benefit. YMMV obvs.

PotofGross commented 2 years ago

You caught me! I don't have any experience with C#; I used what I know of C++ and what you and RedHatter have done to get close. I use Sublime Text 3 and I couldn't find out a C# compiler that worked at the time. Also I was under the assumption that casting costs were tracked because of the interaction between Naga Sand Witch and Dragoncaller Alanna. I'd also forgotten the 9+ restriction.

All that being said, it's kind of a passion project of mine as Holy Wrath Paladin is my most played deck for several expansions now, so if you can please link me the HDT API documentation, I am willing to find a way to get mileage out of this.

batstyx commented 2 years ago

I suspect Dragoncaller Alanna only seems to work all the time because no one uses it with cards cheaper than 5 in the first place!

My curiousity got the better of me so in the end it seemed quicker to write the basics than try to explain them https://github.com/batstyx/Graveyard/releases/tag/v1.9.4.3010. I think I can also push the changes I made to your code back to the pull request but I'm not 100% sure where they'll go.

I cheated slightly and while it displays a modified cost it only refreshes because it also updates the count to get around some caching issues. Definitely requires a custom ui but in my brief tests it seemed useable enough in its current form.

The HDT API is one of those "the API is the documentation" APIs afaik ¯\(ツ)

If you want to seriously look at plugins you'll want to take a look at the HDT source code to get an idea of how it does stuff. The API is pretty dumb compared to what it does internally unfortunately. I'd download Visual Studio Community. You can use VS Code, JetBrains Rider etc but I don't know they support .NET Framework 4.# anywhere near as well.

PotofGross commented 2 years ago

Idk where the push went either but I was able to simply git pull from your branch. I made a comment about the count/cost on your code, but I see that you gave your reasoning here. You're awesome. Thanks for the guidance and the headstart!! Means a ton.