Skip to content
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

Adventure: check restrictedEditions and allowedEditions when generating rewards #4572

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jorilx
Copy link
Contributor

@Jorilx Jorilx commented Jan 21, 2024

Hi everyone,
when Forge Adventure generates a reward it doesn't check if the requested card(s) editions are permitted by restrictedEditions/allowedEditions, so if someone is building a new world that's initially cloned from the default one, it ends up with "forbidden" reward cards.
This PR simply ignores those editions, so for example if a reward is defined as:

{
        "type": "card",
        "probability": 1,
        "count": 1,
        "editions": [
                "M22",
                "M21"
        ],
        "colors": [
                "red"
        ],
        "rarity": [
                "rare"
        ]
}

but restrictedEditions contains M21 and M22, the reward will be chosen among red rares of any non-forbidden edition.

@Simisays Simisays added the Adventure For the Adventure Module label Jan 21, 2024
@jjayers99
Copy link
Contributor

Edition filtering should already be handled by initializeAllCards() in RewardData.java.

@Jorilx
Copy link
Contributor Author

Jorilx commented Feb 5, 2024

Edition filtering should already be handled by initializeAllCards() in RewardData.java.

Yes, sorry, I explained myself very poorly, I should've said that the reward filter would allow only "forbidden" cards, so the actual reward ends up empty

Copy link

This PR has not been updated in a while nad has been marked on stale. Stale PRs will be auto closed

@Jorilx
Copy link
Contributor Author

Jorilx commented Mar 21, 2024

@jjayers99 Hello, I'm not sure if my explanation fell short again...? 😅

Copy link

github-actions bot commented May 6, 2024

This PR has not been updated in a while nad has been marked on stale. Stale PRs will be auto closed

@Jorilx
Copy link
Contributor Author

Jorilx commented May 6, 2024

Hoping it's not bad form, I'm just commenting to keep the PR alive

Copy link

This PR has not been updated in a while nad has been marked on stale. Stale PRs will be auto closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Adventure For the Adventure Module keep no stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants