Conversation
|
|
||
| /** Returns a runnable to start a match with the applied variants if allowed. */ | ||
| public Runnable startGame() { | ||
| FModel.getBlocks(); // Ensure blocks are loaded for Momir Basic and MoJhoSto deck generation |
There was a problem hiding this comment.
I'm not sure if this is the most appropriate place to apply this workaround, or if it's the most appropriate workaround. Anyone else have any thoughts on this, @Hanmac, @tool4ever?
There was a problem hiding this comment.
Seems this got broken by #8750, so thanks for the find
imo just needs to be refactored to have getBlockLands() lazy initialize itself
There was a problem hiding this comment.
It's tricky because neither FModel nor CardBlock are accessible from GameType or StaticData, but I could move it inside this block so it's only loaded when the deck needs to be autogenerated
else if (autoGenerateVariant != null) {
Sorry I'm not really familiar with the codebase yet
There was a problem hiding this comment.
If we don't mind dropping the requirement that the lands be from a card block, we could just do something like: Aggregates.random(StaticData.getCommonCards().getAllCards("Forest"), 12). That'd sidestep the preloading issue, and then we could probably clean up getBlockLands altogether since I think it's only used for this.
efa38fd to
ecff5e3
Compare
ecff5e3 to
fa1ff5e
Compare
|
Not sure how to improve this, but looks good to me otherwise. Whether a Momir deck looks better with lands from different sets or from a single set is a good question, but I guess I'm kinda ambivalent here - different sets provide more variety, while same set provides more consistency (avoiding mixture of old border and new border sets, for instance). I guess it's fine either way :) |
| else if (autoGenerateVariant != null) { | ||
| Deck autoDeck = autoGenerateVariant.autoGenerateDeck(rp); | ||
| deck = new Deck(); | ||
| FModel.getBlocks(); // Ensure blocks are loaded for Momir Basic and MoJhoSto deck generation |
There was a problem hiding this comment.
Aren't you now calling it after autoGenerateDeck?
Fix bug with Momir always using land art from the last set to generate the deck
+
make the lands more randomised and not all from the same set