-
Notifications
You must be signed in to change notification settings - Fork 22
Add Monster Hunter Quest #222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
modargo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a first pass through things.
|
|
||
| @Override | ||
| public boolean canSpawn() { | ||
| return NodeUtil.canPathToNodes(node -> node.room instanceof MonsterRoomElite, 3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this condition is enough. What this code checks for is that there are three distinct elite rooms you can path to. It doesn't check that there is a path that goes through three elite rooms; the rooms could be mutually exclusive (and in many cases will be, given how maps are generated). That means this can spawn when it's impossible to complete.
To have this be accurate, you'll need a more complex calculation. I can think of a few reasonable approaches, which mostly boil down to calculating, for each node, the maximum number of elites you can encounter upon reaching that node (which can be calculated as the maximum of that value for the nodes that lead into it, plus 1 if the node itself is an elite node).
So that's feasible, but it's worth saying that the spawn condition for this quest are very restrictive. It will be able to spawn at Neow for maps where there's a 3-elite path, which anecdotally seems like 50%+ of maps. But after that, this can only spawn if there's a shop that's early in the act and on a 3-elite path already, so it will be very rare to get this after Neow. That's okay if it's how you want the quest to be, but it's one of the most limited map-based spawn conditions of any quest so I thought it was worth bringing up in case you didn't like the implications.
| public void obtainInstant() { | ||
| RewardItem reward = getRewardItem(); | ||
| AbstractDungeon.previousScreen = AbstractDungeon.screen; | ||
| AbstractDungeon.cardRewardScreen.open(reward.cards, reward, "TEXT[TODO]"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to update this text.
| .add(this); | ||
|
|
||
| if (CardCrawlGame.isInARun()) { | ||
| if (CompatUtil.pmLoaded()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the specific cards in the reward show up when you're looking at this quest on the quest board?
Description
Kill 3 elites this act.
If you have PM, get one of the monster hunter cards as a card reward.
Otherwise, get a selection of colorless cards.
Also adds card reward reward type. I will leave it to the maintainers if they want to add that to the generic rewards.
Checklist