demilich1 / metastone

Hearthstone simulator written in Java with full GUI support
GNU General Public License v2.0
132 stars 80 forks source link

Mean Streets of Gadgetzhan #266

Closed webadict closed 7 years ago

webadict commented 7 years ago

Well, looks like another update. Luckily, I managed to get all the cards added, and functional (Except for Kazakus... But I have NO idea how that's going to work here. Sometimes, I think they add some cards to make this project harder...)

So, I've got to add the following:

Along with these changes, I'm going to try to implement the following:

DominusMaximus commented 7 years ago

Good stuff, looking forward to those new cards. Kazakus seems tricky. This link has useful notes on it: http://hearthstone.gamepedia.com/Kazakus

I'm guessing a straightforward way would be to create a card for each of the 135 combinations, similar to how you've handled Fandral by creating a card for each of his "choose one" combinations. I don't program much so I don't know how you would handle the bit that says "...the game automatically presents certain effects in the order that is best for the player...", or how you would combine the 3 successive discover effects into choosing one of the 135 cards.

On a different note, a reminder on the recent changes to Murlocs: http://www.hearthpwn.com/news/1812-hearthstone-patch-15181-murloc-card-changes-bug

webadict commented 7 years ago

As far as I can tell, each of the 135 combinations is actually programmed into the game, but that's just a guess. It IS possible to make a spell that actually creates cards with custom effects. In fact, that would probably be easier (Kinda. It would certainly create better customization, overall.) They likely just had the effects placed in order of priority (Transform > Damage > Summon > Heal, for example), so making it work with a custom spell class is completely doable. Now... extending that to hit more is the tricky part, but I might be able to do it. Who knows?

Also, I already got the Murloc update.

webadict commented 7 years ago

I might actually need to do a custom spell for that, since there are rumors that the other tri-class legendaries are going to be "Discover a custom weapon" and "Discover a custom minion", which might all be doable, cool enough. The only issue is that these cards could have unfortunate issues with cards that copy based on their names... Hmmm...

DominusMaximus commented 7 years ago

What do you mean by cards that copy based on their names? Also, in your prior comment, what did you mean by "extending that to hit more"?

webadict commented 7 years ago

Eh, maybe I'm just paranoid. Sometimes I get mixed up with what spells do what, so it might not be an issue.

The extending to hit more is that I have a vision for this spell, and I can extend that vision to make it better. At first, I assumed "Maybe this is 135 spells", but then I thought that might be fairly complex for this... So, instead, I came up with something else:

DominusMaximus commented 7 years ago

A custom spell sounds very nice. The "choose one" template seems like a good starting point. For example, if you have Kazakus in hand, you will see 3 different cards you can play (similar to Keeper of the Grove, which shows up as 2 cards):

Summon: Kazakus (Create a 1-Cost spell) Summon: Kazakus (Create a 5-Cost spell) Summon: Kazakus (Create a 10-Cost spell)

Those 3 would be listed within the Kazakus json as "options", with each pointing to a unique discover spell (similar to Raven Idol, but that will also utilize your custom spell code).

About that order of operation, from this post by Mike Donais it doesn't seem like there will be an order to which they are presented (I understand why you would want to do so): https://np.reddit.com/r/hearthstone/comments/5b5mlg/the_mean_prerelease_reveal_chart_all_currently/d9mnjzu/

From his description it seems like the order of the two effects are fixed afterwards. The reason I bring this up is that, depending on how many effects need to be ordered in the first place, wouldn't ordering their appearance affect their odds? For example, if only 2 of the 10 effects happen to be sensitive to ordering, and neither of them come up randomly within the first discovery, would you eliminate their chance to appear in the second discovery depending on what was first chosen?

webadict commented 7 years ago

Hmm... no, that would fail double battlecries. It was a good idea though. I might just add it as part of the custom spell, which is regrettable, but oh well. I'll see what I can do.

On Nov 10, 2016 1:18 AM, "DominusMaximus" notifications@github.com wrote:

A custom spell sounds very nice. The "choose one" template seems like a good starting point. For example, if you have Kazakus in hand, you will see 3 different cards you can play (similar to Keeper of the Grove, which shows up as 2 cards):

Summon: Kazakus (Create a 1-Cost spell) Summon: Kazakus (Create a 5-Cost spell) Summon: Kazakus (Create a 10-Cost spell)

Those 3 would be listed within the Kazakus json as "options", with each pointing to a unique discover spell (similar to Raven Idol, but that will also utilize your custom spell code).

About that order of operation, from this post by Mike Donais it doesn't seem like there will be an order to which they are presented (I understand why you would want to do so): https://np.reddit.com/r/ hearthstone/comments/5b5mlg/the_mean_prereleasereveal chart_all_currently/d9mnjzu/

From his description it seems like the order of the two effects are fixed afterwards. The reason I bring this up is that, depending on how many effects need to be ordered in the first place, wouldn't ordering their appearance affect their odds? For example, if only 2 of the 10 effects happen to be sensitive to ordering, and neither of them come up randomly within the first discovery, would you eliminate their chance to appear in the second discovery depending on what was first chosen?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/demilich1/metastone/issues/266#issuecomment-259618581, or mute the thread https://github.com/notifications/unsubscribe-auth/AFsY_nRPxRpb-Bp07OsY3mVh47KSVudUks5q8sUrgaJpZM4KszqK .

webadict commented 7 years ago

Also, I wouldn't order their appearance. Instead, I would order the operation afterward. For example, I present the bot with 6 possible spell effects: Transform All > Damage All > Heal Hero > Heal All > Damage Enemy Hero > Summon Token There are 6 possible choices to begin with, but they are currently ordered. So, I could choose the Summon Token and the Damage Enemy Hero effects. It doesn't matter what order I choose them in; it will create the spell with Damage Enemy Hero, then Summon Token. Giving the components in operational order should make this happen fairly effectively.

DominusMaximus commented 7 years ago

Ok I see what you're saying. That handles it nicely.

webadict commented 7 years ago

I already regret my decision to make this customizable.

webadict commented 7 years ago

I no longer regret my decision. Holy crap, it works!

DominusMaximus commented 7 years ago

:-) awesome. Sounded like you had hit a major roadblock.

webadict commented 7 years ago

Kazakus is now 100% functional. The only pieces I need are his remaining spells. I will also add a way to view the cards that show up. Because I'm awesome.

I only needed to add like 10 more Spell Args, 3 more Parser Args, 2 more Parse Util Types...

webadict commented 7 years ago

He's also available to play immediately, if you want to compile commit_stream4.

DominusMaximus commented 7 years ago

How do I compile a specific commit stream?

webadict commented 7 years ago

https://github.com/webadict/metastone/tree/commit_stream4 This is the most up-to-date branch.

DominusMaximus commented 7 years ago

I was able to compile it, but I couldn't find Kazakus within the deck builder, or by searching for it within sandbox mode. I am able to see other Mean Street cards though.

webadict commented 7 years ago

Are you building a Mage, Priest, or Warlock deck? Because he is a Tri-class card.

DominusMaximus commented 7 years ago

I tried that. I'm also able to see other tri-class cards. In any case, when adding a card to the hand within sandbox mode, all class cards should come up within a search, right?

DominusMaximus commented 7 years ago

I'm able to see it now. Didn't know the compile would still consider the cards located in My Documents. I copied all of the Mean Street cards to that location and now Kazakus is visible.

It has the same feel as the videos I've seen. 3 discover effects and boom, custom spell. Nice work.

webadict commented 7 years ago

The best part is the customizability of the spell. Recreating the spell as a custom him only spell was probably easier, and maybe a bit nicer looking in the end, but the ability to create something similar was too enticing, plus the ability itself is too unique to not make it possible for other cards.

DominusMaximus commented 7 years ago

Yeah, the way you wrote out the Kazakus json makes it very easy to customize the different components.

webadict commented 7 years ago

The last part is hopefully getting three Discover cards to show up... Then I can remove the Action bar hovers.

webadict commented 7 years ago

Status Update:

And that's all I have for now. I've finally gotten Jade Golems to be findable, but it requires some finicky changes. I'll push a working version of Jade Golem changes (The Spell Tribe stuff is a WIP, so that won't be in any time soon. Plus it's more of a personal improvement, so maybe it will happen...)

DominusMaximus commented 7 years ago

I compiled commit_stream2 after commit_stream4 compiled with a bunch of warnings. Should I still report any issues I find while using commit_stream2?

webadict commented 7 years ago

It should be the most up to date, so sure!

On Nov 24, 2016 10:33 PM, "DominusMaximus" notifications@github.com wrote:

I compiled commit_stream2 after commit_stream4 compiled with a bunch of warnings. Should I still report any issues I find while using commit_stream2?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/demilich1/metastone/issues/266#issuecomment-262879152, or mute the thread https://github.com/notifications/unsubscribe-auth/AFsY_uecwFQWlUJqgk4XAcOdN7eilX4Pks5rBmUXgaJpZM4KszqK .

webadict commented 7 years ago

All cards are now added here: https://github.com/webadict/metastone/tree/commit_stream. Still needs bug testing. Will push when ready. Should also contain some bugfixes for things I probably broke.

webadict commented 7 years ago

... Whelp, found a bug that I can't get rid of, and I'm not sure how it even works.

Choose One cards do not actually send a TargetAcquisitionEvent... Which is completely and utterly bizarre. But, surprisingly, this means that Spellbender never actually worked with it. Huh. Neither does Mayor Noggenfogger, the dumbest card that's ever existed.

webadict commented 7 years ago

Oh man, there are a lot of Choose One bugs...

Bleh.

webadict commented 7 years ago

This is so much worse than Kazakus.

webadict commented 7 years ago

I might have something working tomorrow. I'll have to rewrite the way Choose One Actions are processed.

webadict commented 7 years ago

I'm gonna be honest... I have no idea what I did, but I think it works. Mayor Noggenfogger is a terrible person, and he makes everything worse.

DominusMaximus commented 7 years ago

You randomly targeted code with random code to get Mayor Noggenfogger to work.

webadict commented 7 years ago

Maybe the game works? Commit Stream is the most up to date. I have a few changes that require card testing before they go live.

DominusMaximus commented 7 years ago

I encountered this:

\metastone-commit_stream\game\src\main\java\net\demilich\metastone\game\heroes\powers\HeroPowerChooseOne.java:12: error: HeroPowerChooseOne is not abstract and does not override abstract method hasBothOptions() in IChooseOneCard public class HeroPowerChooseOne extends HeroPower implements IChooseOneCard {

1 error :game:compileJava FAILED

FAILURE: Build failed with an exception.

webadict commented 7 years ago

Hmm, might've forgot to push that change. I'll recheck.

webadict commented 7 years ago

Alright, it's now all in one place.

webadict commented 7 years ago

And a few more fixes. Current branch now being pushed for PR.

webadict commented 7 years ago

Alright, comprehensive list of all updates since Mean Streets of Gadgetzan was released:

Fixes:

Updates:

Additions:

Removals:

@demilich1: After you update MetaStone to 1.3.0, you can close this issue.

demilich1 commented 7 years ago

I just published the 1.3.0 release. While there are still some open issues, I consider the version to be stable enough for public use. Thanks to all contributors (@webadict specifically) for this release!